Documentation
¶
Overview ¶
Package api provides functions to interact with the account API.
Package api provides functions to interact with the agents API.
Package api provides functions to interact with the auth API.
Package api provides functions to interact with the nexus API.
Package api provides functions to interact with the nexus API.
Package api provides functions to interact with the node API.
Package api provides functions to interact with the operator API.
Package api provides functions to interact with the project API.
Package api provides functions to interact with the redundancy class API.
Package api provides functions to interact with the swarm API.
Package api provides functions to interact with the tenant API.
Index ¶
- Constants
- func ConnectSwarm(urls configuration.URLs, accessToken, tenantID, swarmID string, ...) error
- func CreateTenantAccounts(urls configuration.URLs, accessToken, tenantID string, emails []string) error
- func DeleteAgent(urls configuration.URLs, accessToken string, swarmID string, nexusID string, ...) error
- func DeleteGateway(urls configuration.URLs, accessToken string, tenantID string, gatewayID string) error
- func DeleteNexus(urls configuration.URLs, accessToken string, swarmID string, nexusID string) error
- func DeleteNode(urls configuration.URLs, accessToken string, swarmID, nexusID, nodeID string) error
- func DeleteTenantAccountSessions(urls configuration.URLs, accessToken, tenantID, accountID string) error
- func DownloadReport(output string, downloadedFile *string) request_utils.RequestModifier
- func DownloadTenantReport(urls configuration.URLs, accessToken, tenantID, from, to, output string) (*string, error)
- func EditOperatorRoleInSwarm(urls configuration.URLs, accessToken, swarmID, operatorID string, ...) error
- func EditOperatorRoleInTenant(urls configuration.URLs, accessToken, tenantID, operatorID string, ...) error
- func EditSwarm(urls configuration.URLs, accessToken string, swarmID string, ...) error
- func EditTenant(urls configuration.URLs, accessToken string, tenantID string, ...) error
- func EditTenantImage(urls configuration.URLs, accessToken, tenantID, imageURL string) error
- func EditTenantSettings(urls configuration.URLs, accessToken string, tenantID string, ...) error
- func ExtractGenericModel(response any) request_utils.RequestModifier
- func GetDeviceAPIKey(urls configuration.URLs, deviceID string) (string, error)
- func InviteOperatorToSwarm(urls configuration.URLs, accessToken, swarmID string, ...) error
- func InviteOperatorToTenant(urls configuration.URLs, accessToken, tenantID string, ...) error
- func PromoteOperator(urls configuration.URLs, email, policyName, secret string) error
- func RemoveSwarm(urls configuration.URLs, accessToken, swarmID string) error
- func RemoveSwarmOperator(urls configuration.URLs, accessToken, swarmID, operatorID string) error
- func RemoveTenant(urls configuration.URLs, accessToken, tenantID string) error
- func RemoveTenantAccount(urls configuration.URLs, accessToken, tenantID, accountID string) error
- func RemoveTenantOperator(urls configuration.URLs, accessToken, tenantID, operatorID string) error
- func RemoveTenantProject(urls configuration.URLs, accessToken, tenantID, projectID string) error
- func RestoreTenantAccount(urls configuration.URLs, accessToken, tenantID, accountID string) error
- func RestoreTenantProject(urls configuration.URLs, accessToken, tenantID, projectID string) error
- func ToggleBanAccount(urls configuration.URLs, accessToken, tenantID string, accountID string, ...) error
- func ToggleBanProject(urls configuration.URLs, accessToken, tenantID string, projectID string, ...) error
- func UpdateAccount(urls configuration.URLs, accessToken, tenantID, accountID string, ...) error
- func UpdateAgent(urls configuration.URLs, accessToken string, swarmID string, nexusID string, ...) error
- func UpdateGateway(urls configuration.URLs, accessToken string, tenantID string, gatewayID string, ...) error
- func UpdateNexus(urls configuration.URLs, accessToken string, swarmID string, nexusID string, ...) error
- func UpdateNode(urls configuration.URLs, accessToken string, swarmID, nexusID, nodeID string, ...) error
- func UpdateProject(urls configuration.URLs, accessToken, tenantID, projectID string, ...) error
- func VerifyDNS(urls configuration.URLs, accessToken string, tenantID string) error
- type APIKeyResponse
- type Account
- type AccountAuthProvider
- type AccountEmail
- type AgentConfig
- type AgentModel
- type AgentVolume
- type AnsibleConfig
- type BulkInsertNewAgentRequestBody
- type BulkInsertNewNodeRequestBody
- type ChallengeResponseModel
- type ChangeOperatorPolicyRequestBody
- type CreateGatewayRequestBody
- type CreateNewAgentRequestBody
- type CreateNewNodeRequestBody
- type CreateNexusRequestBody
- type CreateNodeBodyRequest
- type CreateRedundancyClassRequestBody
- type CreateSwarmRequest
- type CreateTenantRequestBody
- type DNSChallengeRecord
- type DeviceRegistrationResponse
- type Distributor
- type DistributorCoupon
- type DistributorCouponCodeResponseModel
- type DistributorCouponList
- type DistributorList
- type DistributorReportResponseModel
- type EnabledAuthProvidersConfig
- type ErrorResponseModel
- type EvaluatedStatusType
- type ExpansionStatus
- type Gateway
- type GatewayInstance
- type GatewayInstanceListResponse
- type GatewayStatus
- type GatewayTenant
- type GatewayWithGatewayTenant
- type GenericIDResponseModel
- func AssignTenantToCoupon(urls configuration.URLs, accessToken, tenantID, CouponCode string) (*GenericIDResponseModel, error)
- func CreateProject(urls configuration.URLs, accessToken, name string, description *string, ...) (*GenericIDResponseModel, error)
- func CreateSwarm(urls configuration.URLs, accessToken string, req CreateSwarmRequest) (*GenericIDResponseModel, error)
- func CreateTenant(urls configuration.URLs, accessToken string, req CreateTenantRequestBody) (*GenericIDResponseModel, error)
- type GenericPaginatedResponse
- func GetAgent(urls configuration.URLs, accessToken string, ...) (*GenericPaginatedResponse[*NewAgent], error)
- func ListAgents(urls configuration.URLs, accessToken string, swarmID string, ...) (*GenericPaginatedResponse[*NewAgent], error)
- func ListAgentsForRC(urls configuration.URLs, accessToken string, swarmID string, rcID, sort string, ...) (*GenericPaginatedResponse[*NewAgent], error)
- func ListGateways(urls configuration.URLs, accessToken string, tenantID string, sort string, ...) (*GenericPaginatedResponse[*Gateway], error)
- func ListNexuses(urls configuration.URLs, accessToken string, swarmID string, sort string, ...) (*GenericPaginatedResponse[*Nexus], error)
- func ListNodes(urls configuration.URLs, accessToken string, swarmID string, ...) (*GenericPaginatedResponse[*NewNode], error)
- func ListRedundancyClasses(urls configuration.URLs, accessToken, swamID, sort, filter string) (*GenericPaginatedResponse[*RedundancyClass], error)
- func ListSwarmsV2(urls configuration.URLs, accessToken string, sort string, filter string) (*GenericPaginatedResponse[*Swarm], error)
- func ListTenantAccounts(urls configuration.URLs, accessToken, tenantID, sort, filter string) (*GenericPaginatedResponse[*Account], error)
- func ListTenantProjects(urls configuration.URLs, accessToken, tenantID, sort, filter string) (*GenericPaginatedResponse[*ProjectItem], error)
- func ListTenants(urls configuration.URLs, accessToken, sort, filter string) (*GenericPaginatedResponse[*Tenant], error)
- type GetAgentEvaluatedStatusResponse
- type HumanReadableDistributorCoupon
- type HumanReadableStatus
- type InviteOperatorRequestBody
- type MonitoredResourceForSeverityNotifications
- type NewAgent
- type NewAgentResponse
- type NewAgentsResponse
- type NewNode
- type NewNodeResponseItem
- type NewNodesResponse
- type Nexus
- type NexusList
- type Node
- type NodeConfig
- type NodeList
- type Notification
- type Operator
- func GetOperator(urls configuration.URLs, accessToken, meOrID string) (*Operator, error)
- func GetOperatorSelf(urls configuration.URLs, accessToken string) (*Operator, error)
- func GetSwarmOperator(urls configuration.URLs, accessToken, swarmID, operatorID string) (*Operator, error)
- func GetTenantOperator(urls configuration.URLs, accessToken, tenantID, operatorID string) (*Operator, error)
- type OperatorEmail
- type OperatorList
- type Policy
- type PolicyList
- type ProjectItem
- type ProjectReport
- type Provider
- type ProviderList
- type RCProgress
- type RCSession
- type RCSessionStatus
- type RecoveryProgress
- type RecoveryStatus
- type RedundancyClass
- type RedundancyClassErrorData
- type RedundancyClassExpanded
- type RedundancyClassList
- type RedundancyClassRecovery
- type Ring
- type RingBulk
- type RingList
- type RingNexus
- type RingNode
- type Severity
- type SeverityForNotificationType
- type SeverityNotificationType
- type SummaryDetails
- type SummaryDetailsWithStatusNullable
- type SummaryStatusNullable
- type Swarm
- type SwarmList
- type Tenant
- type TenantList
- type TenantReport
- type TenantReportResponseModel
- type TenantSettings
- type TenantSettingsAccount
- type TenantSettingsProject
- type TenantSwarm
- type TenantSwarmList
- type TokenAndExpirationResponseModel
- type URLBuilder
- type UpdateAccountRequest
- type UpdateAgentVolumeRequest
- type UpdateGatewayRequestBody
- type UpdateNewAgentRequestBody
- type UpdateNewNodeRequestBody
- type UpdateNexusRequestBody
- type UpdateNodeBodyRequest
- type UpdateSwarmRequest
- type UpdateTenantProjectRequestBody
- type UpdateTenantRequestBody
- type WhiteLabel
- type WhiteLabelDNS
- type WhiteLabelEmailDomain
- type ZoneMap
- type ZoneResponse
Constants ¶
const ( ExpansionStatusSuccess ExpansionStatus = "success" ExpansionStatusPossible ExpansionStatus = "possible" ExpansionStatusError ExpansionStatus = "error" RecoveryStatusCompleted RecoveryStatus = "completed" RecoveryStatusOngoing RecoveryStatus = "ongoing" RecoveryStatusErrored RecoveryStatus = "errored" )
Variables ¶
This section is empty.
Functions ¶
func ConnectSwarm ¶
func CreateTenantAccounts ¶
func CreateTenantAccounts(urls configuration.URLs, accessToken, tenantID string, emails []string) error
func DeleteAgent ¶
func DeleteGateway ¶
func DeleteNexus ¶
func DeleteNode ¶
func DeleteNode(urls configuration.URLs, accessToken string, swarmID, nexusID, nodeID string) error
func DeleteTenantAccountSessions ¶
func DeleteTenantAccountSessions(urls configuration.URLs, accessToken, tenantID, accountID string) error
func DownloadReport ¶
func DownloadReport(output string, downloadedFile *string) request_utils.RequestModifier
func DownloadTenantReport ¶
func DownloadTenantReport(urls configuration.URLs, accessToken, tenantID, from, to, output string) (*string, error)
func EditOperatorRoleInSwarm ¶
func EditOperatorRoleInSwarm(urls configuration.URLs, accessToken, swarmID, operatorID string, req ChangeOperatorPolicyRequestBody) error
func EditOperatorRoleInTenant ¶
func EditOperatorRoleInTenant(urls configuration.URLs, accessToken, tenantID, operatorID string, req ChangeOperatorPolicyRequestBody) error
func EditSwarm ¶
func EditSwarm(urls configuration.URLs, accessToken string, swarmID string, req UpdateSwarmRequest) error
func EditTenant ¶
func EditTenant(urls configuration.URLs, accessToken string, tenantID string, req UpdateTenantRequestBody) error
func EditTenantImage ¶
func EditTenantImage(urls configuration.URLs, accessToken, tenantID, imageURL string) error
func EditTenantSettings ¶
func EditTenantSettings(urls configuration.URLs, accessToken string, tenantID string, settings TenantSettings) error
func ExtractGenericModel ¶
func ExtractGenericModel(response any) request_utils.RequestModifier
func GetDeviceAPIKey ¶
func GetDeviceAPIKey(urls configuration.URLs, deviceID string) (string, error)
func InviteOperatorToSwarm ¶
func InviteOperatorToSwarm(urls configuration.URLs, accessToken, swarmID string, req InviteOperatorRequestBody) error
func InviteOperatorToTenant ¶
func InviteOperatorToTenant(urls configuration.URLs, accessToken, tenantID string, req InviteOperatorRequestBody) error
func PromoteOperator ¶
func PromoteOperator(urls configuration.URLs, email, policyName, secret string) error
func RemoveSwarm ¶
func RemoveSwarm(urls configuration.URLs, accessToken, swarmID string) error
func RemoveSwarmOperator ¶
func RemoveSwarmOperator(urls configuration.URLs, accessToken, swarmID, operatorID string) error
func RemoveTenant ¶
func RemoveTenant(urls configuration.URLs, accessToken, tenantID string) error
func RemoveTenantAccount ¶
func RemoveTenantAccount(urls configuration.URLs, accessToken, tenantID, accountID string) error
func RemoveTenantOperator ¶
func RemoveTenantOperator(urls configuration.URLs, accessToken, tenantID, operatorID string) error
func RemoveTenantProject ¶
func RemoveTenantProject(urls configuration.URLs, accessToken, tenantID, projectID string) error
func RestoreTenantAccount ¶
func RestoreTenantAccount(urls configuration.URLs, accessToken, tenantID, accountID string) error
func RestoreTenantProject ¶
func RestoreTenantProject(urls configuration.URLs, accessToken, tenantID, projectID string) error
func ToggleBanAccount ¶
func ToggleBanProject ¶
func UpdateAccount ¶
func UpdateAccount(urls configuration.URLs, accessToken, tenantID, accountID string, accountBody UpdateAccountRequest) error
func UpdateAgent ¶
func UpdateAgent(urls configuration.URLs, accessToken string, swarmID string, nexusID string, nodeID string, agentID string, nodesBody UpdateNewAgentRequestBody) error
func UpdateGateway ¶
func UpdateGateway(urls configuration.URLs, accessToken string, tenantID string, gatewayID string, gatewayBody UpdateGatewayRequestBody) error
func UpdateNexus ¶
func UpdateNexus(urls configuration.URLs, accessToken string, swarmID string, nexusID string, nexusBody UpdateNexusRequestBody) error
func UpdateNode ¶
func UpdateNode(urls configuration.URLs, accessToken string, swarmID, nexusID, nodeID string, nodeBody UpdateNewNodeRequestBody) error
func UpdateProject ¶
func UpdateProject(urls configuration.URLs, accessToken, tenantID, projectID string, projectBody UpdateTenantProjectRequestBody) error
Types ¶
type APIKeyResponse ¶
type Account ¶
type Account struct {
ID string `json:"id"`
FirstName string `json:"first_name"`
LastName string `json:"last_name"`
Internal bool `json:"internal"`
Banned bool `json:"banned"`
CreatedAt time.Time `json:"created_at"`
DeletedAt *time.Time `json:"deleted_at"`
MaxAllowedProjects int `json:"max_allowed_projects"`
Emails []AccountEmail `json:"emails"`
TwoFactorEnabled bool `json:"two_factor_enabled"`
EndpointGateway string `json:"endpoint_gateway"`
TenantID string `json:"tenant_id"`
AuthProvider AccountAuthProvider `json:"auth_provider"`
}
func GetTenantAccount ¶
func GetTenantAccount(urls configuration.URLs, accessToken, tenantID, accountID string) (*Account, error)
type AccountAuthProvider ¶
type AccountAuthProvider string
type AccountEmail ¶
type AgentConfig ¶
type AgentModel ¶
type AgentModel string
const ( UnknownAgentModel AgentModel = "unknown" CellAgentModel AgentModel = "cell" VirtualAgentModel AgentModel = "virtual" )
type AgentVolume ¶
type AnsibleConfig ¶
type AnsibleConfig struct {
Nodes []NodeConfig `json:"nodes"`
}
type BulkInsertNewAgentRequestBody ¶
type BulkInsertNewAgentRequestBody struct {
Agents []CreateNewAgentRequestBody `json:"agents"`
}
type BulkInsertNewNodeRequestBody ¶
type BulkInsertNewNodeRequestBody struct {
Nodes []CreateNewNodeRequestBody `json:"nodes"`
}
type ChallengeResponseModel ¶
type ChangeOperatorPolicyRequestBody ¶
type ChangeOperatorPolicyRequestBody struct {
PolicyID string `json:"policy_id"`
}
type CreateNewAgentRequestBody ¶
type CreateNewAgentRequestBody struct {
Port int `json:"port"`
Features map[string]interface{} `json:"features"`
Volume AgentVolume `json:"volume"`
}
type CreateNexusRequestBody ¶
type CreateNodeBodyRequest ¶
type CreateRedundancyClassRequestBody ¶
type CreateRedundancyClassRequestBody struct {
Name string `json:"name"`
Description string `json:"description"`
InnerK int `json:"inner_k"`
InnerN int `json:"inner_n"`
OuterK int `json:"outer_k"`
OuterN int `json:"outer_n"`
AntiAffinityGroup int `json:"anti_affinity_group"`
Nexuses []string `json:"nexuses"`
}
type CreateSwarmRequest ¶
type CreateTenantRequestBody ¶
type DNSChallengeRecord ¶
type DeviceRegistrationResponse ¶
type DeviceRegistrationResponse struct {
DeviceCode string `json:"device_code"`
ClientURL string `json:"client_url"`
}
func RegisterDevice ¶
func RegisterDevice(urls configuration.URLs, uuid string) (*DeviceRegistrationResponse, error)
type Distributor ¶
type DistributorCoupon ¶
type DistributorCoupon struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
Redemptions int `json:"redemptions"`
MaxRedemptions int64 `json:"max_redemptions"`
Code string `json:"code"`
Zone string `json:"zone"`
CreatedAt time.Time `json:"created_at"`
ExternalID string `json:"external_id"`
}
func (*DistributorCoupon) ToHumanReadableDistributorCode ¶
func (c *DistributorCoupon) ToHumanReadableDistributorCode() *HumanReadableDistributorCoupon
type DistributorCouponCodeResponseModel ¶
type DistributorCouponCodeResponseModel struct {
CouponCode string `json:"coupon_code"`
}
type DistributorCouponList ¶
type DistributorCouponList struct {
Coupons []*DistributorCoupon `json:"coupons"`
}
type DistributorList ¶
type DistributorList struct {
Distributors []*Distributor `json:"distributors"`
}
type DistributorReportResponseModel ¶
type DistributorReportResponseModel struct {
Report []TenantReport `json:"report"`
}
type ErrorResponseModel ¶
type EvaluatedStatusType ¶
type EvaluatedStatusType string
type ExpansionStatus ¶
type ExpansionStatus string
type Gateway ¶
type Gateway struct {
ID string `json:"id"`
Name string `json:"name"`
Location string `json:"location"`
CreatedAt time.Time `json:"created_at"`
DeletedAt *time.Time `json:"deleted_at"`
Secret string `json:"secret"`
OrganizationID *string `json:"organization_id"`
}
func GetGateway ¶
type GatewayInstance ¶
type GatewayInstance struct {
ID string `json:"id"`
GatewayID string `json:"gateway_id"`
IP string `json:"ip"`
Status map[string]interface{} `json:"status"`
StatusUpdatedAt *time.Time `json:"status_updated_at"`
CreatedAt time.Time `json:"created_at"`
Features map[string]interface{} `json:"features"`
EvaluatedStatus GatewayStatus `json:"evaluated_status"`
}
type GatewayInstanceListResponse ¶
type GatewayInstanceListResponse struct {
Data []*GatewayInstance `json:"data"`
}
type GatewayStatus ¶
type GatewayStatus string
const ( UnknownGatewayStatus GatewayStatus = "unknown" InactiveGatewayStatus GatewayStatus = "inactive" ActiveGatewayStatus GatewayStatus = "active" OfflineGatewayStatus GatewayStatus = "offline" OnlineGatewayStatus GatewayStatus = "online" )
type GatewayTenant ¶
type GatewayTenant struct {
ID string `json:"id"`
GatewayID string `json:"gateway_id"`
TenantID string `json:"tenant_id"`
CreatedAt time.Time `json:"created_at"`
DeletedAt *time.Time `json:"deleted_at"`
HardDeleteAt *time.Time `json:"hard_delete_at"`
Configuration map[string]interface{} `json:"configuration"`
Hidden bool `json:"hidden"`
}
type GatewayWithGatewayTenant ¶
type GatewayWithGatewayTenant struct {
Gateway *Gateway `json:"gateway"`
GatewayTenant *GatewayTenant `json:"gateway_tenant"`
}
func CreateGateway ¶
func CreateGateway(urls configuration.URLs, accessToken string, tenantID string, gatewayBody CreateGatewayRequestBody) (*GatewayWithGatewayTenant, error)
type GenericIDResponseModel ¶
type GenericIDResponseModel struct {
ID string `json:"id"`
}
func AssignTenantToCoupon ¶
func AssignTenantToCoupon(urls configuration.URLs, accessToken, tenantID, CouponCode string) (*GenericIDResponseModel, error)
func CreateProject ¶
func CreateProject(urls configuration.URLs, accessToken, name string, description *string, imageUrl *string) (*GenericIDResponseModel, error)
func CreateSwarm ¶
func CreateSwarm(urls configuration.URLs, accessToken string, req CreateSwarmRequest) (*GenericIDResponseModel, error)
func CreateTenant ¶
func CreateTenant(urls configuration.URLs, accessToken string, req CreateTenantRequestBody) (*GenericIDResponseModel, error)
type GenericPaginatedResponse ¶
type GenericPaginatedResponse[T interface{}] struct {
Data []T `json:"data"`
NextPage *int `json:"next_page"`
Count int `json:"count"`
}
func GetAgent ¶
func GetAgent(urls configuration.URLs, accessToken string, swarmID, nexusID, nodeID, agentID string) (*GenericPaginatedResponse[*NewAgent], error)
func ListAgents ¶
func ListAgents(urls configuration.URLs, accessToken string, swarmID string, nexusID, nodeID, sort string, filter string) (*GenericPaginatedResponse[*NewAgent], error)
func ListAgentsForRC ¶
func ListAgentsForRC(urls configuration.URLs, accessToken string, swarmID string, rcID, sort string, filter string) (*GenericPaginatedResponse[*NewAgent], error)
func ListGateways ¶
func ListGateways(urls configuration.URLs, accessToken string, tenantID string, sort string, filter string) (*GenericPaginatedResponse[*Gateway], error)
func ListNexuses ¶
func ListNexuses(urls configuration.URLs, accessToken string, swarmID string, sort string, filter string) (*GenericPaginatedResponse[*Nexus], error)
func ListNodes ¶
func ListNodes(urls configuration.URLs, accessToken string, swarmID string, nexusID, sort string, filter string) (*GenericPaginatedResponse[*NewNode], error)
func ListRedundancyClasses ¶
func ListRedundancyClasses(urls configuration.URLs, accessToken, swamID, sort, filter string) (*GenericPaginatedResponse[*RedundancyClass], error)
func ListSwarmsV2 ¶
func ListSwarmsV2(urls configuration.URLs, accessToken string, sort string, filter string) (*GenericPaginatedResponse[*Swarm], error)
func ListTenantAccounts ¶
func ListTenantAccounts(urls configuration.URLs, accessToken, tenantID, sort, filter string) (*GenericPaginatedResponse[*Account], error)
func ListTenantProjects ¶
func ListTenantProjects(urls configuration.URLs, accessToken, tenantID, sort, filter string) (*GenericPaginatedResponse[*ProjectItem], error)
func ListTenants ¶
func ListTenants(urls configuration.URLs, accessToken, sort, filter string) (*GenericPaginatedResponse[*Tenant], error)
type GetAgentEvaluatedStatusResponse ¶
type GetAgentEvaluatedStatusResponse struct {
Status EvaluatedStatusType `json:"status"`
}
func GetAgentStatus ¶
func GetAgentStatus(urls configuration.URLs, accessToken, swarmID, nexusID, nodeID, agentID string) (*GetAgentEvaluatedStatusResponse, error)
type HumanReadableDistributorCoupon ¶
type HumanReadableDistributorCoupon struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
Redemptions int `json:"redemptions"`
MaxRedemptions string `json:"max_redemptions"`
Code string `json:"code"`
Zone string `json:"zone"`
CreatedAt time.Time `json:"created_at"`
ExternalID string `json:"external_id"`
}
type HumanReadableStatus ¶
type HumanReadableStatus struct {
Status string `json:"status"`
ChildType string `json:"child_type"`
ChildCount int `json:"child_count"`
ChildOnlineCount int `json:"child_online_count"`
ChildOfflineCount int `json:"child_offline_count"`
ChildPendingCount int `json:"child_pending_count"`
ChildWarningCount int `json:"child_warning_count"`
ChildErrorCount int `json:"child_error_count"`
}
type MonitoredResourceForSeverityNotifications ¶
type MonitoredResourceForSeverityNotifications map[string]SeverityForNotificationType
type NewAgent ¶
type NewAgent struct {
ID string `json:"id"`
NodeID string `json:"node_id"`
PublicKey *string `json:"public_key"`
Features map[string]interface{} `json:"features"`
CreatedAt time.Time `json:"created"`
DeletedAt *time.Time `json:"deleted"`
LastStatusUpdateAt time.Time `json:"last_status_update_at"`
Secret string `json:"secret"`
Online bool `json:"online"`
ConnectedOn *time.Time `json:"connected_on"`
Model AgentModel `json:"model"`
Serial *string `json:"serial"`
Version *string `json:"version"`
Port int `json:"cccp_port"`
TotalStorage int64 `json:"total_storage"`
UsedStorage int64 `json:"used_storage"`
Volume AgentVolume `json:"volume"`
CRN map[string]interface{} `json:"crn"`
AnnouncedPrivateIP *string `json:"announced_private_ip"`
AnnouncedPublicIP *string `json:"announced_public_ip"`
}
type NewAgentResponse ¶
type NewAgentsResponse ¶
type NewAgentsResponse struct {
Agents []*NewAgentResponse `json:"agents"`
}
func CreateAgent ¶
func CreateAgent(urls configuration.URLs, accessToken string, swarmID string, nexusID string, nodeID string, agentsBody BulkInsertNewAgentRequestBody) (*NewAgentsResponse, error)
type NewNode ¶
type NewNode struct {
ID string `json:"id"`
Name string `json:"name"`
Label *string `json:"label"`
Configuration map[string]interface{} `json:"config"`
CreatedAt time.Time `json:"created_at"`
DeletedAt *time.Time `json:"deleted_at"`
NexusID string `json:"nexus_id"`
PrivateIP string `json:"private_ip"`
PublicIP string `json:"public_ip"`
CRN map[string]interface{} `json:"crn"`
}
type NewNodeResponseItem ¶
type NewNodeResponseItem struct {
ID string `json:"id"`
Name string `json:"name"`
Label *string `json:"label"`
Configuration map[string]interface{} `json:"config"`
PublicIP string `json:"public_ip"`
PrivateIP string `json:"private_ip"`
Agents []NewAgentResponse `json:"agents"`
CRN map[string]interface{} `json:"crn"`
}
type NewNodesResponse ¶
type NewNodesResponse struct {
Nodes []*NewNodeResponseItem `json:"nodes"`
}
func CreateNodes ¶
func CreateNodes(urls configuration.URLs, accessToken string, swarmID string, nexusID string, nodesBody BulkInsertNewNodeRequestBody) (*NewNodesResponse, error)
type Nexus ¶
type Nexus struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
Location string `json:"location"`
CreationDate time.Time `json:"creation_date"`
LastModified time.Time `json:"last_modified"`
SwarmID string `json:"swarm_id"`
Capacity int `json:"capacity"`
Used int `json:"used"`
}
func CreateNexus ¶
func CreateNexus(urls configuration.URLs, accessToken string, swarmID string, nexusBody CreateNexusRequestBody) (*Nexus, error)
type Node ¶
type Node struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
Status string `json:"status"`
CreationDate time.Time `json:"creation_date"`
ProviderID string `json:"provider_id"`
SecretID string `json:"secret_id"`
NexusID string `json:"nexus_id"`
Config map[string]interface{} `json:"config"`
}
type NodeConfig ¶
type Notification ¶
type Operator ¶
type Operator struct {
ID string `json:"id"`
FirstName string `json:"first_name"`
LastName string `json:"last_name"`
Internal bool `json:"internal"`
Banned bool `json:"banned"`
CreatedAt time.Time `json:"created_at"`
DeletedAt *time.Time `json:"deleted_at"`
MaxAllowedProjects int `json:"max_allowed_projects"`
Email string `json:"email"`
Emails []OperatorEmail `json:"emails"`
TwoFactorEnabled bool `json:"two_factor_enabled"`
Status string `json:"status"`
PolicyName string `json:"policy_name"`
}
func GetOperator ¶
func GetOperator(urls configuration.URLs, accessToken, meOrID string) (*Operator, error)
func GetOperatorSelf ¶
func GetOperatorSelf(urls configuration.URLs, accessToken string) (*Operator, error)
func GetSwarmOperator ¶
func GetSwarmOperator(urls configuration.URLs, accessToken, swarmID, operatorID string) (*Operator, error)
func GetTenantOperator ¶
func GetTenantOperator(urls configuration.URLs, accessToken, tenantID, operatorID string) (*Operator, error)
type OperatorEmail ¶
type OperatorList ¶
type OperatorList struct {
Operators []*Operator `json:"operators"`
}
func ListSwarmOperators ¶
func ListSwarmOperators(urls configuration.URLs, accessToken, swarmID string) (*OperatorList, error)
func ListTenantOperators ¶
func ListTenantOperators(urls configuration.URLs, accessToken, tenantID string) (*OperatorList, error)
type PolicyList ¶
type PolicyList struct {
Policies []Policy `json:"policies"`
}
func ListTenantPolicies ¶
func ListTenantPolicies(urls configuration.URLs, accessToken, tenantID string) (*PolicyList, error)
type ProjectItem ¶
type ProjectItem struct {
ProjectID string `json:"project_id"`
ProjectName string `json:"project_name"`
ProjectDescription string `json:"project_description"`
ProjectEmail string `json:"project_email"`
ProjectCreatedAt time.Time `json:"project_created_at"`
ProjectDeletedAt *time.Time `json:"project_deleted_at"`
ProjectBannedAt *time.Time `json:"project_banned_at"`
ProjectImageURL string `json:"project_image_url"`
ProjectTenantID string `json:"project_tenant_id"`
RootAccountEmail string `json:"root_account_email"`
RootAccountID string `json:"root_account_id"`
}
func GetTenantProject ¶
func GetTenantProject(urls configuration.URLs, accessToken, tenantID, projectID string) (*ProjectItem, error)
type ProjectReport ¶
type ProjectReport struct {
ID string `json:"id"`
ExternalID string `json:"external_id"`
ProjectName string `json:"project_name"`
StorageBH string `json:"storage_bh"`
StorageAVGTB string `json:"storage_avg_tb"`
StorageMaxTB string `json:"storage_max_tb"`
StorageTB string `json:"storage_tb"`
StorageReservedTB string `json:"storage_reserved_tb"`
BandwidthReservedTB string `json:"bandwidth_reserved_tb"`
EgressTB string `json:"egress_tb"`
IngressTB string `json:"ingress_tb"`
FromTime string `json:"from_time"`
ToTime string `json:"to_time"`
Status string `json:"status"`
Timestamp time.Duration `json:"timestamp"`
}
type ProviderList ¶
type RCProgress ¶
type RCProgress struct {
Session RCSession `json:"session"`
ActiveRecoveries []RecoveryProgress `json:"active_recoveries"`
FailedRecoveries []RecoveryProgress `json:"failed_recoveries"`
CompletionPercent float64 `json:"completion_percent"`
}
func CheckRedundancyClassRecoveryStatus ¶
func CheckRedundancyClassRecoveryStatus(urls configuration.URLs, accessToken, swarmID, redundancyClassID string) (*RCProgress, error)
type RCSession ¶
type RCSession struct {
Status RCSessionStatus `json:"status"`
}
type RCSessionStatus ¶
type RCSessionStatus string
const ( RCSessionStatusRunning RCSessionStatus = "running" RCSessionStatusCompleted RCSessionStatus = "completed" RCSessionStatusFailed RCSessionStatus = "failed" )
type RecoveryProgress ¶
type RecoveryStatus ¶
type RecoveryStatus string
type RedundancyClass ¶
type RedundancyClass struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
InnerK int `json:"inner_k"`
InnerN int `json:"inner_n"`
OuterK int `json:"outer_k"`
OuterN int `json:"outer_n"`
AntiAffinityGroup int `json:"anti_affinity_group"`
Capacity int `json:"capacity"`
CreationDate time.Time `json:"creation_date"`
SwarmID string `json:"swarm_id"`
}
func CreateRedundancyClass ¶
func CreateRedundancyClass(urls configuration.URLs, accessToken, swamID string, redundancyClass CreateRedundancyClassRequestBody) (*RedundancyClass, error)
func GetRedundancyClass ¶
func GetRedundancyClass(urls configuration.URLs, accessToken, redundancyClassID string) (*RedundancyClass, error)
type RedundancyClassErrorData ¶
type RedundancyClassErrorData struct {
IssueFound []interface{} `json:"issue_found"`
}
type RedundancyClassExpanded ¶
type RedundancyClassExpanded struct {
Status ExpansionStatus `json:"status"`
Message string `json:"message"`
ExpandedSize int64 `json:"expanded_size"`
AgentsInvolved []string `json:"agents_involved"`
}
func ExpandRedundancyClass ¶
func ExpandRedundancyClass(urls configuration.URLs, accessToken, swarmID, redundancyClassID string, dryRun bool) (*RedundancyClassExpanded, error)
type RedundancyClassList ¶
type RedundancyClassList struct {
Data []*RedundancyClass `json:"data"`
Page int `json:"page"`
}
type RedundancyClassRecovery ¶
type RedundancyClassRecovery struct {
Message string `json:"message"`
}
func RecoverRedundancyClass ¶
func RecoverRedundancyClass(urls configuration.URLs, accessToken, swarmID, redundancyClassID string, dryRun bool) (*RedundancyClassRecovery, error)
type Ring ¶
type Ring struct {
ID string `json:"id"`
N int `json:"n"`
K int `json:"k"`
SwarmID string `json:"swarm_id"`
Capacity int `json:"capacity"`
Used int `json:"used"`
Status string `json:"status"`
CreationDate string `json:"creation_date"`
Nexuses []RingNexus `json:"nexuses"`
Nodes []RingNode `json:"nodes"`
}
type SeverityForNotificationType ¶
type SeverityForNotificationType map[Severity]SeverityNotificationType
type SeverityNotificationType ¶
type SeverityNotificationType struct {
Threshold int `json:"threshold"`
Notify Notification `json:"notify"`
}
type SummaryDetails ¶
type SummaryDetailsWithStatusNullable ¶
type SummaryDetailsWithStatusNullable struct {
Details *SummaryDetails `json:"details"`
SummaryStatusNullable
}
func CheckRedundancyClassStatus ¶
func CheckRedundancyClassStatus(urls configuration.URLs, accessToken, swarmID, redundancyClassID string) (*SummaryDetailsWithStatusNullable, error)
func GetSwarmStatus ¶
func GetSwarmStatus(urls configuration.URLs, accessToken, swarmID string) (*SummaryDetailsWithStatusNullable, error)
func (*SummaryDetailsWithStatusNullable) ToHumanReadableStatus ¶
func (s *SummaryDetailsWithStatusNullable) ToHumanReadableStatus(childEntityType string) HumanReadableStatus
type SummaryStatusNullable ¶
type SummaryStatusNullable struct {
EvaluatedStatus *EvaluatedStatusType `json:"evaluated_status"`
EvaluatedStatusLastUpdatedAt *time.Time `json:"evaluated_status_last_updated_at"`
}
type Swarm ¶
type Swarm struct {
ID string `json:"id"`
Name string `json:"name"`
Configuration map[string]interface{} `json:"configuration"`
Size int64 `json:"size"`
OwnerID string `json:"owner_id"`
Used int64 `json:"used"`
CreationDate time.Time `json:"creation_date"`
Description *string `json:"description"`
OrganizationID *string `json:"organization_id"`
}
func ListSwarms ¶
func ListSwarms(urls configuration.URLs, accessToken, ownerID string) ([]*Swarm, error)
type SwarmList ¶
type SwarmList struct {
Swarms []Swarm `json:"swarms"`
}
func GetTenantCouponSwarms ¶
func GetTenantCouponSwarms(urls configuration.URLs, accessToken, tenantID string) (*SwarmList, error)
type Tenant ¶
type Tenant struct {
ID string `json:"id"`
Name string `json:"name"`
Description *string `json:"description"`
OwnerID string `json:"owner_id"`
CreatedAt time.Time `json:"created_at"`
DeletedAt *time.Time `json:"deleted_at"`
Settings *TenantSettings `json:"settings"`
CouponID *string `json:"coupon_id"`
}
type TenantList ¶
type TenantList struct {
Tenants []*Tenant `json:"tenants"`
}
type TenantReport ¶
type TenantReport struct {
ID string `json:"id"`
ExternalID string `json:"external_id"`
TenantName string `json:"tenant_name"`
Code string `json:"code"`
StorageBH string `json:"storage_bh"`
StorageGB string `json:"storage_gb"`
EngressGB string `json:"engress_gb"`
FromTime string `json:"from_time"`
ToTime string `json:"to_time"`
Status string `json:"status"`
Timestamp time.Duration `json:"timestamp"`
}
type TenantReportResponseModel ¶
type TenantReportResponseModel struct {
Report []ProjectReport `json:"report"`
}
func GetTenantReport ¶
func GetTenantReport(urls configuration.URLs, accessToken, tenantID, from, to string) (*TenantReportResponseModel, error)
type TenantSettings ¶
type TenantSettings struct {
ConsoleURL *string `json:"console_url"`
GatewayURL *string `json:"gateway_url"`
Project *TenantSettingsProject `json:"project"`
Account *TenantSettingsAccount `json:"account"`
AllowedDomains *[]string `json:"allowed_domains"`
BlockedDomains *[]string `json:"blocked_domains"`
Notifications *MonitoredResourceForSeverityNotifications `json:"notifications"`
SignupDisabled bool `json:"signup_disabled"`
SupportLink *string `json:"support_link"`
DisplayName *string `json:"display_name"`
WhitelabelEnabled bool `json:"whitelabel_enabled"`
WhiteLabel *WhiteLabel `json:"white_label"`
}
type TenantSettingsAccount ¶
type TenantSettingsAccount struct {
DefaultMaxProject *int `json:"default_max_project"`
EnabledAuthProviders *[]AccountAuthProvider `json:"enabled_auth_providers"`
EnabledAuthProvidersConfig *EnabledAuthProvidersConfig `json:"enabled_auth_providers_config"`
}
type TenantSettingsProject ¶
type TenantSwarm ¶
type TenantSwarmList ¶
type TenantSwarmList struct {
Swarms []*TenantSwarm `json:"swarms"`
}
func ListAvailableTenantSwarms ¶
func ListAvailableTenantSwarms(urls configuration.URLs, accessToken, tenantID string) (*TenantSwarmList, error)
type URLBuilder ¶
type URLBuilder struct {
// contains filtered or unexported fields
}
func NewURLBuilder ¶
func NewURLBuilder(baseURL string) *URLBuilder
func (*URLBuilder) Build ¶
func (ub *URLBuilder) Build() string
func (*URLBuilder) Path ¶
func (ub *URLBuilder) Path(segments ...string) *URLBuilder
func (*URLBuilder) QueryParam ¶
func (ub *URLBuilder) QueryParam(key, value string) *URLBuilder
func (*URLBuilder) QueryParamInt ¶
func (ub *URLBuilder) QueryParamInt(key string, value int) *URLBuilder
type UpdateAccountRequest ¶
type UpdateNewAgentRequestBody ¶
type UpdateNewAgentRequestBody struct {
Port *int `json:"port"`
Features map[string]interface{} `json:"features"`
Volume *UpdateAgentVolumeRequest `json:"volume"`
}
type UpdateNexusRequestBody ¶
type UpdateNodeBodyRequest ¶
type UpdateSwarmRequest ¶
type UpdateTenantRequestBody ¶
type UpdateTenantRequestBody struct {
Description *string `json:"description"`
Settings *TenantSettings `json:"settings"`
}
type WhiteLabel ¶
type WhiteLabel struct {
DNS *WhiteLabelDNS `json:"dns"`
EmailDomain *WhiteLabelEmailDomain `json:"email_domain"`
}
type WhiteLabelDNS ¶
type WhiteLabelEmailDomain ¶
type WhiteLabelEmailDomain struct {
Value string `json:"value"`
User *string `json:"user"`
Challenge []DNSChallengeRecord `json:"challenge"`
Verified bool `json:"verified"`
}
type ZoneMap ¶
type ZoneMap struct {
Zones map[string]ZoneResponse `json:"zones"`
}
func GetGatewayZones ¶
func GetGatewayZones(urls configuration.URLs) (*ZoneMap, error)