Documentation ¶
Index ¶
- Constants
- type ApiClient
- func (c *ApiClient) AppendUserAgent(userAgent string) *ApiClient
- func (c *ApiClient) CreateGroup(groupName string, maxSpaces uint32, computeUnits uint32, storageUnits uint32, ...) (string, int, error)
- func (c *ApiClient) CreateRole(roleName string, permissions []uint16) (string, int, error)
- func (c *ApiClient) CreateSpace(space *model.Space) (int, error)
- func (c *ApiClient) CreateTemplate(name string, job string, description string, volumes string, groups []string, ...) (string, int, error)
- func (c *ApiClient) CreateTemplateVar(name string, location string, local bool, value string, protected bool, ...) (string, int, error)
- func (c *ApiClient) CreateToken(name string) (string, int, error)
- func (c *ApiClient) CreateUser(request *CreateUserRequest) (string, int, error)
- func (c *ApiClient) CreateVolume(name string, definition string, localContainer bool) (*VolumeCreateResponse, int, error)
- func (c *ApiClient) DeleteGroup(groupId string) (int, error)
- func (c *ApiClient) DeleteRole(roleId string) (int, error)
- func (c *ApiClient) DeleteSpace(spaceId string) (int, error)
- func (c *ApiClient) DeleteTemplate(templateId string) (int, error)
- func (c *ApiClient) DeleteTemplateVar(templateVarId string) (int, error)
- func (c *ApiClient) DeleteToken(tokenId string) (int, error)
- func (c *ApiClient) DeleteUser(userId string) error
- func (c *ApiClient) DeleteVolume(volumeId string) (int, error)
- func (c *ApiClient) GetAuditLogs(start int, maxItems int) (*AuditLogs, int, error)
- func (c *ApiClient) GetGroup(groupId string) (*GroupInfo, int, error)
- func (c *ApiClient) GetGroups() (*GroupInfoList, int, error)
- func (c *ApiClient) GetPermissions() (*PermissionInfoList, int, error)
- func (c *ApiClient) GetRole(roleId string) (*RoleDetails, int, error)
- func (c *ApiClient) GetRoles() (*RoleInfoList, int, error)
- func (c *ApiClient) GetSpace(spaceId string) (*model.Space, int, error)
- func (c *ApiClient) GetSpaceServiceState(spaceId string) (*SpaceServiceState, int, error)
- func (c *ApiClient) GetSpaces(userId string) (*SpaceInfoList, int, error)
- func (c *ApiClient) GetTemplate(templateId string) (*TemplateDetails, int, error)
- func (c *ApiClient) GetTemplateVar(templateVarId string) (*TemplateVarValue, int, error)
- func (c *ApiClient) GetTemplateVars() (*TemplateVarList, int, error)
- func (c *ApiClient) GetTemplates() (*TemplateList, int, error)
- func (c *ApiClient) GetTokens() (*[]TokenInfo, int, error)
- func (c *ApiClient) GetTunnelDomain() (string, int, error)
- func (c *ApiClient) GetTunnels() ([]TunnelInfo, int, error)
- func (c *ApiClient) GetUser(userId string) (*model.User, error)
- func (c *ApiClient) GetUserQuota(userId string) (*UserQuota, error)
- func (c *ApiClient) GetUsers(state string, location string) (*UserInfoList, error)
- func (c *ApiClient) GetVolume(volumeId string) (*VolumeDefinition, int, error)
- func (c *ApiClient) GetVolumeObject(volumeId string) (*model.Volume, int, error)
- func (c *ApiClient) GetVolumes() (*VolumeInfoList, int, error)
- func (c *ApiClient) Login(email string, password string) (string, int, error)
- func (c *ApiClient) LoginUserToken(userId string, token string) error
- func (c *ApiClient) Logout() error
- func (c *ApiClient) Ping() (string, error)
- func (c *ApiClient) SetAuthToken(token string) *ApiClient
- func (c *ApiClient) SetBaseUrl(baseURL string) *ApiClient
- func (c *ApiClient) StartSpace(spaceId string) (int, error)
- func (c *ApiClient) StartVolume(volumeId string) (*StartVolumeResponse, int, error)
- func (c *ApiClient) StopSpace(spaceId string) (int, error)
- func (c *ApiClient) StopVolume(volumeId string) (int, error)
- func (c *ApiClient) UpdateGroup(groupId string, groupName string, maxSpaces uint32, computeUnits uint32, ...) (int, error)
- func (c *ApiClient) UpdateRole(roleId string, roleName string, permissions []uint16) (int, error)
- func (c *ApiClient) UpdateSpace(space *model.Space) (int, error)
- func (c *ApiClient) UpdateTemplate(templateId string, name string, job string, description string, volumes string, ...) (int, error)
- func (c *ApiClient) UpdateTemplateVar(templateVarId string, name string, location string, local bool, value string, ...) (int, error)
- func (c *ApiClient) UpdateUser(user *model.User) error
- func (c *ApiClient) UpdateVolume(volumeId string, name string, definition string) (int, error)
- func (c *ApiClient) UseSessionCookie(useCookie bool) *ApiClient
- func (c *ApiClient) WhoAmI() (*model.User, error)
- type AuditLogEntry
- type AuditLogs
- type AuthLoginRequest
- type AuthLoginResponse
- type AuthLogoutResponse
- type CreateSpaceRequest
- type CreateSpaceResponse
- type CreateTokenRequest
- type CreateTokenResponse
- type CreateUserRequest
- type CreateUserResponse
- type GroupInfo
- type GroupInfoList
- type GroupResponse
- type PermissionInfo
- type PermissionInfoList
- type PingResponse
- type RoleDetails
- type RoleInfo
- type RoleInfoList
- type RoleResponse
- type SpaceDefinition
- type SpaceInfo
- type SpaceInfoList
- type SpaceRequest
- type SpaceServiceState
- type StartVolumeResponse
- type TemplateCreateRequest
- type TemplateCreateResponse
- type TemplateDetails
- type TemplateDetailsDay
- type TemplateInfo
- type TemplateList
- type TemplateUpdateRequest
- type TemplateVar
- type TemplateVarCreateResponse
- type TemplateVarList
- type TemplateVarValue
- type TokenInfo
- type TunnelInfo
- type UpdateSpaceRequest
- type UpdateUserRequest
- type UserGroupRequest
- type UserInfo
- type UserInfoList
- type UserQuota
- type UserResponse
- type UserRoleRequest
- type VolumeCreateRequest
- type VolumeCreateResponse
- type VolumeDefinition
- type VolumeInfo
- type VolumeInfoList
- type VolumeStartRequest
- type VolumeStartResponse
- type VolumeStartStopRequest
- type VolumeStartStopResponse
- type VolumeStopRequest
- type VolumeStopResponse
- type VolumeUpdateRequest
Constants ¶
View Source
const ( AuthToken = iota AuthSessionCookie AuthRemoteServerToken )
Enum for authorization methods
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApiClient ¶
type ApiClient struct {
// contains filtered or unexported fields
}
func NewRemoteSession ¶
func NewRemoteToken ¶
func (*ApiClient) AppendUserAgent ¶
func (*ApiClient) CreateGroup ¶
func (*ApiClient) CreateRole ¶ added in v0.12.0
func (*ApiClient) CreateTemplate ¶
func (c *ApiClient) CreateTemplate(name string, job string, description string, volumes string, groups []string, localContainer bool, IsManual bool, withTerminal bool, withVSCodeTunnel bool, withCodeServer bool, withSSH bool, computeUnits uint32, storageUnits uint32, scheduleEnabled bool, schedule *[]TemplateDetailsDay) (string, int, error)
func (*ApiClient) CreateTemplateVar ¶
func (*ApiClient) CreateUser ¶
func (c *ApiClient) CreateUser(request *CreateUserRequest) (string, int, error)
func (*ApiClient) CreateVolume ¶
func (*ApiClient) DeleteRole ¶ added in v0.12.0
func (*ApiClient) DeleteTemplate ¶
func (*ApiClient) DeleteTemplateVar ¶
func (*ApiClient) DeleteUser ¶
func (*ApiClient) GetAuditLogs ¶ added in v0.12.9
func (*ApiClient) GetPermissions ¶ added in v0.12.0
func (c *ApiClient) GetPermissions() (*PermissionInfoList, int, error)
func (*ApiClient) GetRole ¶ added in v0.12.0
func (c *ApiClient) GetRole(roleId string) (*RoleDetails, int, error)
func (*ApiClient) GetRoles ¶ added in v0.12.0
func (c *ApiClient) GetRoles() (*RoleInfoList, int, error)
func (*ApiClient) GetSpaceServiceState ¶
func (c *ApiClient) GetSpaceServiceState(spaceId string) (*SpaceServiceState, int, error)
func (*ApiClient) GetSpaces ¶
func (c *ApiClient) GetSpaces(userId string) (*SpaceInfoList, int, error)
func (*ApiClient) GetTemplate ¶
func (c *ApiClient) GetTemplate(templateId string) (*TemplateDetails, int, error)
func (*ApiClient) GetTemplateVar ¶
func (c *ApiClient) GetTemplateVar(templateVarId string) (*TemplateVarValue, int, error)
func (*ApiClient) GetTemplateVars ¶
func (c *ApiClient) GetTemplateVars() (*TemplateVarList, int, error)
func (*ApiClient) GetTemplates ¶
func (c *ApiClient) GetTemplates() (*TemplateList, int, error)
func (*ApiClient) GetTunnelDomain ¶ added in v0.12.7
func (*ApiClient) GetTunnels ¶ added in v0.12.7
func (c *ApiClient) GetTunnels() ([]TunnelInfo, int, error)
func (*ApiClient) GetUserQuota ¶ added in v0.12.0
func (*ApiClient) GetUsers ¶
func (c *ApiClient) GetUsers(state string, location string) (*UserInfoList, error)
func (*ApiClient) GetVolume ¶
func (c *ApiClient) GetVolume(volumeId string) (*VolumeDefinition, int, error)
func (*ApiClient) GetVolumeObject ¶
func (*ApiClient) GetVolumes ¶
func (c *ApiClient) GetVolumes() (*VolumeInfoList, int, error)
func (*ApiClient) LoginUserToken ¶ added in v0.10.0
Login to the server using a user ID and token
func (*ApiClient) SetAuthToken ¶
func (*ApiClient) SetBaseUrl ¶
func (*ApiClient) StartVolume ¶
func (c *ApiClient) StartVolume(volumeId string) (*StartVolumeResponse, int, error)
func (*ApiClient) UpdateGroup ¶
func (*ApiClient) UpdateRole ¶ added in v0.12.0
func (*ApiClient) UpdateTemplate ¶
func (c *ApiClient) UpdateTemplate(templateId string, name string, job string, description string, volumes string, groups []string, withTerminal bool, withVSCodeTunnel bool, withCodeServer bool, withSSH bool, computeUnits uint32, storageUnits uint32, scheduleEnabled bool, schedule *[]TemplateDetailsDay) (int, error)
func (*ApiClient) UpdateTemplateVar ¶
func (*ApiClient) UpdateVolume ¶
func (*ApiClient) UseSessionCookie ¶
type AuditLogEntry ¶ added in v0.12.9
type AuditLogs ¶ added in v0.12.9
type AuditLogs struct { Count int `json:"count"` Items []AuditLogEntry `json:"items"` }
type AuthLoginRequest ¶
type AuthLoginResponse ¶
type AuthLogoutResponse ¶
type AuthLogoutResponse struct {
Status bool `json:"status"`
}
type CreateSpaceRequest ¶
type CreateSpaceRequest = SpaceRequest
type CreateSpaceResponse ¶
type CreateTokenRequest ¶
type CreateTokenRequest struct {
Name string `json:"name"`
}
type CreateTokenResponse ¶
type CreateUserRequest ¶
type CreateUserRequest = userRequest
type CreateUserResponse ¶
type GroupInfoList ¶
type GroupResponse ¶
type PermissionInfo ¶ added in v0.12.0
type PermissionInfoList ¶ added in v0.12.0
type PermissionInfoList struct { Count int `json:"count"` Permissions []PermissionInfo `json:"permissions"` }
type PingResponse ¶
type RoleDetails ¶ added in v0.12.0
type RoleInfoList ¶ added in v0.12.0
type RoleResponse ¶ added in v0.12.0
type SpaceDefinition ¶
type SpaceDefinition struct { UserId string `json:"user_id"` TemplateId string `json:"template_id"` Name string `json:"name"` Shell string `json:"shell"` Location string `json:"location"` AltNames []string `json:"alt_names"` IsDeployed bool `json:"is_deployed"` IsPending bool `json:"is_pending"` IsDeleting bool `json:"is_deleting"` VolumeData map[string]model.SpaceVolume `json:"volume_data"` }
type SpaceInfo ¶
type SpaceInfo struct { Id string `json:"space_id"` Name string `json:"name"` TemplateName string `json:"template_name"` TemplateId string `json:"template_id"` Location string `json:"location"` Username string `json:"username"` UserId string `json:"user_id"` LocalContainer bool `json:"local_container"` IsManual bool `json:"is_manual"` }
type SpaceInfoList ¶
type SpaceRequest ¶
type SpaceServiceState ¶
type SpaceServiceState struct { Name string `json:"name"` Location string `json:"location"` HasCodeServer bool `json:"has_code_server"` HasSSH bool `json:"has_ssh"` HasHttpVNC bool `json:"has_http_vnc"` HasTerminal bool `json:"has_terminal"` HasState bool `json:"has_state"` IsDeployed bool `json:"is_deployed"` IsPending bool `json:"is_pending"` IsDeleting bool `json:"is_deleting"` TcpPorts map[string]string `json:"tcp_ports"` HttpPorts map[string]string `json:"http_ports"` UpdateAvailable bool `json:"update_available"` IsRemote bool `json:"is_remote"` HasVSCodeTunnel bool `json:"has_vscode_tunnel"` VSCodeTunnel string `json:"vscode_tunnel_name"` }
type StartVolumeResponse ¶
type TemplateCreateRequest ¶ added in v0.11.0
type TemplateCreateRequest struct { Name string `json:"name"` Job string `json:"job"` Description string `json:"description"` Volumes string `json:"volumes"` Groups []string `json:"groups"` LocalContainer bool `json:"local_container"` IsManual bool `json:"is_manual"` WithTerminal bool `json:"with_terminal"` WithVSCodeTunnel bool `json:"with_vscode_tunnel"` WithCodeServer bool `json:"with_code_server"` WithSSH bool `json:"with_ssh"` ScheduleEnabled bool `json:"schedule_enabled"` Schedule []TemplateDetailsDay `json:"schedule"` ComputeUnits uint32 `json:"compute_units"` StorageUnits uint32 `json:"storage_units"` }
type TemplateCreateResponse ¶
type TemplateDetails ¶
type TemplateDetails struct { Name string `json:"name"` Job string `json:"job"` Description string `json:"description"` Volumes string `json:"volumes"` Usage int `json:"usage"` Hash string `json:"hash"` Deployed int `json:"deployed"` Groups []string `json:"groups"` LocalContainer bool `json:"local_container"` IsManual bool `json:"is_manual"` WithTerminal bool `json:"with_terminal"` WithVSCodeTunnel bool `json:"with_vscode_tunnel"` WithCodeServer bool `json:"with_code_server"` WithSSH bool `json:"with_ssh"` ComputeUnits uint32 `json:"compute_units"` StorageUnits uint32 `json:"storage_units"` ScheduleEnabled bool `json:"schedule_enabled"` Schedule []TemplateDetailsDay `json:"schedule"` }
type TemplateDetailsDay ¶ added in v0.12.0
type TemplateInfo ¶
type TemplateInfo struct { Id string `json:"template_id"` Name string `json:"name"` Description string `json:"description"` Usage int `json:"usage"` Deployed int `json:"deployed"` Groups []string `json:"groups"` LocalContainer bool `json:"local_container"` IsManual bool `json:"is_manual"` ScheduleEnabled bool `json:"schedule_enabled"` ComputeUnits uint32 `json:"compute_units"` StorageUnits uint32 `json:"storage_units"` Schedule []TemplateDetailsDay `json:"schedule"` }
type TemplateList ¶
type TemplateList struct { Count int `json:"count"` Templates []TemplateInfo `json:"templates"` }
type TemplateUpdateRequest ¶ added in v0.11.0
type TemplateUpdateRequest struct { Name string `json:"name"` Job string `json:"job"` Description string `json:"description"` Volumes string `json:"volumes"` Groups []string `json:"groups"` WithTerminal bool `json:"with_terminal"` WithVSCodeTunnel bool `json:"with_vscode_tunnel"` WithCodeServer bool `json:"with_code_server"` WithSSH bool `json:"with_ssh"` ScheduleEnabled bool `json:"schedule_enabled"` Schedule []TemplateDetailsDay `json:"schedule"` ComputeUnits uint32 `json:"compute_units"` StorageUnits uint32 `json:"storage_units"` }
type TemplateVar ¶
type TemplateVarList ¶
type TemplateVarList struct { Count int `json:"count"` TemplateVar []TemplateVar `json:"variables"` }
type TemplateVarValue ¶
type TunnelInfo ¶ added in v0.12.7
type UpdateSpaceRequest ¶
type UpdateSpaceRequest = SpaceRequest
type UpdateUserRequest ¶
type UpdateUserRequest = userRequest
type UserGroupRequest ¶
type UserInfo ¶
type UserInfo struct { Id string `json:"user_id"` Username string `json:"username"` Email string `json:"email"` Roles []string `json:"roles"` Groups []string `json:"groups"` Active bool `json:"active"` MaxSpaces uint32 `json:"max_spaces"` ComputeUnits uint32 `json:"compute_units"` StorageUnits uint32 `json:"storage_units"` MaxTunnels uint32 `json:"max_tunnels"` Current bool `json:"current"` LastLoginAt *time.Time `json:"last_login_at"` NumberSpaces int `json:"number_spaces"` NumberSpacesDeployed int `json:"number_spaces_deployed"` NumberSpacesDeployedInLocation int `json:"number_spaces_deployed_in_location"` UsedComputeUnits uint32 `json:"used_compute_units"` UsedStorageUnits uint32 `json:"used_storage_units"` }
type UserInfoList ¶
type UserQuota ¶ added in v0.12.0
type UserQuota struct { MaxSpaces uint32 `json:"max_spaces"` ComputeUnits uint32 `json:"compute_units"` StorageUnits uint32 `json:"storage_units"` MaxTunnels uint32 `json:"max_tunnels"` NumberSpaces int `json:"number_spaces"` NumberSpacesDeployed int `json:"number_spaces_deployed"` UsedComputeUnits uint32 `json:"used_compute_units"` UsedStorageUnits uint32 `json:"used_storage_units"` UsedTunnels uint32 `json:"used_tunnels"` }
type UserResponse ¶
type UserResponse struct { Id string `json:"user_id"` Username string `json:"username"` Email string `json:"email"` ServicePassword string `json:"service_password"` Roles []string `json:"roles"` Groups []string `json:"groups"` Active bool `json:"active"` MaxSpaces uint32 `json:"max_spaces"` ComputeUnits uint32 `json:"compute_units"` StorageUnits uint32 `json:"storage_units"` MaxTunnels uint32 `json:"max_tunnels"` SSHPublicKey string `json:"ssh_public_key"` GitHubUsername string `json:"github_username"` PreferredShell string `json:"preferred_shell"` Timezone string `json:"timezone"` Current bool `json:"current"` LastLoginAt *time.Time `json:"last_login_at"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
type UserRoleRequest ¶ added in v0.12.0
type VolumeCreateRequest ¶ added in v0.11.0
type VolumeCreateResponse ¶
type VolumeDefinition ¶
type VolumeInfo ¶
type VolumeInfoList ¶
type VolumeInfoList struct { Count int `json:"count"` Volumes []VolumeInfo `json:"volumes"` }
type VolumeStartRequest ¶
type VolumeStartRequest = VolumeStartStopRequest
type VolumeStartResponse ¶
type VolumeStartResponse = VolumeStartStopResponse
type VolumeStartStopRequest ¶
type VolumeStartStopRequest struct {
Location string `json:"location"`
}
type VolumeStartStopResponse ¶
type VolumeStopRequest ¶
type VolumeStopRequest = VolumeStartStopRequest
type VolumeStopResponse ¶
type VolumeStopResponse = VolumeStartStopResponse
type VolumeUpdateRequest ¶ added in v0.11.0
Click to show internal directories.
Click to hide internal directories.