Documentation
¶
Overview ¶
Package conch provides access to the Conch API
Index ¶
- Constants
- Variables
- type Conch
- func (c *Conch) AddRackToWorkspace(workspaceUUID fmt.Stringer, rackUUID fmt.Stringer) error
- func (c *Conch) AddUserToWorkspace(workspaceUUID fmt.Stringer, user string, role string) error
- func (c *Conch) AssignDevicesToRackSlots(rackID uuid.UUID, assignments RequestRackAssignmentUpdates) error
- func (c *Conch) AssignWorkspaceDevicesToRackSlots(workspaceID fmt.Stringer, rackID fmt.Stringer, ...) error
- func (c *Conch) ChangeMyPassword(password string, revokeTokens bool) error
- func (c *Conch) CreateMyToken(name string) (u NewUserToken, err error)
- func (c *Conch) CreateSubWorkspace(parent Workspace, sub Workspace) (Workspace, error)
- func (c *Conch) CreateUser(email string, password string, name string, isAdmin bool) error
- func (c *Conch) DeleteDatacenter(id uuid.UUID) error
- func (c *Conch) DeleteDeviceSetting(deviceID string, key string) error
- func (c *Conch) DeleteDeviceTag(deviceID string, key string) error
- func (c *Conch) DeleteDevicesFromRackSlots(rackID uuid.UUID, deletions RequestRackAssignmentDeletes) error
- func (c *Conch) DeleteHardwareProduct(hwUUID fmt.Stringer) error
- func (c *Conch) DeleteHardwareVendor(name string) error
- func (c *Conch) DeleteMyToken(name string) error
- func (c *Conch) DeleteRack(id uuid.UUID) error
- func (c *Conch) DeleteRackFromWorkspace(workspaceUUID fmt.Stringer, rackUUID fmt.Stringer) error
- func (c *Conch) DeleteRackLayoutSlot(id uuid.UUID) error
- func (c *Conch) DeleteRackRole(id uuid.UUID) error
- func (c *Conch) DeleteRoom(id uuid.UUID) error
- func (c *Conch) DeleteUser(emailAddress string, clearTokens bool) error
- func (c *Conch) DeleteUserSetting(name string) error
- func (c *Conch) DeleteUserToken(user string, name string) error
- func (c *Conch) DeviceTritonReboot(serial string) error
- func (c *Conch) DeviceValidationStates(deviceSerial string) ([]ValidationState, error)
- func (c *Conch) FillInDevice(d Device) (Device, error)
- func (c *Conch) GetActiveWorkspaceRelays(workspaceUUID fmt.Stringer, minutes int) ([]WorkspaceRelay, error)
- func (c *Conch) GetAllRelays() (WorkspaceRelays, error)
- func (c *Conch) GetAllUsers() (UsersDetailed, error)
- func (c *Conch) GetDatacenter(id uuid.UUID) (d Datacenter, err error)
- func (c *Conch) GetDatacenterRooms(d Datacenter) ([]Room, error)
- func (c *Conch) GetDatacenters() ([]Datacenter, error)
- func (c *Conch) GetDevice(serial string) (d Device, err error)
- func (c *Conch) GetDeviceIPMI(serial string) (string, error)
- func (c *Conch) GetDeviceLocation(serial string) (loc DeviceLocation, err error)
- func (c *Conch) GetDevicePhase(serial string) (string, error)
- func (c *Conch) GetDeviceSetting(serial string, key string) (string, error)
- func (c *Conch) GetDeviceSettings(serial string) (map[string]string, error)
- func (c *Conch) GetDeviceTag(serial string, key string) (string, error)
- func (c *Conch) GetDeviceTags(serial string) (map[string]string, error)
- func (c *Conch) GetDevicesByField(key string, value string) (d Devices, err error)
- func (c *Conch) GetDevicesBySetting(key string, value string) (d Devices, err error)
- func (c *Conch) GetDevicesByTag(key string, value string) (Devices, error)
- func (c *Conch) GetExtendedDevice(serial string) (ed ExtendedDevice, err error)
- func (c *Conch) GetHardwareProduct(hardwareProductUUID fmt.Stringer) (hp HardwareProduct, err error)
- func (c *Conch) GetHardwareProducts() ([]HardwareProduct, error)
- func (c *Conch) GetHardwareVendor(name string) (v HardwareVendor, err error)
- func (c *Conch) GetHardwareVendorByID(id fmt.Stringer) (v HardwareVendor, err error)
- func (c *Conch) GetHardwareVendors() ([]HardwareVendor, error)
- func (c *Conch) GetMyToken(name string) (u UserToken, err error)
- func (c *Conch) GetMyTokens() (UserTokens, error)
- func (c *Conch) GetRack(id uuid.UUID) (r Rack, err error)
- func (c *Conch) GetRackAssignments(rackID uuid.UUID) (ResponseRackAssignments, error)
- func (c *Conch) GetRackLayout(r Rack) (RackLayoutSlots, error)
- func (c *Conch) GetRackLayoutSlot(id uuid.UUID) (*RackLayoutSlot, error)
- func (c *Conch) GetRackLayoutSlots() (RackLayoutSlots, error)
- func (c *Conch) GetRackPhase(id uuid.UUID) (string, error)
- func (c *Conch) GetRackRole(id uuid.UUID) (r RackRole, err error)
- func (c *Conch) GetRackRoles() ([]RackRole, error)
- func (c *Conch) GetRacks() ([]Rack, error)
- func (c *Conch) GetRoom(id uuid.UUID) (r Room, err error)
- func (c *Conch) GetRoomRacks(r Room) ([]Rack, error)
- func (c *Conch) GetRooms() ([]Room, error)
- func (c *Conch) GetSubWorkspaces(workspaceUUID fmt.Stringer) (Workspaces, error)
- func (c *Conch) GetUser(id uuid.UUID) (user UserDetailed, err error)
- func (c *Conch) GetUserByEmail(email string) (user UserDetailed, err error)
- func (c *Conch) GetUserProfile() (profile UserProfile, err error)
- func (c *Conch) GetUserSetting(key string) (setting interface{}, err error)
- func (c *Conch) GetUserSettings() (map[string]interface{}, error)
- func (c *Conch) GetUserToken(user string, name string) (u UserToken, err error)
- func (c *Conch) GetUserTokens(user string) (UserTokens, error)
- func (c *Conch) GetValidation(id fmt.Stringer) (v Validation, err error)
- func (c *Conch) GetValidationPlan(validationPlanUUID fmt.Stringer) (vp ValidationPlan, err error)
- func (c *Conch) GetValidationPlanValidations(validationPlanUUID fmt.Stringer) (Validations, error)
- func (c *Conch) GetValidationPlans() ([]ValidationPlan, error)
- func (c *Conch) GetValidations() (Validations, error)
- func (c *Conch) GetVersion() (string, error)
- func (c *Conch) GetWorkspace(workspaceUUID fmt.Stringer) (w Workspace, e error)
- func (c *Conch) GetWorkspaceByName(name string) (w Workspace, e error)
- func (c *Conch) GetWorkspaceDevices(workspaceUUID fmt.Stringer, idsOnly bool, graduated string, health string, ...) (Devices, error)
- func (c *Conch) GetWorkspaceRack(workspaceUUID fmt.Stringer, rackUUID fmt.Stringer) (rack WorkspaceRack, err error)
- func (c *Conch) GetWorkspaceRacks(workspaceUUID fmt.Stringer) ([]WorkspaceRack, error)
- func (c *Conch) GetWorkspaceRelayDevices(workspaceUUID fmt.Stringer, relayName string) ([]Device, error)
- func (c *Conch) GetWorkspaceRelays(workspaceUUID fmt.Stringer) (WorkspaceRelays, error)
- func (c *Conch) GetWorkspaceUsers(workspaceUUID fmt.Stringer) ([]WorkspaceUser, error)
- func (c *Conch) GetWorkspaces() (Workspaces, error)
- func (c *Conch) GraduateDevice(serial string) error
- func (c *Conch) Login(user string, password string) error
- func (c *Conch) MarkDeviceTritonSetup(serial string) error
- func (c *Conch) ParseJWT(token string, signature string) (ConchJWT, error)
- func (c *Conch) RawDelete(url string, body io.Reader) (*http.Response, error)
- func (c *Conch) RawGet(url string) (*http.Response, error)
- func (c *Conch) RawPost(url string, body io.Reader) (*http.Response, error)
- func (c *Conch) RegisterRelay(r WorkspaceRelay) error
- func (c *Conch) RemoveUserFromWorkspace(workspaceUUID fmt.Stringer, email string) error
- func (c *Conch) ResetUserPassword(email string, revokeTokens bool) error
- func (c *Conch) RevokeMyLogins() error
- func (c *Conch) RevokeMyTokens() error
- func (c *Conch) RevokeMyTokensAndLogins() error
- func (c *Conch) RevokeUserLogins(user string) error
- func (c *Conch) RevokeUserTokens(user string) error
- func (c *Conch) RevokeUserTokensAndLogins(user string) error
- func (c *Conch) RunDeviceValidation(deviceSerial string, validationUUID fmt.Stringer, body string) ([]ValidationResult, error)
- func (c *Conch) RunDeviceValidationPlan(deviceSerial string, validationPlanUUID fmt.Stringer, body string) ([]ValidationResult, error)
- func (c *Conch) SaveDatacenter(d *Datacenter) error
- func (c *Conch) SaveHardwareProduct(h *HardwareProduct) error
- func (c *Conch) SaveHardwareVendor(v *HardwareVendor) error
- func (c *Conch) SaveRack(r *Rack) error
- func (c *Conch) SaveRackLayoutSlot(r *RackLayoutSlot) error
- func (c *Conch) SaveRackRole(r *RackRole) error
- func (c *Conch) SaveRoom(r *Room) error
- func (c *Conch) SetDeviceAssetTag(serial string, tag string) error
- func (c *Conch) SetDevicePhase(serial string, phase string) error
- func (c *Conch) SetDeviceSetting(deviceID string, key string, value string) error
- func (c *Conch) SetDeviceTag(deviceID string, key string, value string) error
- func (c *Conch) SetDeviceTritonUUID(serial string, id uuid.UUID) error
- func (c *Conch) SetRackPhase(id uuid.UUID, phase string, withDevices bool) error
- func (c *Conch) SetUserSetting(name string, value interface{}) error
- func (c *Conch) SetUserSettings(settings map[string]interface{}) error
- func (c *Conch) SubmitDeviceReport(serial string, report string) (state ValidationState, err error)
- func (c *Conch) UpdateUser(userID uuid.UUID, email string, name string, isAdmin bool) error
- func (c *Conch) VerifyJwtLogin(refreshTime int, forceJWT bool) error
- func (c *Conch) VerifyToken() (bool, error)
- func (c *Conch) WorkspaceValidationStates(workspaceUUID fmt.Stringer) ([]ValidationState, error)
- type ConchJWT
- type CreateNewUserToken
- type Datacenter
- type DatacenterDetailedRoom
- type Device
- type DeviceLocation
- type Devices
- type Disk
- type ExtendedDevice
- type HardwareProduct
- type HardwareProductTarget
- type HardwareProfile
- type HardwareVendor
- type NewUserToken
- type Nic
- type Rack
- type RackLayoutSlot
- type RackLayoutSlots
- type RackRole
- type RequestRackAssignmentDelete
- type RequestRackAssignmentDeletes
- type RequestRackAssignmentUpdate
- type RequestRackAssignmentUpdates
- type ResponseRackAssignment
- type ResponseRackAssignments
- type Room
- type User
- type UserDetailed
- type UserProfile
- type UserToken
- type UserTokens
- type Users
- type UsersDetailed
- type Validation
- type ValidationPlan
- type ValidationPlanExecution
- type ValidationReport
- type ValidationResult
- type ValidationRun
- type ValidationRuns
- type ValidationState
- type Validations
- type Workspace
- type WorkspaceAndRole
- type WorkspaceRack
- type WorkspaceRackLayoutAssignments
- type WorkspaceRackSlot
- type WorkspaceRackSlots
- type WorkspaceRelay
- type WorkspaceRelayLocation
- type WorkspaceRelays
- type WorkspaceUser
- type Workspaces
- type WorkspacesAndRoles
- Bugs
Constants ¶
const ( // MinimumAPIVersion sets the earliest API version that we support. MinimumAPIVersion = "2.30.0" BreakingAPIVersion = "3.0.0" )
const ( ValidationReportStatusFail = 0 ValidationReportStatusOK = 1 )
ValidationReport vars provide an abstraction to make sense of the 'status' field in ValidationReports
Variables ¶
var ( // ErrLoginFailed indicates that the login process failed for unspecified // reasons ErrLoginFailed = errors.New("login failed") // ErrHTTPNotOk indicates that the API returned a non-200 status code that // we don't know how to handle ErrHTTPNotOk = errors.New("non-200 HTTP status code returned") // ErrDataNotFound inidicates that the API returned a status code // inidicating that the requested data does not exist or is not available. // NOTE: The API will also return this error if the user is not allowed to // access the data in question. ErrDataNotFound = errors.New("server could not find the data requested") // ErrBadInput indicates that the user passed incomplete or bad data to a // routine. This typicallly only occurs when a struct parameter isn't // filled out with enough data. ErrBadInput = errors.New("incomplete data passed to the routine") // ErrNotSupported indicates that the API server does not support this // command. This is typically determined via checks on conch.apiVersion ErrNotSupported = errors.New("this function is not supported") // ErrNotAuthorized indicates that the API server returned a 401 ErrNotAuthorized = errors.New("invalid or expired auth credentials") // ErrForbidden indicates that the API server returned a 403 ErrForbidden = errors.New("access to this data is forbidden") // ErrMustChangePassword is used to signal that the user must change their // password before proceeding. Typically, the existing auth credentials // will continue to work for a few minutes. ErrMustChangePassword = errors.New("user must change their password") ErrMalformedJWT = errors.New("server sent a malformed auth token") )
Functions ¶
This section is empty.
Types ¶
type Conch ¶
type Conch struct { BaseURL string UA string Debug bool Trace bool JWT ConchJWT Token string // replacement for JWT HTTPClient *http.Client CookieJar *cookiejar.Jar }
Conch contains auth and configuration data
func (*Conch) AddRackToWorkspace ¶
AddRackToWorkspace adds an existing rack to an existing workspace, via /workspace/:uuid/rack
func (*Conch) AddUserToWorkspace ¶ added in v1.7.0
AddUserToWorkspace adds a user to a workspace via /workspace/:uuid/user
func (*Conch) AssignDevicesToRackSlots ¶ added in v1.10.0
func (c *Conch) AssignDevicesToRackSlots( rackID uuid.UUID, assignments RequestRackAssignmentUpdates, ) error
func (*Conch) AssignWorkspaceDevicesToRackSlots ¶ added in v1.12.0
func (*Conch) ChangeMyPassword ¶ added in v1.12.0
func (*Conch) CreateMyToken ¶ added in v1.12.0
func (c *Conch) CreateMyToken(name string) (u NewUserToken, err error)
func (*Conch) CreateSubWorkspace ¶
CreateSubWorkspace creates a sub workspace under the parent, via /workspace/:uuid/child If the provided parent lacks an ID, ErrBadInput is returned Currently, if an attempt to create a workspace with a conflicting name happens, the API returns a 500 rather than something useful. The routine will return ErrHTTPNotOk in that case.
func (*Conch) CreateUser ¶ added in v1.4.0
CreateUser creates a new user. They are *not* added to a workspace. The 'email' argument is required. The 'name' argument is optional The 'password' argument is optional The 'isAdmin' argument sets the user to be an admin. Defaults to false.
func (*Conch) DeleteDatacenter ¶ added in v1.11.0
DeleteDatacenter deletes a datacenter
func (*Conch) DeleteDeviceSetting ¶ added in v1.4.0
DeleteDeviceSetting deletes a single setting for a device via /device/:deviceID/settings/:key Settings that begin with "tag." cannot be processed by this routine and will always return ErrDataNotFound
func (*Conch) DeleteDeviceTag ¶ added in v1.4.0
DeleteDeviceTag deletes a single tag for a device via /device/:deviceID/settings/:key Settings that do NOT begin with "tag." cannot be processed by this routine and will always return ErrDataNotFound
func (*Conch) DeleteDevicesFromRackSlots ¶ added in v1.12.0
func (c *Conch) DeleteDevicesFromRackSlots( rackID uuid.UUID, deletions RequestRackAssignmentDeletes, ) error
func (*Conch) DeleteHardwareProduct ¶ added in v1.8.0
DeleteHardwareProduct deletes a hardware product by marking it as deactivated
func (*Conch) DeleteHardwareVendor ¶ added in v1.5.0
DeleteHardwareVendor ...
func (*Conch) DeleteMyToken ¶ added in v1.12.0
func (*Conch) DeleteRackFromWorkspace ¶
DeleteRackFromWorkspace removes an existing rack from an existing workplace, via /workspace/:uuid/rack/:uuid
func (*Conch) DeleteRackLayoutSlot ¶ added in v1.12.0
func (*Conch) DeleteUser ¶ added in v1.4.0
DeleteUser deletes a user and, optionally, clears their JWT credentials
func (*Conch) DeleteUserSetting ¶
DeleteUserSetting deletes a user setting via /user/me/settings/:name
func (*Conch) DeleteUserToken ¶ added in v1.12.0
func (*Conch) DeviceTritonReboot ¶
DeviceTritonReboot sets the 'triton_reboot' field for the given device, via /device/:serial/triton_reboot WARNING: This is a one way operation and cannot currently be undone via the API
func (*Conch) DeviceValidationStates ¶
func (c *Conch) DeviceValidationStates( deviceSerial string, ) ([]ValidationState, error)
DeviceValidationStates returns the stored validation states for a device
func (*Conch) FillInDevice ¶
FillInDevice takes an existing device and fills in its data using "/device"
This exists because the API hands back partial devices in most cases. It's likely, though, that any client utility will eventually want all the data about a device and not just bits
func (*Conch) GetActiveWorkspaceRelays ¶ added in v1.8.0
func (c *Conch) GetActiveWorkspaceRelays( workspaceUUID fmt.Stringer, minutes int, ) ([]WorkspaceRelay, error)
GetActiveWorkspaceRelays ...
func (*Conch) GetAllRelays ¶
func (c *Conch) GetAllRelays() (WorkspaceRelays, error)
GetAllRelays uses the /relay endpoint to get a list of all relays, but without their assigned devices.
func (*Conch) GetAllUsers ¶ added in v1.7.0
func (c *Conch) GetAllUsers() (UsersDetailed, error)
GetAllUsers retrieves a list of all users, if the user has the right permissions, in the system. Returns UserDetailed structs
func (*Conch) GetDatacenter ¶ added in v1.11.0
func (c *Conch) GetDatacenter(id uuid.UUID) (d Datacenter, err error)
func (*Conch) GetDatacenterRooms ¶ added in v1.11.0
func (c *Conch) GetDatacenterRooms(d Datacenter) ([]Room, error)
GetDatacenterRooms gets the global rooms assigned to a global datacenter
func (*Conch) GetDatacenters ¶ added in v1.11.0
func (c *Conch) GetDatacenters() ([]Datacenter, error)
func (*Conch) GetDeviceIPMI ¶ added in v1.5.0
GetDeviceIPMI retrieves "/device/:serial/interface/impi1/ipaddr"
func (*Conch) GetDeviceLocation ¶
func (c *Conch) GetDeviceLocation(serial string) (loc DeviceLocation, err error)
GetDeviceLocation fetches the location for a device, via /device/:serial/location
func (*Conch) GetDevicePhase ¶ added in v1.12.0
func (*Conch) GetDeviceSetting ¶
GetDeviceSetting fetches a single setting for a device, via /device/:serial/settings/:key Device settings that begin with 'tag.' are filtered out.
func (*Conch) GetDeviceSettings ¶
GetDeviceSettings fetches settings for a device, via /device/:serial/settings Device settings that begin with 'tag.' are filtered out.
func (*Conch) GetDeviceTag ¶ added in v1.4.0
GetDeviceTag fetches a single tag for a device, via /device/:serial/settings/:key The key must either begin with 'tag.' or it will be prepended
func (*Conch) GetDeviceTags ¶ added in v1.4.0
GetDeviceTags fetches tags for a device, via /device/:serial/settings Device settings that do NOT begin with 'tag.' are filtered out.
func (*Conch) GetDevicesByField ¶ added in v1.10.0
func (*Conch) GetDevicesBySetting ¶ added in v1.10.0
func (*Conch) GetDevicesByTag ¶ added in v1.10.0
func (*Conch) GetExtendedDevice ¶ added in v1.8.0
func (c *Conch) GetExtendedDevice(serial string) (ed ExtendedDevice, err error)
func (*Conch) GetHardwareProduct ¶
func (c *Conch) GetHardwareProduct( hardwareProductUUID fmt.Stringer, ) (hp HardwareProduct, err error)
GetHardwareProduct fetches a single hardware product via /hardware/product/:uuid
func (*Conch) GetHardwareProducts ¶
func (c *Conch) GetHardwareProducts() ([]HardwareProduct, error)
GetHardwareProducts fetches a single hardware product via /hardware_product
func (*Conch) GetHardwareVendor ¶ added in v1.5.0
func (c *Conch) GetHardwareVendor(name string) (v HardwareVendor, err error)
GetHardwareVendor ...
func (*Conch) GetHardwareVendorByID ¶ added in v1.8.0
func (c *Conch) GetHardwareVendorByID(id fmt.Stringer) (v HardwareVendor, err error)
func (*Conch) GetHardwareVendors ¶ added in v1.5.0
func (c *Conch) GetHardwareVendors() ([]HardwareVendor, error)
GetHardwareVendors ...
func (*Conch) GetMyToken ¶ added in v1.12.0
func (*Conch) GetMyTokens ¶ added in v1.12.0
func (c *Conch) GetMyTokens() (UserTokens, error)
func (*Conch) GetRackAssignments ¶ added in v1.12.0
func (c *Conch) GetRackAssignments(rackID uuid.UUID) (ResponseRackAssignments, error)
func (*Conch) GetRackLayout ¶ added in v1.12.0
func (c *Conch) GetRackLayout(r Rack) (RackLayoutSlots, error)
GetRackLayout fetches the layout entries for a rack in the global domain
func (*Conch) GetRackLayoutSlot ¶ added in v1.12.0
func (c *Conch) GetRackLayoutSlot(id uuid.UUID) (*RackLayoutSlot, error)
func (*Conch) GetRackLayoutSlots ¶ added in v1.12.0
func (c *Conch) GetRackLayoutSlots() (RackLayoutSlots, error)
func (*Conch) GetRackPhase ¶ added in v1.12.0
func (*Conch) GetRackRole ¶ added in v1.12.0
func (*Conch) GetRackRoles ¶ added in v1.12.0
func (*Conch) GetSubWorkspaces ¶
func (c *Conch) GetSubWorkspaces(workspaceUUID fmt.Stringer) (Workspaces, error)
GetSubWorkspaces returns the contents of /workspace/:uuid/child, getting a list of subworkspaces for the given workspace id
func (*Conch) GetUser ¶ added in v1.10.0
func (c *Conch) GetUser(id uuid.UUID) (user UserDetailed, err error)
func (*Conch) GetUserByEmail ¶ added in v1.10.0
func (c *Conch) GetUserByEmail(email string) (user UserDetailed, err error)
func (*Conch) GetUserProfile ¶ added in v1.10.0
func (c *Conch) GetUserProfile() (profile UserProfile, err error)
func (*Conch) GetUserSetting ¶
GetUserSetting returns the results of /user/me/settings/:key The return is an interface{} because the database structure is a string name and a jsonb data field. There is no way for this library to know in advanace what's in that data so here there be dragons.
func (*Conch) GetUserSettings ¶
GetUserSettings returns the results of /user/me/settings The return is a map[string]interface{} because the database structure is a string name and a jsonb data field. There is no way for this library to know in advanace what's in that data so here there be dragons.
func (*Conch) GetUserToken ¶ added in v1.12.0
func (*Conch) GetUserTokens ¶ added in v1.12.0
func (c *Conch) GetUserTokens(user string) (UserTokens, error)
func (*Conch) GetValidation ¶ added in v1.10.0
func (c *Conch) GetValidation(id fmt.Stringer) (v Validation, err error)
func (*Conch) GetValidationPlan ¶
func (c *Conch) GetValidationPlan( validationPlanUUID fmt.Stringer, ) (vp ValidationPlan, err error)
GetValidationPlan returns the contents of /validation_plan/:uuid, getting information about a single validation plan
func (*Conch) GetValidationPlanValidations ¶
func (c *Conch) GetValidationPlanValidations( validationPlanUUID fmt.Stringer, ) (Validations, error)
GetValidationPlanValidations gets the list of validations associated with a validation plan
func (*Conch) GetValidationPlans ¶
func (c *Conch) GetValidationPlans() ([]ValidationPlan, error)
GetValidationPlans returns the contents of /validation_plan, getting the list of all validations plans loaded in the system
func (*Conch) GetValidations ¶
func (c *Conch) GetValidations() (Validations, error)
GetValidations returns the contents of /validation, getting the list of all validations loaded in the system
func (*Conch) GetVersion ¶ added in v1.8.0
GetVersion returns the API's version string, via /version
func (*Conch) GetWorkspace ¶
GetWorkspace returns the contents of /workspace/:uuid, getting information about a single workspace
func (*Conch) GetWorkspaceByName ¶ added in v1.10.0
GetWorkspaceByName returns the contents of /workspace/:name, getting information about a single workspace
func (*Conch) GetWorkspaceDevices ¶
func (c *Conch) GetWorkspaceDevices( workspaceUUID fmt.Stringer, idsOnly bool, graduated string, health string, validated string, ) (Devices, error)
GetWorkspaceDevices retrieves a list of Devices for the given workspace. Pass true for 'IDsOnly' to get Devices with only the ID field populated Pass a string for 'graduated' to filter devices by graduated value, as per https://conch.joyent.us/doc#getdevices Pass a string for 'health' to filter devices by health value, as per https://conch.joyent.us/doc#getdevices
func (*Conch) GetWorkspaceRack ¶
func (c *Conch) GetWorkspaceRack( workspaceUUID fmt.Stringer, rackUUID fmt.Stringer, ) (rack WorkspaceRack, err error)
GetWorkspaceRack fetches a single rack for a workspace, via /workspace/:uuid/rack/:id
func (*Conch) GetWorkspaceRacks ¶
func (c *Conch) GetWorkspaceRacks(workspaceUUID fmt.Stringer) ([]WorkspaceRack, error)
GetWorkspaceRacks fetchest the list of racks for a workspace, via /workspace/:uuid/rack NOTE: The API currently returns a hash of arrays where the key is the datacenter/az. This routine copies that key into the Datacenter field in the Rack struct.
func (*Conch) GetWorkspaceRelayDevices ¶ added in v1.8.0
func (c *Conch) GetWorkspaceRelayDevices( workspaceUUID fmt.Stringer, relayName string, ) ([]Device, error)
GetWorkspaceRelayDevices ...
func (*Conch) GetWorkspaceRelays ¶
func (c *Conch) GetWorkspaceRelays(workspaceUUID fmt.Stringer) (WorkspaceRelays, error)
GetWorkspaceRelays returns all Relays associated with the given workspace
func (*Conch) GetWorkspaceUsers ¶
func (c *Conch) GetWorkspaceUsers(workspaceUUID fmt.Stringer) ([]WorkspaceUser, error)
GetWorkspaceUsers returns the contents of /workspace/:uuid/users, getting a list of users for the given workspace id
func (*Conch) GetWorkspaces ¶
func (c *Conch) GetWorkspaces() (Workspaces, error)
GetWorkspaces returns the contents of /workspace, getting the list of all workspaces that the user has access to
func (*Conch) GraduateDevice ¶
GraduateDevice sets the 'graduated' field for the given device, via /device/:serial/graduate WARNING: This is a one way operation and cannot currently be undone via the API
func (*Conch) Login ¶
Login uses the User, as listed in the Conch struct, and the provided password to log into the Conch API and populate the JWT entry in the Conch struct
func (*Conch) MarkDeviceTritonSetup ¶
MarkDeviceTritonSetup marks the device as setup for Triton For this action to succeed, the device must have its Triton UUID set and marked as rebooted into Triton. If these conditions are not met, this function will return ErrBadInput
func (*Conch) RawDelete ¶
RawDelete allows the user to perform an HTTP DELETE against the API, with the library handling all auth but *not* processing the response.
func (*Conch) RawGet ¶
RawGet allows the user to perform an HTTP GET against the API, with the library handling all auth but *not* processing the response.
func (*Conch) RawPost ¶
RawPost allows the user to perform an HTTP POST against the API, with the library handling all auth but *not* processing the response. The provided body *must* be JSON for the server to accept it.
func (*Conch) RegisterRelay ¶
func (c *Conch) RegisterRelay(r WorkspaceRelay) error
RegisterRelay registers/updates a Relay via /relay/:serial/register If the provided relay does not have an IP, SSHPort, and Version, ErrBadInput will be returned
func (*Conch) RemoveUserFromWorkspace ¶ added in v1.7.0
RemoveUserFromWorkspace ...
func (*Conch) ResetUserPassword ¶ added in v1.4.0
ResetUserPassword resets the password for the provided user, causing an email to be sent
func (*Conch) RevokeMyLogins ¶ added in v1.12.0
func (*Conch) RevokeMyTokens ¶ added in v1.12.0
func (*Conch) RevokeMyTokensAndLogins ¶ added in v1.12.0
func (*Conch) RevokeUserLogins ¶ added in v1.12.0
func (*Conch) RevokeUserTokens ¶
func (*Conch) RevokeUserTokensAndLogins ¶ added in v1.12.0
func (*Conch) RunDeviceValidation ¶
func (c *Conch) RunDeviceValidation( deviceSerial string, validationUUID fmt.Stringer, body string, ) ([]ValidationResult, error)
RunDeviceValidation runs a validation against given a device and returns the results
func (*Conch) RunDeviceValidationPlan ¶
func (c *Conch) RunDeviceValidationPlan( deviceSerial string, validationPlanUUID fmt.Stringer, body string, ) ([]ValidationResult, error)
RunDeviceValidationPlan runs a validation plan against a given device and returns the results
func (*Conch) SaveDatacenter ¶ added in v1.11.0
func (c *Conch) SaveDatacenter(d *Datacenter) error
SaveDatacenter creates or updates a datacenter in the global domain, based on the presence of an ID
func (*Conch) SaveHardwareProduct ¶ added in v1.8.0
func (c *Conch) SaveHardwareProduct(h *HardwareProduct) error
SaveHardwareProduct creates or saves s hardware product, based on the presence of an ID
func (*Conch) SaveHardwareVendor ¶ added in v1.5.0
func (c *Conch) SaveHardwareVendor(v *HardwareVendor) error
SaveHardwareVendor ...
func (*Conch) SaveRackLayoutSlot ¶ added in v1.12.0
func (c *Conch) SaveRackLayoutSlot(r *RackLayoutSlot) error
func (*Conch) SaveRackRole ¶ added in v1.12.0
func (*Conch) SetDeviceAssetTag ¶
SetDeviceAssetTag sets the asset tag for the provided serial
func (*Conch) SetDevicePhase ¶ added in v1.12.0
func (*Conch) SetDeviceSetting ¶ added in v1.4.0
SetDeviceSetting sets a single setting for a device via /device/:deviceID/settings/:key Settings that begin with "tag." cannot be processed by this routine and will always return ErrDataNotFound
func (*Conch) SetDeviceTag ¶ added in v1.4.0
SetDeviceTag sets a single tag for a device via /device/:deviceID/settings/:key The key must either begin with 'tag.' or it will be prepended
func (*Conch) SetDeviceTritonUUID ¶
SetDeviceTritonUUID sets the triton UUID via /device/:serial/triton_uuid
func (*Conch) SetRackPhase ¶ added in v1.12.0
func (*Conch) SetUserSetting ¶
SetUserSetting sets the value of a user setting via /user/me/settings/:name
func (*Conch) SetUserSettings ¶
SetUserSettings sets the value of *all* user settings via /user/me/settings
func (*Conch) SubmitDeviceReport ¶ added in v1.11.0
func (c *Conch) SubmitDeviceReport(serial string, report string) (state ValidationState, err error)
func (*Conch) UpdateUser ¶ added in v1.10.0
UpdateUser updates properties of a user. No workspace permissions are changed. The 'userID' argument is required The 'email' argument is optional The 'name' argument is optional The 'isAdmin' argument sets the user to be an admin. Defaults to false.
func (*Conch) VerifyJwtLogin ¶ added in v1.12.0
VerifyJwtLogin determines if the user's JWT auth data is still valid.
One can pass in an integer value, representing when to force a token refresh, based on the number of seconds left until expiry. Pass in 0 to prevent refreshing
If the second parameter is true, a JWT refresh is forced, regardless of any other parameters.
func (*Conch) VerifyToken ¶ added in v1.12.0
func (*Conch) WorkspaceValidationStates ¶
func (c *Conch) WorkspaceValidationStates( workspaceUUID fmt.Stringer, ) ([]ValidationState, error)
WorkspaceValidationStates returns the stored validation states for all devices in a workspace
type ConchJWT ¶ added in v1.9.0
type CreateNewUserToken ¶ added in v1.12.0
type CreateNewUserToken struct {
Name string `json:"name"`
}
corresponds to conch.git/json-schema/input.yaml;NewUserToken
type Datacenter ¶
type DatacenterDetailedRoom ¶ added in v1.11.0
type Device ¶
type Device struct { AssetTag string `json:"asset_tag"` Created time.Time `json:"created"` Deactivated time.Time `json:"deactivated"` Graduated time.Time `json:"graduated"` HardwareProduct uuid.UUID `json:"hardware_product"` Health string `json:"health"` Hostname string `json:"hostname"` ID string `json:"id"` LastSeen time.Time `json:"last_seen"` Location DeviceLocation `json:"location"` Nics []Nic `json:"nics"` State string `json:"state"` SystemUUID uuid.UUID `json:"system_uuid"` TritonUUID uuid.UUID `json:"triton_uuid"` TritonSetup time.Time `json:"triton_setup"` Updated time.Time `json:"updated"` UptimeSince time.Time `json:"uptime_since"` Validated time.Time `json:"validated"` Validations []ValidationReport `json:"validations"` LatestReport interface{} `json:"latest_report"` LatestReportIsInvalid bool `json:"latest_report_is_invalid"` InvalidReport string `json:"invalid_report"` Disks []Disk `json:"disks"` RackUnitStart int `json:"rack_unit_start` RackID uuid.UUID `json:"rack_id"` Phase string `json:"phase"` }
Device represents what the API docs call a "DetailedDevice"
Instead of having multiple structs representing partial datasets, like the API chooses to do, this library will always hand back Devices. In the case that the API does not provide all the data, those fields will be null or zero values.
type DeviceLocation ¶
type DeviceLocation struct { Datacenter Datacenter `json:"datacenter"` Room DatacenterDetailedRoom `json:"datacenter_room"` Rack Rack `json:"rack"` TargetHardwareProduct HardwareProductTarget `json:"target_hardware_product"` RackUnitStart int `json:"rack_unit_start"` }
DeviceLocation represents the location of a device, including its datacenter, room and rack
type Disk ¶ added in v1.8.0
type Disk struct { ID uuid.UUID `json:"id"` Created time.Time `json:"created"` Updated time.Time `json:"updated"` DriveType string `json:"drive_type"` Enclosure string `json:"enclosure"` Firmware string `json:"firmware"` HBA string `json:"hba"` Health string `json:"health"` Model string `json:"model"` SerialNumber string `json:"serial_number"` Size int `json:"size"` Slot int `json:"slot"` Temp int `json:"temp"` Transport string `json:"transport"` Vendor string `json:"vendor"` }
DeviceDisk ...
type ExtendedDevice ¶ added in v1.8.0
type ExtendedDevice struct { Device IPMI string `json:"ipmi"` HardwareName string `json:"hardware_name"` RackRole RackRole `json:"rack_role"` SKU string `json:"sku"` Enclosures map[string]map[int]Disk `json:"enclosures"` IsGraduated bool `json:"is_graduated"` IsTritonSetup bool `json:"is_triton_setup"` IsValidated bool `json:"is_validated"` Validations []ValidationPlanExecution `json:"validations"` }
type HardwareProduct ¶
type HardwareProduct struct { ID uuid.UUID `json:"id"` Name string `json:"name"` Alias string `json:"alias"` Prefix string `json:"prefix,omitempty"` HardwareVendorID uuid.UUID `json:"hardware_vendor_id"` GenerationName string `json:"generation_name,omitempty"` LegacyProductName string `json:"legacy_product_name,omitempty"` SKU string `json:"sku,omitempty"` Specification interface{} `json:"specification"` Profile HardwareProfile `json:"hardware_product_profile"` Created time.Time `json:"created"` Updated time.Time `json:"updated"` }
HardwareProduct is a type of Device. For instance, "Hallasan C"
func (*HardwareProduct) UnmarshalJSON ¶ added in v1.9.0
func (h *HardwareProduct) UnmarshalJSON(data []byte) error
type HardwareProductTarget ¶
type HardwareProductTarget struct { ID uuid.UUID `json:"id"` Name string `json:"name"` Alias string `json:"alias"` Vendor string `json:"vendor"` }
HardwareProductTarget represents the HardwareProduct that a device should have based on its location
type HardwareProfile ¶
type HardwareProfile struct { ID uuid.UUID `json:"id"` BiosFirmware string `json:"bios_firmware"` CPUType string `json:"cpu_type"` HbaFirmware string `json:"hba_firmware,omitempty"` NumCPU int `json:"cpu_num"` NumDimms int `json:"dimms_num"` NumNics int `json:"nics_num"` NumUSB int `json:"usb_num"` Purpose string `json:"purpose"` SasHddNum int `json:"sas_hdd_num,omitempty"` SasHddSize int `json:"sas_hdd_size,omitempty"` SasHddSlots string `json:"sas_hdd_slots,omitempty"` SataHddNum int `json:"sata_hdd_num,omitempty"` SataHddSize int `json:"sata_hdd_size,omitempty"` SataHddSlots string `json:"sata_hdd_slots,omitempty"` SataSsdNum int `json:"sata_ssd_num,omitempty"` SataSsdSize int `json:"sata_ssd_size,omitempty"` SataSsdSlots string `json:"sata_ssd_slots,omitempty"` NvmeSsdNum int `json:"nvme_ssd_num,omitempty"` NvmeSsdSize int `json:"nvme_ssd_size,omitempty"` NvmeSsdSlots string `json:"nvme_ssd_slots,omitempty"` RaidLunNum int `json:"raid_lun_num,omitempty"` TotalPSU int `json:"psu_total,omitempty"` TotalRAM int `json:"ram_total"` RackUnit int `json:"rack_unit"` }
HardwareProfile is a detailed accounting of either the actual hardware or intended hardware configuration of a Device, depending on the API endpoint in question
type HardwareVendor ¶ added in v1.5.0
type HardwareVendor struct { ID uuid.UUID `json:"id"` Name string `json:"name"` Created time.Time `json:"created"` Updated time.Time `json:"updated"` }
HardwareVendor ...
type NewUserToken ¶ added in v1.12.0
corresponds to conch.git/json-schema/response.yaml;NewUserToken
type Nic ¶
type Nic struct { MAC string `json:"mac"` IfaceName string `json:"iface_name"` IfaceVendor string `json:"iface_vendor"` IfaceType string `json:"iface_type"` PeerMac string `json:"peer_mac"` PeerPort string `json:"peer_port"` PeerSwitch string `json:"peer_switch"` }
Nic is a network interface card, including its peer switch info
type Rack ¶
type Rack struct { ID uuid.UUID `json:"id"` Created time.Time `json:"created"` Updated time.Time `json:"updated"` DatacenterRoomID uuid.UUID `json:"datacenter_room_id"` Name string `json:"name"` RoleID uuid.UUID `json:"role"` SerialNumber string `json:"serial_number"` AssetTag string `json:"asset_tag"` Phase string `json:"phase"` }
type RackLayoutSlot ¶ added in v1.12.0
type RackLayoutSlots ¶ added in v1.12.0
type RackLayoutSlots []RackLayoutSlot
func (RackLayoutSlots) Len ¶ added in v1.12.0
func (g RackLayoutSlots) Len() int
func (RackLayoutSlots) Less ¶ added in v1.12.0
func (g RackLayoutSlots) Less(i, j int) bool
func (RackLayoutSlots) Swap ¶ added in v1.12.0
func (g RackLayoutSlots) Swap(i, j int)
type RequestRackAssignmentDelete ¶ added in v1.12.0
type RequestRackAssignmentDeletes ¶ added in v1.12.0
type RequestRackAssignmentDeletes []RequestRackAssignmentDelete
func (RequestRackAssignmentDeletes) Len ¶ added in v1.12.0
func (r RequestRackAssignmentDeletes) Len() int
func (RequestRackAssignmentDeletes) Less ¶ added in v1.12.0
func (r RequestRackAssignmentDeletes) Less(i, j int) bool
func (RequestRackAssignmentDeletes) Swap ¶ added in v1.12.0
func (r RequestRackAssignmentDeletes) Swap(i, j int)
type RequestRackAssignmentUpdate ¶ added in v1.12.0
type RequestRackAssignmentUpdates ¶ added in v1.12.0
type RequestRackAssignmentUpdates []RequestRackAssignmentUpdate
func (RequestRackAssignmentUpdates) Len ¶ added in v1.12.0
func (r RequestRackAssignmentUpdates) Len() int
func (RequestRackAssignmentUpdates) Less ¶ added in v1.12.0
func (r RequestRackAssignmentUpdates) Less(i, j int) bool
func (RequestRackAssignmentUpdates) Swap ¶ added in v1.12.0
func (r RequestRackAssignmentUpdates) Swap(i, j int)
type ResponseRackAssignment ¶ added in v1.12.0
type ResponseRackAssignments ¶ added in v1.12.0
type ResponseRackAssignments []ResponseRackAssignment
func (ResponseRackAssignments) Len ¶ added in v1.12.0
func (r ResponseRackAssignments) Len() int
func (ResponseRackAssignments) Less ¶ added in v1.12.0
func (r ResponseRackAssignments) Less(i, j int) bool
func (ResponseRackAssignments) Swap ¶ added in v1.12.0
func (r ResponseRackAssignments) Swap(i, j int)
type User ¶
type User struct { ID string `json:"id,omitempty"` Email string `json:"email"` Name string `json:"name"` Role string `json:"role"` RoleVia uuid.UUID `json:"role_via,omitempty"` }
User represents a person able to access the Conch API or UI
type UserDetailed ¶ added in v1.7.0
type UserDetailed struct { ID uuid.UUID `json:"id"` Name string `json:"name"` Email string `json:"email"` Created time.Time `json:"created"` LastLogin time.Time `json:"last_login"` RefuseSessionAuth bool `json:"refuse_session_auth"` ForcePasswordChange bool `json:"force_password_change"` Workspaces WorkspacesAndRoles `json:"workspaces,omitempty"` IsAdmin bool `json:"is_admin"` }
UserDetailed ...
type UserProfile ¶ added in v1.10.0
type UserProfile struct { Created time.Time `json:"created"` Email string `json:"email"` ForcePasswordChange bool `json:"force_password_change"` ID uuid.UUID `json:"id"` LastLogin time.Time `json:"last_login"` Name string `json:"name"` RefuseSessionAuth bool `json:"refuse_session_auth"` Workspaces WorkspacesAndRoles `json:"workspaces"` }
type UserToken ¶ added in v1.12.0
type UserToken struct { Name string `json:"name"` Created time.Time `json:"created"` LastUsed time.Time `json:"last_used,omitempty"` Expires time.Time `json:"expires"` }
corresponds to conch.git/json-schema/response.yaml;UserToken
type UserTokens ¶ added in v1.12.0
type UserTokens []UserToken
func (UserTokens) Len ¶ added in v1.12.0
func (u UserTokens) Len() int
func (UserTokens) Less ¶ added in v1.12.0
func (u UserTokens) Less(i, j int) bool
func (UserTokens) Swap ¶ added in v1.12.0
func (u UserTokens) Swap(i, j int)
type UsersDetailed ¶ added in v1.10.0
type UsersDetailed []UserDetailed
func (UsersDetailed) Len ¶ added in v1.10.0
func (u UsersDetailed) Len() int
func (UsersDetailed) Less ¶ added in v1.10.0
func (u UsersDetailed) Less(i, j int) bool
func (UsersDetailed) Swap ¶ added in v1.10.0
func (u UsersDetailed) Swap(i, j int)
type Validation ¶
type Validation struct { ID uuid.UUID `json:"id"` Name string `json:"name"` Version int `json:"version"` Description string `json:"description"` Created time.Time `json:"created"` Updated time.Time `json:"updated"` Deactivated time.Time `json:"deactivated"` }
Validation represents device validations loaded into Conch
type ValidationPlan ¶
type ValidationPlan struct { ID uuid.UUID `json:"id"` Name string `json:"name"` Description string `json:"description"` Created time.Time `json:"created"` }
ValidationPlan represents an organized association of Validations
type ValidationPlanExecution ¶ added in v1.8.0
type ValidationPlanExecution struct { ID uuid.UUID `json:"id"` Name string `json:"name"` Validations ValidationRuns `json:"validations"` }
type ValidationReport ¶
type ValidationReport struct { ComponentID uuid.UUID `json:"component_id"` ComponentName string `json:"component_name"` ComponentType string `json:"component_type"` CriteriaID uuid.UUID `json:"criteria_id"` Log string `json:"log"` Metric interface{} `json:"metric"` Status int `json:"status"` // Can use the ValidationReportStatus consts to understand status }
ValidationReport represents the result from the validation engine, comparing field data to expectations.
type ValidationResult ¶
type ValidationResult struct { ID uuid.UUID `json:"id"` Category string `json:"category"` ComponentID string `json:"component_id"` DeviceID string `json:"device_id"` HardwareProduct uuid.UUID `json:"hardware_product_id"` Hint string `json:"hint"` Message string `json:"message"` Status string `json:"status"` ValidationID uuid.UUID `json:"validation_id"` }
ValidationResult is a result of running a validation on a device
type ValidationRun ¶ added in v1.8.0
type ValidationRun struct { ID uuid.UUID `json:"id"` Name string `json:"name"` Passed bool `json:"passed"` Results []ValidationResult `json:"results"` }
type ValidationRuns ¶ added in v1.8.0
type ValidationRuns []ValidationRun
func (ValidationRuns) Len ¶ added in v1.8.0
func (v ValidationRuns) Len() int
func (ValidationRuns) Less ¶ added in v1.8.0
func (v ValidationRuns) Less(i, j int) bool
func (ValidationRuns) Swap ¶ added in v1.8.0
func (v ValidationRuns) Swap(i, j int)
type ValidationState ¶
type ValidationState struct { ID uuid.UUID `json:"id"` Created time.Time `json:"created"` Completed time.Time `json:"completed"` DeviceID string `json:"device_id"` Results []ValidationResult `json:"results"` Status string `json:"status"` ValidationPlanID uuid.UUID `json:"validation_plan_id"` }
ValidationState is the result of running a validation plan on a device
type Validations ¶ added in v1.12.0
type Validations []Validation
func (Validations) Len ¶ added in v1.12.0
func (v Validations) Len() int
func (Validations) Less ¶ added in v1.12.0
func (v Validations) Less(i, j int) bool
func (Validations) Swap ¶ added in v1.12.0
func (v Validations) Swap(i, j int)
type Workspace ¶
type Workspace struct { ID uuid.UUID `json:"id"` Name string `json:"name"` Description string `json:"description,omitempty"` Role string `json:"role"` ParentID uuid.UUID `json:"parent_id,omitempty"` }
Workspace represents a Conch data partition which allows users to create custom lists of hardware
type WorkspaceAndRole ¶ added in v1.7.0
WorkspaceAndRole ...
type WorkspaceRack ¶ added in v1.12.0
type WorkspaceRack struct { ID uuid.UUID `json:"id"` Name string `json:"name"` Role string `json:"role"` Unit int `json:"unit"` // BUG(sungo): This exists because device locations provide rack info, but also slot info. This is a sloppy combination of data streams Size int `json:"size"` Datacenter string `json:"datacenter"` Slots WorkspaceRackSlots `json:"slots,omitempty"` SerialNumber string `json:"serial_number"` AssetTag string `json:"asset_tag"` Phase string `json:"phase"` }
type WorkspaceRackLayoutAssignments ¶ added in v1.10.0
This is a piece of fun from /workspace/:id/rack/:id/layout
The payload looks like: { "my-device-id": 47 }
Where '47' is the rack unit start for the device
type WorkspaceRackSlot ¶ added in v1.12.0
type WorkspaceRackSlots ¶ added in v1.12.0
type WorkspaceRackSlots []WorkspaceRackSlot
func (WorkspaceRackSlots) Len ¶ added in v1.12.0
func (r WorkspaceRackSlots) Len() int
func (WorkspaceRackSlots) Less ¶ added in v1.12.0
func (r WorkspaceRackSlots) Less(i, j int) bool
func (WorkspaceRackSlots) Swap ¶ added in v1.12.0
func (r WorkspaceRackSlots) Swap(i, j int)
type WorkspaceRelay ¶ added in v1.8.0
type WorkspaceRelay struct { ID string `json:"id"` // *not* a UUID Created time.Time `json:"created"` Updated time.Time `json:"updated"` Alias string `json:"alias"` IPAddr string `json:"ipaddr"` SSHPort int `json:"ssh_port"` Version string `json:"version"` LastSeen time.Time `json:"last_seen"` NumDevices int `json:"num_devices"` Location WorkspaceRelayLocation `json:"location"` }
WorkspaceRelay represents a Conch Relay unit, a physical piece of hardware that mediates Livesys interactions in the field
type WorkspaceRelayLocation ¶ added in v1.8.0
type WorkspaceRelayLocation struct { Az string `json:"az"` RackID uuid.UUID `json:"rack_id"` RackName string `json:"rack_name"` RackUnitStart int `json:"rack_unit_start"` RoleName string `json:"role_name"` }
WorkspaceRelayLocation ...
type WorkspaceRelays ¶ added in v1.8.0
type WorkspaceRelays []WorkspaceRelay
WorkspaceRelays ...
func (WorkspaceRelays) Len ¶ added in v1.10.0
func (w WorkspaceRelays) Len() int
func (WorkspaceRelays) Less ¶ added in v1.10.0
func (w WorkspaceRelays) Less(i, j int) bool
func (WorkspaceRelays) Swap ¶ added in v1.10.0
func (w WorkspaceRelays) Swap(i, j int)
type WorkspaceUser ¶ added in v1.7.0
WorkspaceUser ...
type Workspaces ¶ added in v1.8.0
type Workspaces []Workspace
func (Workspaces) Len ¶ added in v1.8.0
func (w Workspaces) Len() int
func (Workspaces) Less ¶ added in v1.8.0
func (w Workspaces) Less(i, j int) bool
func (Workspaces) Swap ¶ added in v1.8.0
func (w Workspaces) Swap(i, j int)
type WorkspacesAndRoles ¶ added in v1.10.0
type WorkspacesAndRoles []WorkspaceAndRole
func (WorkspacesAndRoles) Len ¶ added in v1.10.0
func (w WorkspacesAndRoles) Len() int
func (WorkspacesAndRoles) Less ¶ added in v1.10.0
func (w WorkspacesAndRoles) Less(i, j int) bool
func (WorkspacesAndRoles) Swap ¶ added in v1.10.0
func (w WorkspacesAndRoles) Swap(i, j int)
Notes ¶
Bugs ¶
an awfully simplistic view of the world
do we really want to throw away parse errors?
This exists because device locations provide rack info, but also slot info. This is a sloppy combination of data streams