Documentation ¶
Index ¶
- type Application
- type ApplicationResponse
- type ConflictResponse
- type HealthResponse
- type Machine
- type MachineResponse
- type MachineStatus
- type MachineUser
- type Node
- type NodeApplicationUpdate
- type NodeInfo
- type NodeResponse
- type Permission
- type PermissionResponse
- type Session
- type SessionResponse
- type User
- type UserResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Application struct { Application string `json:"application"` CommitSHA string `json:"commit_sha"` DownloadHref string `json:"download_href"` }
Application describes the properties of an application
func ReadLatestApplication ¶
func ReadLatestApplication(applicationName string, releaseChannel string) Application
ReadLatestApplication will return the properties of an application
type ApplicationResponse ¶
type ApplicationResponse struct {
Data Application `json:"data"`
}
ApplicationResponse is an intermediate struct for the properties of a user
type ConflictResponse ¶
ConflictResponse occurs if an entity already exists.
type HealthResponse ¶
HealthResponse describes the state of the server
type Machine ¶
type Machine struct { Permission string `json:"permission"` Status string `json:"status"` Node string `json:"node"` User string `json:"user"` Job string `json:"job"` Number int `json:"number"` Attributes []string `json:"attributes"` Created string `json:"created"` Updated string `json:"updated"` ID string `json:"id"` }
Machine describes the properties of a machine
func ReadMachine ¶
ReadMachine reads the properties of a machine
func UpdateMachineStatus ¶
UpdateMachineStatus updates the status of a machine
func UpdateMachineUser ¶
UpdateMachineUser updates the user of the machine and sets the status to busy.
type MachineResponse ¶
type MachineResponse struct {
Data Machine `json:"data"`
}
MachineResponse is an intermediate struct for the properties of a machine
type MachineStatus ¶
type MachineStatus struct {
Status string `json:"status"`
}
MachineStatus describes the status of a machine
type MachineUser ¶
MachineUser describes the user of a machine
type Node ¶
type Node struct { ApplicationName string `json:"application_name"` ApplicationVersion string `json:"application_version"` Capabilities []string `json:"capabilities"` Created string `json:"created"` ID string `json:"id"` MACAddress string `json:"mac_address"` Machine string `json:"machine"` OperatingSystem string `json:"operating_system"` ReleaseChannel string `json:"release_channel"` Roles []string `json:"roles"` SerialNumber string `json:"serial_number"` Sessions []string `json:"sessions"` Updated string `json:"updated"` }
Node describes the properties of a node
func CreateOrReadNode ¶
CreateOrReadNode creates a new node, which has to be unique by its combination of MAC and serial number. If the node already exists, it will read the node from the API.
func UpdateNode ¶
UpdateNode updates the node identified by the ID.
type NodeApplicationUpdate ¶
type NodeApplicationUpdate struct { ApplicationVersion string `json:"application_version"` ApplicationName string `json:"application_name"` }
NodeApplicationUpdate describes the application version of the node.
type NodeInfo ¶
type NodeInfo struct { ApplicationVersion string `json:"application_version"` ApplicationName string `json:"application_name"` MACAddress string `json:"mac_address"` SerialNumber string `json:"serial_number"` OperatingSystem string `json:"operating_system"` }
NodeInfo describes a device that is managed by the LabCloud platform.
type NodeResponse ¶
type NodeResponse struct {
Data Node `json:"data"`
}
NodeResponse describes the properties of an existing node
type Permission ¶
type Permission struct { Description string `json:"description"` Scheduling string `json:"scheduling"` Workflow string `json:"workflow"` Default bool `json:"open"` Abbreviation string `json:"abbreviation"` Name string `json:"name"` Image string `json:"image"` Created string `json:"created"` Updated string `json:"updated"` ID string `json:"id"` }
Permission describes the properties of a permission
func ReadPermission ¶
func ReadPermission(ID string) Permission
ReadPermission reads the properties of a permission
type PermissionResponse ¶
type PermissionResponse struct {
Data Permission `json:"data"`
}
PermissionResponse is an intermediate struct for the properties of a permission
type Session ¶
type Session struct { Authorized bool `json:"authorized"` Created string `json:"created"` ID string `json:"id"` Identify bool `json:"identify"` Node string `json:"node"` Seen string `json:"seen"` Token string `json:"token"` Updated string `json:"updated"` }
Session describes the properties of a session
func CreateSession ¶
CreateSession creates a new session for the node specified by the ID
func ReadSession ¶
ReadSession reads the properties of an existing session
type SessionResponse ¶
type SessionResponse struct {
Data Session `json:"data"`
}
SessionResponse is an intermediate struct for the properties of a session
type User ¶
type User struct { ID string `json:"id"` AzureID string `json:"azure_id"` CardID string `json:"card_id"` CardNumber string `json:"card_number"` Created string `json:"created"` DisplayName string `json:"display_name"` Email string `json:"email"` FirstName string `json:"first_name"` LastName string `json:"last_name"` Permissions []string `json:"permissions"` Role string `json:"role"` Updated string `json:"updated"` }
User describes the properties of a user
type UserResponse ¶
type UserResponse struct {
Data User `json:"data"`
}
UserResponse is an intermediate struct for the properties of a user