-
Notifications
You must be signed in to change notification settings - Fork 4
/
status.go
89 lines (67 loc) · 2.7 KB
/
status.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
package objects
// THIS FILE IS AUTO GENERATED BY bin/gen.go! DO NOT EDIT!
import (
"fmt"
"github.com/esurdam/go-sophos"
)
// Status is a generated struct representing the Sophos Status Endpoint
// GET /api/nodes/status
type Status struct {
StatusVersion StatusVersion `json:"Status_status"`
}
var _ sophos.Endpoint = &Status{}
var defsStatus = map[string]sophos.RestObject{
"StatusVersion": &StatusVersion{},
}
// RestObjects implements the sophos.Node interface and returns a map of Status's Objects
func (Status) RestObjects() map[string]sophos.RestObject { return defsStatus }
// GetPath implements sophos.RestGetter
func (*Status) GetPath() string { return "/api/nodes/status" }
// RefRequired implements sophos.RestGetter
func (*Status) RefRequired() (string, bool) { return "", false }
var defStatus = &sophos.Definition{Description: "Status", Name: "Status", Link: "/api/definitions/status"}
// Definition returns the /api/definitions struct of Status
func (Status) Definition() sophos.Definition { return *defStatus }
// ApiRoutes returns all known Status Paths
func (Status) ApiRoutes() []string {
return []string{
"/api/status/version",
}
}
// References returns the Status's references. These strings serve no purpose other than to demonstrate which
// Reference keys are used for this Endpoint
func (Status) References() []string {
return []string{}
}
// StatusVersion is an Sophos Endpoint subType and implements sophos.RestObject
type StatusVersion struct {
Locked string `json:"_locked"`
ObjectType string `json:"_type"`
Reference string `json:"_ref"`
}
var _ sophos.RestObject = &StatusVersion{}
// GetPath implements sophos.RestObject and returns the StatusVersion GET path
// Returns some version numbers of the UTM software
func (*StatusVersion) GetPath() string { return "/api/status/version" }
// RefRequired implements sophos.RestObject
func (*StatusVersion) RefRequired() (string, bool) { return "", false }
// DeletePath implements sophos.RestObject and returns the StatusVersion DELETE path
func (*StatusVersion) DeletePath(ref string) string {
return fmt.Sprintf("/api", ref)
}
// PatchPath implements sophos.RestObject and returns the StatusVersion PATCH path
func (*StatusVersion) PatchPath(ref string) string {
return fmt.Sprintf("/api", ref)
}
// PostPath implements sophos.RestObject and returns the StatusVersion POST path
func (*StatusVersion) PostPath() string {
return "/api"
}
// PutPath implements sophos.RestObject and returns the StatusVersion PUT path
func (*StatusVersion) PutPath(ref string) string {
return fmt.Sprintf("/api", ref)
}
// UsedByPath implements sophos.RestObject
func (*StatusVersion) UsedByPath(ref string) string {
return fmt.Sprintf("/api/usedby", ref)
}