Documentation ¶
Index ¶
- func StreamToString(stream io.Reader) string
- type AccessToken
- type AccessTokenService
- type AccountService
- type ActionRequest
- type ActivityLog
- type AddRuleReq
- type AgentStatus
- type AppliedVouchers
- type AssignServerReq
- type AttachedVM
- type AuditLog
- type Backend
- type Backup
- type BackupPolicy
- type BackupPolicyListDetail
- type BackupsService
- type BillingAddress
- type BillingLog
- type BillingService
- type Bucket
- type BucketKey
- type BucketService
- type Client
- func (c *Client) Do(ctx context.Context, req *http.Request, v interface{}) error
- func (c *Client) NewRequest(ctx context.Context, method, urlStr string, body interface{}) (*http.Request, error)
- func (c *Client) SetBaseURL(baseURL string) error
- func (c *Client) SetRequestHeaders(headers map[string]string)
- func (c *Client) SetUserAgent(ua string)
- type CreateBackupPolicyReq
- type CreateBucketReq
- type CreateDnsRecordReq
- type CreateDomainRequest
- type CreateGatewayReq
- type CreateK8sGroupReq
- type CreateK8sReq
- type CreateLBReq
- type CreateMonitoringRuleReq
- type CreateProjectRequest
- type CreateScriptRequest
- type CreateServerRequest
- type CreateSnapShotPolicyReq
- type CreateVpcReq
- type CustomImage
- type Data
- type DataCenter
- type DataCenterListRoot
- type DataCenterService
- type DnsRecord
- type Domain
- type DomainAddReq
- type DomainService
- type DomainUpdateReq
- type DomainVpsie
- type EnableAutoBackupReq
- type EnableAutoSnapshotReq
- type ErrorRsp
- type EstimatedUsages
- type FileListingStatusRoot
- type FipService
- type FirewallGroup
- type FirewallGroupDetailData
- type FirewallGroupListData
- type FirewallGroupService
- type FirewallRules
- type FirewallService
- type FirewallUpdateReq
- type FloatingIpData
- type Gateway
- type GatewayService
- type GeneralRspRoot
- type GetBackupPolicyRoot
- type GetBackupsRoot
- type GetBucketRoot
- type GetFirewallGroupRoot
- type GetGatewayRoot
- type GetK8sRoot
- type GetLBRoot
- type GetPermissionGroupRoot
- type GetProfileRoot
- type GetSnapShotPolicyRoot
- type GetSnapshotRoot
- type GetStatusRoot
- type GetStorageRoot
- type GetVPCRoot
- type IP
- type IPsService
- type ImageCategories
- type ImagesService
- type InBoundFirewallRules
- type Invoice
- type IpsetObj
- type K8s
- type K8sGroup
- type K8sService
- type LB
- type LBBackendsDetail
- type LBDataCenter
- type LBDetails
- type LBDomain
- type LBDomainsDetail
- type LBOffers
- type LBRuleDetail
- type LBsService
- type ListAccessTokensRoot
- type ListActionOfUserRoot
- type ListActivityLogsRoot
- type ListAllNodesOfUserRoot
- type ListAppliedVouchersRoot
- type ListAuditLogsRoot
- type ListBackupPoliciesRoot
- type ListBackupsRoot
- type ListBillingLogsRoot
- type ListBucketKeysRoot
- type ListBucketRoot
- type ListCustomImageRoot
- type ListDomainRoot
- type ListDomainVpsieRoot
- type ListEstimatedUsagesRoot
- type ListFirewallGroupsRoot
- type ListGatewayRoot
- type ListIPsRoot
- type ListInvoicesRoot
- type ListK8s
- type ListK8sGroupRoot
- type ListK8sRoot
- type ListLBDataCentersRoot
- type ListLBsRoot
- type ListMacrosRoot
- type ListMonitoringRuleRoot
- type ListOffersRoot
- type ListOptions
- type ListPurchaseLogRoot
- type ListReversePTRRoot
- type ListScriptRoot
- type ListServerByIdentifierRoot
- type ListServerRoot
- type ListSnapShotPoliciesRoot
- type ListSnapshotsRoot
- type ListStorageDataCenterRoot
- type ListStorageRoot
- type ListStorageSnapShotRoot
- type ListUserLimitRoot
- type ListVPCRoot
- type ListVirtualMachineRoot
- type ListVmLogsRoot
- type ListVmToAttachRoot
- type LoginReq
- type LogsService
- type Macros
- type MonitoringRule
- type MonitoringService
- type Node
- type OutBoundFirewallRules
- type PendingLB
- type PendingLBRoot
- type PendingService
- type PendingVm
- type PendingVmsRoot
- type PermissionGroup
- type PrivateIpData
- type Profile
- type ProfilesService
- type Project
- type ProjectRoot
- type ProjectsRoot
- type ProjectsService
- type PurchaseLog
- type QuickActions
- type Record
- type ResumeReq
- type ReversePTR
- type ReverseRequest
- type Rule
- type RuleUpdateReq
- type SShKey
- type Script
- type ScriptDetail
- type ScriptRoot
- type ScriptUpdateRequest
- type ScriptsService
- type ServerConsole
- type ServerConsoleRoot
- type ServerService
- type SnapShotPolicy
- type SnapShotPolicyListDetail
- type SnapShotVms
- type Snapshot
- type SnapshotService
- type SshKeysGetRoot
- type SshKeysListRoot
- type SshkeysService
- type Status
- type Storage
- type StorageCreateRequest
- type StorageDetail
- type StorageService
- type StorageSnapShot
- type StorageUpdateRequest
- type Token
- type TokenDetails
- type TokenRoot
- type UpdateDnsRecordReq
- type UpdateProfileRequest
- type UserLimit
- type VPC
- type VPCService
- type VirtualMachine
- type VmData
- type VmLog
- type VmTags
- type VmToAttach
- type VmsData
- type VpcRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StreamToString ¶
StreamToString converts a reader to a string
Types ¶
type AccessToken ¶
type AccessTokenService ¶
type AccessTokenService interface { List(ctx context.Context, options *ListOptions) ([]AccessToken, error) Create(ctx context.Context, name, accessToken, expirationDate string) error Delete(ctx context.Context, accessTokenIdentifier string) error Update(ctx context.Context, accessTokenIdentifier, name, expirationDate string) error }
type AccountService ¶
type ActionRequest ¶
type ActionRequest struct {
VmIdentifier string `json:"vmIdentifier"`
}
type ActivityLog ¶
type AddRuleReq ¶
type AgentStatus ¶
type AppliedVouchers ¶
type AssignServerReq ¶
type AttachedVM ¶
type AuditLog ¶
type AuditLog struct { ID int `json:"id"` UserID int `json:"user_id"` UserAgent string `json:"user_agent"` IPAddress string `json:"ip_address"` Country string `json:"country"` City string `json:"city"` Action string `json:"action"` Description string `json:"description"` CreatedOn string `json:"created_on"` State string `json:"state"` }
type Backup ¶
type Backup struct { HostName string `json:"hostname"` Name string `json:"name"` Identifier string `json:"identifier"` Note string `json:"note"` BackupKey string `json:"backupKey"` State string `json:"state"` DcIdentifier string `json:"dcIdentifier"` VMIdentifier string `json:"vmIdentifier"` BoxID int `json:"boxId"` BackupSHA1 string `json:"backupsha1"` OSFullName string `json:"osFullName"` VMCategory string `json:"vmCategory"` CreatedBy string `json:"created_by"` CreatedOn string `json:"created_on"` }
type BackupPolicy ¶
type BackupPolicy struct { Name string `json:"name"` Identifier string `json:"identifier"` CreatedOn string `json:"created_on"` CreatedBy string `json:"created_by"` BackupPlan string `json:"backupPlan"` PlanEvery int `json:"planEvery"` Keep int `json:"keep"` Disabled int `json:"disabled"` UserId int `json:"userId"` Vms []string `json:"vms"` }
type BackupPolicyListDetail ¶
type BackupPolicyListDetail struct { Name string `json:"name"` Identifier string `json:"identifier"` CreatedOn string `json:"created_on"` CreatedBy string `json:"created_by"` BackupPlan string `json:"backupPlan"` PlanEvery int `json:"planEvery"` Keep int `json:"keep"` Disabled int `json:"disabled"` VmsCount int `json:"vmsCount"` UserId int `json:"userId"` }
type BackupsService ¶
type BackupsService interface { List(ctx context.Context, options *ListOptions) ([]Backup, error) DeleteBackup(ctx context.Context, backupIdentifier, deleteReason, deleteNote string) error CreateBackups(ctx context.Context, vmIdentifier, name, notes string) error ListByServer(ctx context.Context, options *ListOptions, vmIdentifier string) ([]Backup, error) CreateServerByBackup(ctx context.Context, backupIdentifier string) error Get(ctx context.Context, identifer string) (*Backup, error) EnableAutoBackup(ctx context.Context, enableAutoReq *EnableAutoBackupReq) error Rename(ctx context.Context, backupIdentifier string, newName string) error GetBackupPolicy(ctx context.Context, identifier string) (*BackupPolicy, error) CreateBackupPolicy(ctx context.Context, createReq *CreateBackupPolicyReq) error DeleteBackupPolicy(ctx context.Context, policyId, identifier string) error ManageRetainBackupPolicy(ctx context.Context, policyId string, keep int) error AttachBackupPolicy(ctx context.Context, policyId string, vms []string) error DetachBackupPolicy(ctx context.Context, policyId string, vms []string) error ListBackupPolicies(ctx context.Context, options *ListOptions) ([]BackupPolicyListDetail, error) }
type BillingAddress ¶
type BillingLog ¶
type BillingLog struct { ID int `json:"id"` UserID int `json:"user_id"` TransactionID string `json:"transaction_id"` TransactionSerialized string `json:"transaction_serialized"` Message string `json:"message"` Amount int `json:"amount"` CreatedOn string `json:"created_on"` PpAccount string `json:"pp_account"` PpFullname string `json:"pp_full_name"` PpCountryCode string `json:"pp_country_code"` TransactionOriginIP string `json:"transaction_origin_ip"` RiskScore string `json:"risk_score"` Purchaselogscol string `json:"purchaselogscol"` MaxmindResponse string `json:"maxmind_response"` }
type BillingService ¶
type BillingService interface { ListInvoices(ctx context.Context, options *ListOptions) ([]Invoice, error) ListPurchaseLog(ctx context.Context, options *ListOptions) ([]PurchaseLog, error) ApplyVoucher(ctx context.Context, couponIdentifier string) error ListAppliedVouchers(ctx context.Context, options *ListOptions) ([]AppliedVouchers, error) ListEstimatedUsages(ctx context.Context, options *ListOptions) ([]EstimatedUsages, error) }
type Bucket ¶
type Bucket struct { ID int `json:"id"` UserId int `json:"user_id"` AccessKey string `json:"accessKey"` SecretKey string `json:"secretKey"` BucketName string `json:"bucketName"` ProjectName string `json:"projectName"` CreatedBy string `json:"created_by"` EndPoint string `json:"endPoint"` CreatedOn string `json:"created_on"` Identifier string `json:"identifier"` State string `json:"state"` Country string `json:"country"` }
type BucketService ¶
type BucketService interface { List(ctx context.Context, options *ListOptions) ([]Bucket, error) Get(ctx context.Context, id string) (*Bucket, error) Create(ctx context.Context, createReq *CreateBucketReq) error Delete(ctx context.Context, bucketId, reason, note string) error ToggleFileListing(ctx context.Context, bucketId string, fileListing bool) (bool, error) CheckFileListingStatus(ctx context.Context, bucketId string) (bool, error) GenerateKey(ctx context.Context, keyName string) error ListBucketKeys(ctx context.Context) ([]BucketKey, error) }
type Client ¶
type Client struct { // Base URL for API requests. BaseURL *url.URL // User agent for client UserAgent string // services Account AccountService Project ProjectsService Server ServerService Image ImagesService SShKey SshkeysService Profile ProfilesService Backup BackupsService IP IPsService Domain DomainService Fip FipService FirewallGroup FirewallGroupService Firewall FirewallService Storage StorageService Snapshot SnapshotService Logs LogsService DataCenter DataCenterService LB LBsService Scripts ScriptsService Pending PendingService Gateway GatewayService VPC VPCService Bucket BucketService K8s K8sService AccessToken AccessTokenService Billing BillingService Monitoring MonitoringService // contains filtered or unexported fields }
func (*Client) NewRequest ¶
func (c *Client) NewRequest(ctx context.Context, method, urlStr string, body interface{}) (*http.Request, error)
value pointed to by body is JSON encoded and included in as the request body.
func (*Client) SetBaseURL ¶
SetBaseURL Overrides the default BaseUrl
func (*Client) SetRequestHeaders ¶
func (*Client) SetUserAgent ¶
SetUserAgent Overrides the default UserAgent
type CreateBackupPolicyReq ¶
type CreateBucketReq ¶
type CreateDnsRecordReq ¶
type CreateDomainRequest ¶
type CreateGatewayReq ¶
type CreateK8sGroupReq ¶
type CreateK8sReq ¶
type CreateK8sReq struct { ClusterName string `json:"clusterName"` DcIdentifier string `json:"dcIdentifier"` NodesCountMaster int `json:"nodesCountMaster"` NodesCountSlave int `json:"nodesCountSlave"` VpcId int `json:"vpcId"` KuberVer int `json:"kuberVer"` ResourceIdentifier string `json:"resourceIdentifier"` ProjectIdentifier string `json:"projectIdentifier"` }
type CreateLBReq ¶
type CreateLBReq struct { Algorithm string `json:"algorithm"` CookieName string `json:"cookieName"` HealthCheckPath string `json:"healthCheckPath,omitempty"` CookieCheck bool `json:"cookieCheck"` RedirectHTTP int `json:"redirectHTTP"` LBName string `json:"lbName"` ResourceIdentifier string `json:"resourceIdentifier"` DcIdentifier string `json:"dcIdentifier"` Rule []Rule `json:"rules"` CheckInterval int `json:"checkInterval,omitempty"` FastInterval int `json:"fastInterval,omitempty"` Rise int `json:"rise,omitempty"` Fall int `json:"fall,omitempty"` VpcID int `json:"vpcId,omitempty"` }
type CreateMonitoringRuleReq ¶
type CreateMonitoringRuleReq struct { MetricType string `json:"metricType"` RuleName string `json:"ruleName"` Condition string `json:"condition"` ThresholdType string `json:"thresholdType"` ThresholdId string `json:"thresholdId"` Period string `json:"period"` Frequency string `json:"frequency"` Status string `json:"status"` Threshold string `json:"threshold"` Actions struct { Email string `json:"email"` ActionKey string `json:"actionKey"` ActionName string `json:"actionName"` } `json:"actions"` Vms []string `json:"vms"` Tags []string `json:"tags"` }
type CreateProjectRequest ¶
type CreateProjectRequest struct { Name string `json:"name"` Description string `json:"description"` }
CreateProjectRequest represents the request to create a new project.
type CreateScriptRequest ¶
type CreateServerRequest ¶
type CreateServerRequest struct { ResourceIdentifier string `json:"resourceIdentifier"` OsIdentifier string `json:"osIdentifier"` DcIdentifier string `json:"dcIdentifier"` Hostname string `json:"hostname"` Notes *string `json:"notes,omitempty"` BackupEnabled *int64 `json:"backupEnabled,omitempty"` AddPublicIpV4 *int64 `json:"addPublicIpV4,omitempty"` AddPublicIpV6 *int64 `json:"addPublicIpV6,omitempty"` AddPrivateIp *int64 `json:"addPrivateIp,omitempty"` SshKeyIdentifier *string `json:"sshKeyIdentifier,omitempty"` ProjectID int64 `json:"projectId"` Tags []*string `json:"tags,omitempty"` ScriptIdentifier *string `json:"scriptIdentifier,omitempty"` }
type CreateSnapShotPolicyReq ¶
type CreateVpcReq ¶
type CustomImage ¶
type CustomImage struct { ID int `json:"id"` UserID int `json:"user_id"` DatacenterID int `json:"datacenter_id"` ImageSize int64 `json:"image_size"` OriginalName string `json:"original_name"` FetchedFromURL string `json:"fetched_from_url"` ChangedName string `json:"changed_name"` ImageHash string `json:"image_hash"` ImageLabel string `json:"image_label"` CreatedOn time.Time `json:"created_on"` Deleted int `json:"deleted"` Identifier string `json:"identifier"` Storage string `json:"storage"` DcName string `json:"dc_name"` DcIdentifier string `json:"dcIdentifier"` CreatedBy string `json:"created_by"` }
type DataCenter ¶
type DataCenter struct { DcName string `json:"dc_name"` DcImage string `json:"dc_image"` State string `json:"state"` Country string `json:"country"` IsActive int `json:"is_active"` Identifier string `json:"identifier"` DefaultSelected int `json:"default_selected"` IsDeleted int `json:"is_deleted"` IsFipAvailable int `json:"is_fip_available"` IsBucketAvailable int `json:"is_bucket_available"` IsPrivate int `json:"is_private"` }
type DataCenterListRoot ¶
type DataCenterListRoot struct { Error bool `json:"error"` Data []DataCenter `json:"data"` Total int `json:"total"` }
type DataCenterService ¶
type DataCenterService interface {
List(ctx context.Context, options *ListOptions) ([]DataCenter, error)
}
type DomainAddReq ¶
type DomainAddReq struct { RuleID string `json:"ruleId"` DomainName string `json:"domainName"` DomainID string `json:"domainId"` Algorithm string `json:"algorithm"` RedirectHTTP int `json:"redirectHTTP"` CookieCheck bool `json:"cookieCheck"` CookieName string `json:"cookieName"` BackPort int `json:"backPort"` Backends []Backend `json:"backends"` }
type DomainService ¶
type DomainService interface { ListDomainByProject(ctx context.Context, options *ListOptions, projectIdentifier string) ([]Domain, error) DnsRecord(ctx context.Context, domainIdentifier string, dnsRecord *DnsRecord) error ListDomains(ctx context.Context, options *ListOptions) ([]Domain, error) ListAllDomains(ctx context.Context) ([]Domain, error) ListDomainVpsies(ctx context.Context, options *ListOptions) ([]DomainVpsie, error) CreateDomain(ctx context.Context, createReq *CreateDomainRequest) error GetDomainByVpsie(ctx context.Context, domainIdentifier string) ([]Domain, error) UpdateReverse(ctx context.Context, reverseReq *ReverseRequest) error AddReverse(ctx context.Context, reverseReq *ReverseRequest) error UpdateDomain(ctx context.Context, dnsRecord *DnsRecord, domainIdentifier, vmIdentifier string) error DeleteReverse(ctx context.Context, ip, vmIdentifier string) error CreateDnsRecord(ctx context.Context, createReq CreateDnsRecordReq) error UpdateDnsRecord(ctx context.Context, updateReq *UpdateDnsRecordReq) error DeleteDomain(ctx context.Context, domainIdentifier, reason, note string) error DeleteDnsRecord(ctx context.Context, domainIdentifier string, record *Record) error ListReversePTRRecords(ctx context.Context) ([]ReversePTR, error) }
type DomainUpdateReq ¶
type DomainUpdateReq struct { DomainID string `json:"domainId"` Subdomain string `json:"subdomain"` Algorithm string `json:"algorithm"` RedirectHTTP int `json:"redirectHTTP"` CookieCheck bool `json:"cookieCheck"` CookieName string `json:"cookieName"` BackPort int `json:"backPort"` CheckInterval int `json:"checkInterval"` FastInterval int `json:"fastInterval"` Rise int `json:"rise"` Fall int `json:"fall"` }
type DomainVpsie ¶
type DomainVpsie struct { HostName string `json:"hostname"` IP string `json:"ip"` Identifier string `json:"identifier"` IPVersion string `json:"ip_version"` MaskCIDR int `json:"mask_cidr"` DCIdentifier string `json:"dc_identifier"` Category string `json:"category"` FullName string `json:"fullname"` PCS int `json:"pcs"` }
type EnableAutoBackupReq ¶
type EnableAutoSnapshotReq ¶
type EstimatedUsages ¶
type EstimatedUsages struct { ID int `json:"id"` ProductID int `json:"product_id"` EntityType string `json:"entity_type"` EntityID int `json:"entity_id"` UserID int `json:"user_id"` StartDate time.Time `json:"start_date"` EndDate *string `json:"end_date"` TypeOfTrigger string `json:"type_of_trigger"` CreatedOn time.Time `json:"created_on"` UpdatedAt time.Time `json:"updated_at"` Identifier string `json:"identifier"` Quantity int `json:"quantity"` Unit string `json:"unit"` Price string `json:"price"` CostValue string `json:"cost_value"` CostValueMonth string `json:"cost_value_month"` EntityName string `json:"entity_name"` Description string `json:"description"` }
type FileListingStatusRoot ¶
type FipService ¶
type FirewallGroup ¶
type FirewallGroup struct { UserName string `json:"user_name"` ID int64 `json:"id"` GroupName string `json:"group_name"` Identifier string `json:"identifier"` CreatedOn string `json:"created_on"` UpdatedOn string `json:"updated_on"` InboundCount int64 `json:"inbound_count"` OutboundCount int64 `json:"outbound_count"` Vms int64 `json:"vms"` CreatedBy int64 `json:"created_by"` }
type FirewallGroupDetailData ¶
type FirewallGroupDetailData struct { Group FirewallGroup `json:"group"` Rules []FirewallRules `json:"rules"` Vms []VmsData `json:"vms"` Count int64 `json:"count"` }
type FirewallGroupListData ¶
type FirewallGroupListData struct { UserName string `json:"user_name"` ID int64 `json:"id"` GroupName string `json:"group_name"` Identifier string `json:"identifier"` CreatedOn string `json:"created_on"` UpdatedOn string `json:"updated_on"` InboundCount int64 `json:"inbound_count"` OutboundCount int64 `json:"outbound_count"` Vms int64 `json:"vms"` CreatedBy int64 `json:"created_by"` Rules []FirewallRules `json:"rules"` VmsData []VmsData `json:"vmsData"` }
type FirewallGroupService ¶
type FirewallGroupService interface { Create(ctx context.Context, groupName string, firewallUpdateReq []FirewallUpdateReq) error List(ctx context.Context, options *ListOptions) ([]FirewallGroupListData, error) Get(ctx context.Context, fwGroupId string) (*FirewallGroupDetailData, error) Delete(ctx context.Context, fwGroupId string) error Update(ctx context.Context, fwGroupReq *FirewallUpdateReq, fwGroupId string) error AssignToVpsie(ctx context.Context, groupId, vmId string) error DetachFromVpsie(ctx context.Context, groupId, vmId string) error AttachToVpsie(ctx context.Context, groupId, vmId string) error DeleteFirewallGroupOfServer(ctx context.Context, groupId, vmId string) error GetFirewallGroup(ctx context.Context, fwGroupId string) (*FirewallGroupDetailData, error) }
type FirewallRules ¶
type FirewallRules struct { InBound []InBoundFirewallRules `json:"inBound"` OutBound []OutBoundFirewallRules `json:"outBound"` }
type FirewallService ¶
type FirewallUpdateReq ¶
type FirewallUpdateReq struct { Action string `json:"action"` Type string `json:"type"` Dport string `json:"dport"` Proto string `json:"proto"` Source []string `json:"source,omitempty"` Sport string `json:"sport"` Enable int64 `json:"enable"` Macro string `json:"macro"` Comment string `json:"comment"` Dest []string `json:"dest,omitempty"` }
type FloatingIpData ¶
type FloatingIpData struct { }
type Gateway ¶
type Gateway struct { ID int64 `json:"id"` DatacenterID int64 `json:"datacenter_id"` IPPropertiesID int64 `json:"ip_properties_id"` IP string `json:"ip"` IsReserved int64 `json:"is_reserved"` IPVersion string `json:"ip_version"` BoxID *int64 `json:"box_id,omitempty"` IsPrimary int64 `json:"is_primary"` Notes *string `json:"notes,omitempty"` UserID int64 `json:"user_id"` UpdatedAt time.Time `json:"updated_at"` IsGatewayReserved int64 `json:"is_gateway_reserved"` IsUserAccountGateway int64 `json:"is_user_account_gateway"` DatacenterName string `json:"datacenterName"` State string `json:"state"` DcIdentifier string `json:"dcIdentifier"` CreatedBy string `json:"created_by"` AttachedVms []AttachedVM `json:"attachedVms"` }
type GatewayService ¶
type GatewayService interface { List(ctx context.Context, options *ListOptions) ([]Gateway, error) Delete(ctx context.Context, ipId int) error Create(ctx context.Context, createReq *CreateGatewayReq) error Get(ctx context.Context, id int64) (*Gateway, error) AttachVM(ctx context.Context, id int64, vms []string, ignoreLegacyVms int64) error DetachVM(ctx context.Context, id int64, mapping_id []int64) error }
type GeneralRspRoot ¶
type GeneralRspRoot struct { Error bool `json:"error"` Data interface{} `json:"data"` }
type GetBackupPolicyRoot ¶
type GetBackupPolicyRoot struct { Error bool `json:"error"` Data BackupPolicy `json:"data"` }
type GetBackupsRoot ¶
type GetBucketRoot ¶
type GetFirewallGroupRoot ¶
type GetFirewallGroupRoot struct { Error bool `json:"error"` Data FirewallGroupDetailData `json:"data"` }
type GetGatewayRoot ¶
type GetK8sRoot ¶
type GetPermissionGroupRoot ¶
type GetPermissionGroupRoot struct { Error bool `json:"error"` Data struct { OwnGroups []PermissionGroup `json:"ownGroups"` InvitedGroup []PermissionGroup `json:"InvitedGroups"` } `json:"data"` }
type GetProfileRoot ¶
type GetSnapShotPolicyRoot ¶
type GetSnapShotPolicyRoot struct { Error bool `json:"error"` Data SnapShotPolicy `json:"data"` }
type GetSnapshotRoot ¶
type GetStatusRoot ¶
type GetStorageRoot ¶
type GetStorageRoot struct { Error bool `json:"error"` Data StorageDetail `json:"data"` }
type GetVPCRoot ¶
type IP ¶
type IP struct { ID int `json:"id"` DcName string `json:"dcName"` DcIdentifier string `json:"dcIdentifier"` RangeID int `json:"range_id"` IP string `json:"ip"` IPVersion string `json:"ip_version"` IsPrimary int `json:"is_primary"` Hostname string `json:"hostname"` BoxID int `json:"box_id"` BoxIdentifier string `json:"box_identifier"` FullName string `json:"fullName"` Category string `json:"category"` UserID int `json:"user_id"` OwnerID int `json:"owner_id"` CreatedBy string `json:"created_by"` Type string `json:"type"` UpdatedAt string `json:"updated_at"` }
type IPsService ¶
type IPsService interface { ListPrivateIPs(ctx context.Context, options *ListOptions) ([]IP, error) ListPublicIPs(ctx context.Context, options *ListOptions) ([]IP, error) ListAllIPs(ctx context.Context, options *ListOptions) ([]IP, error) DeleteIP(ctx context.Context, ip, vmIdentifier string) error CreateIps(ctx context.Context, ipType, vmIdentifier string) error }
type ImageCategories ¶
type ImageCategories struct { }
type ImagesService ¶
type ImagesService interface { DeleteImage(ctx context.Context, imageIdentifier string) error List(ctx context.Context, options *ListOptions) ([]CustomImage, error) CreateImages(ctx context.Context, dcIdentifier, imageName, imageUrl string) error CreateServerByImage(ctx context.Context, createServerReq *CreateServerRequest) error GetImage(ctx context.Context, imageIdentifier string) (*CustomImage, error) }
type InBoundFirewallRules ¶
type InBoundFirewallRules struct { ID int64 `json:"id"` GroupID int64 `json:"group_id"` UserID int64 `json:"user_id"` Action string `json:"action"` Type string `json:"type"` Comment string `json:"comment"` Dest []string `json:"dest"` Dport string `json:"dport"` Proto string `json:"proto"` Source []string `json:"source,omitempty"` Sport string `json:"sport"` Enable int64 `json:"enable"` Iface string `json:"iface,omitempty"` Log string `json:"log,omitempty"` Macro string `json:"macro,omitempty"` Identifier string `json:"identifier"` CreatedOn time.Time `json:"created_on"` UpdatedOn time.Time `json:"updated_on"` }
type Invoice ¶
type Invoice struct { ID int `json:"id"` UserID int `json:"user_id"` Date time.Time `json:"date"` SerialNumber string `json:"serial_number"` Total string `json:"total"` DiscountID *int `json:"discount_id"` TaxID *int `json:"tax_id"` DiscountValue *float32 `json:"discount_value"` TaxValue *float32 `json:"tax_value"` TotalAfterDiscountAndTaxes *float32 `json:"total_after_discount_and_taxes"` IsPaid int `json:"is_paid"` CreatedOn time.Time `json:"created_on"` UpdatedAt time.Time `json:"updated_at"` Month int `json:"month"` Year int `json:"year"` Identifier string `json:"identifier"` OldInvoice int `json:"old_invoice"` IsCustom int `json:"is_custom"` EndPeriod *string `json:"end_period"` CustomUserName *string `json:"custom_user_name"` CustomBillAddress *string `json:"custom_bill_address"` IsHidden int `json:"is_hidden"` TaxPercentage *string `json:"tax_percentage"` DiscountPercentage *string `json:"discount_percentage"` InvoiceStatus int `json:"invoice_status"` Notes *string `json:"notes"` DueDate *string `json:"due_date"` TransactionID *int `json:"transaction_id"` PaidValue *string `json:"paid_value"` PaymentMethod *string `json:"payment_method"` BankDetails int `json:"bank_details"` VatPercentage string `json:"vat_percentage"` Username string `json:"username"` TaxName *string `json:"tax_name"` TaxType *string `json:"tax_type"` DiscountName *string `json:"discount_name"` DiscountType *string `json:"discount_type"` ResellerName *string `json:"reseller_name"` ResellerID *string `json:"reseller_id"` IsUserHaveReseller *int `json:"is_user_have_reseller"` StartingDate string `json:"startingDate"` ClosingDate string `json:"closingDate"` StartingBalance float64 `json:"startingBalance"` ClosingBalance float64 `json:"closingBalance"` }
type K8s ¶
type K8s struct { ClusterName string `json:"cluster_name"` Identifier string `json:"identifier"` Count int `json:"count"` Nodes []Node `json:"nodes"` CreatedOn string `json:"created_on"` UpdatedOn string `json:"updated_on"` CreatedBy string `json:"created_by"` NickName string `json:"nickname"` Cpu int `json:"cpu"` Ram int `json:"ram"` Traffic int `json:"traffic"` Color string `json:"color"` Price float64 `json:"price"` }
type K8sGroup ¶
type K8sGroup struct { ID int64 `json:"id"` GroupName string `json:"group_name"` UserID int64 `json:"user_id"` BoxsizeID int64 `json:"boxsize_id"` DatacenterID int64 `json:"datacenter_id"` RAM int64 `json:"ram"` CPU int64 `json:"cpu"` Ssd int64 `json:"ssd"` Traffic int64 `json:"traffic"` Notes string `json:"notes,omitempty"` CreatedOn time.Time `json:"created_on"` LastUpdated time.Time `json:"last_updated"` DroppedOn time.Time `json:"dropped_on,omitempty"` IsActive int64 `json:"is_active"` IsDeleted int64 `json:"is_deleted"` Identifier string `json:"identifier"` ProjectID int64 `json:"project_id"` ClusterID int64 `json:"cluster_id"` NodesCount int64 `json:"nodes_count"` DcIdentifier string `json:"dcIdentifier"` }
type K8sService ¶
type K8sService interface { List(ctx context.Context, options *ListOptions) ([]ListK8s, error) Delete(ctx context.Context, identifier, reason, note string) error Create(ctx context.Context, createReq *CreateK8sReq) error Get(ctx context.Context, identifier string) (*K8s, error) AddSlave(ctx context.Context, identifier string) error RemoveSlave(ctx context.Context, identifier string) error ListK8sGroups(ctx context.Context, identifier string) ([]K8sGroup, error) AddNode(ctx context.Context, identifier, nodeType string, groupId int) error RemoveNode(ctx context.Context, identifier, nodeType string, groupId int) error CreateK8sGroup(ctx context.Context, createReq *CreateK8sGroupReq) error DeleteK8sGroup(ctx context.Context, groupId string, reason, note string) error UpgradeK8sVersion(ctx context.Context, identifier string) error PatchK8sVersion(ctx context.Context, identifier, processId string) error }
type LB ¶
type LB struct { Cpu int `json:"cpu"` Ssd int `json:"ssd"` Ram int `json:"ram"` LBName string `json:"lbName"` Traffic int `json:"traffic"` BoxsizeID int `json:"boxsize_id"` DefaultIP string `json:"default_ip"` DCName string `json:"dc_name"` Identifier string `json:"identifier"` CreatedOn string `json:"created_on"` UpdatedAt string `json:"updated_at"` Package string `json:"package"` CreatedBy string `json:"created_by"` UserID int `json:"user_id"` }
type LBBackendsDetail ¶
type LBDataCenter ¶
type LBDetails ¶
type LBDetails struct { LBName string `json:"lbName"` Identifier string `json:"identifier"` Traffic int `json:"traffic"` BoxsizeID int `json:"boxsize_id"` DefaultIP string `json:"default_ip"` DcName string `json:"dc_name"` DcID string `json:"dcId"` CreatedBy string `json:"created_by"` UserID int `json:"user_id"` Rules []LBRuleDetail `json:"rules"` }
type LBDomainsDetail ¶
type LBDomainsDetail struct { DomainName string `json:"domainName"` BackendScheme string `json:"backendScheme"` Subdomain *string `json:"subdomain,omitempty"` Algorithm string `json:"algorithm"` RedirectHTTP int `json:"redirectHTTP"` HealthCheckPath string `json:"healthCheckPath"` CookieCheck int `json:"cookieCheck"` CookieName string `json:"cookieName"` CreatedOn time.Time `json:"created_on"` BackPort int `json:"backPort"` DomainID string `json:"domainId"` CheckInterval int `json:"checkInterval"` FastInterval int `json:"fastInterval"` Rise int `json:"rise"` Fall int `json:"fall"` Backends []LBBackendsDetail `json:"backends"` }
type LBOffers ¶
type LBOffers struct { Cpu int `json:"cpu"` Ram int `json:"ram"` Ssd int `json:"ssd"` Traffic int `json:"traffic"` Price string `json:"price"` NickName string `json:"nickname"` Identifier string `json:"identifier"` Color string `json:"color"` NetSpeed int `json:"net_speed"` Category string `json:"category"` Description string `json:"description"` }
type LBRuleDetail ¶
type LBRuleDetail struct { Scheme string `json:"scheme"` FrontPort int `json:"frontPort"` BackPort int `json:"backPort"` CreatedOn time.Time `json:"created_on"` RuleID string `json:"ruleId"` Domains []LBDomainsDetail `json:"domains,omitempty"` Backends []LBBackendsDetail `json:"backends,omitempty"` }
type LBsService ¶
type LBsService interface { ListLBs(ctx context.Context, options *ListOptions) ([]LB, error) ListLBDataCenters(ctx context.Context, options *ListOptions) ([]LBDataCenter, error) ListOffers(ctx context.Context, dcIdentifier string) ([]LBOffers, error) GetLB(ctx context.Context, lbID string) (*LBDetails, error) CreateLB(ctx context.Context, createLBReq *CreateLBReq) error DeleteLB(ctx context.Context, lbID, reason, note string) error AddLBRule(ctx context.Context, addRuleReq *AddRuleReq) error DeleteLBRule(ctx context.Context, ruleID string) error AddLBDomain(ctx context.Context, domainAddReq *DomainAddReq) error ReplaceDomain(ctx context.Context, domainId, newDomainId string) error UpdateDomainBackend(ctx context.Context, domainId string, backends []Backend) error UpdateLBDomain(ctx context.Context, domainUpdateReq *DomainUpdateReq) error UpdateLBRules(ctx context.Context, ruleUpdateReq *RuleUpdateReq) error DeleteLBDomain(ctx context.Context, domainID string) error DeleteLBBackend(ctx context.Context, lbBackendID string) error ListPendingLBs(ctx context.Context) ([]PendingLB, error) }
type ListAccessTokensRoot ¶
type ListAccessTokensRoot struct { Error bool `json:"error"` Data []AccessToken `json:"data"` }
type ListActionOfUserRoot ¶
type ListActionOfUserRoot struct { Error bool `json:"error"` Data []QuickActions `json:"data"` Total int `json:"total "` }
type ListActivityLogsRoot ¶
type ListActivityLogsRoot struct { Error bool `json:"error"` Data []ActivityLog `json:"data"` Total int `json:"total"` }
type ListAllNodesOfUserRoot ¶
type ListAppliedVouchersRoot ¶
type ListAppliedVouchersRoot struct { Error bool `json:"error"` Data []AppliedVouchers `json:"data"` Total int `json:"total"` }
type ListAuditLogsRoot ¶
type ListBackupPoliciesRoot ¶
type ListBackupPoliciesRoot struct { Error bool `json:"error"` Data struct { Rows []BackupPolicyListDetail `json:"rows"` } `json:"data"` }
type ListBackupsRoot ¶
type ListBillingLogsRoot ¶
type ListBillingLogsRoot struct { Error bool `json:"error"` Data []BillingLog `json:"data"` Total int `json:"total"` }
type ListBucketKeysRoot ¶
type ListBucketRoot ¶
type ListCustomImageRoot ¶
type ListCustomImageRoot struct { Error bool `json:"error"` Data []CustomImage `json:"data"` Total int `json:"total "` }
type ListDomainRoot ¶
type ListDomainVpsieRoot ¶
type ListDomainVpsieRoot struct { Error bool `json:"error"` Vpsie []DomainVpsie `json:"data"` Total int `json:"total"` }
type ListEstimatedUsagesRoot ¶
type ListEstimatedUsagesRoot struct { Error bool `json:"error"` Total int `json:"total"` Data []EstimatedUsages `json:"data"` BalanceData struct { CurrentBalance float64 `json:"current_balance"` BalanceCharged int `json:"balance_charged"` MonthlyCharge string `json:"monthly_charge"` ActualMonthlyCharge string `json:"actual_monthly_charge"` AddedWithCc int `json:"added_with_cc"` AddedWithCcOrPp int `json:"added_with_cc_or_pp"` BillCity interface{} `json:"bill_city"` BillCountry interface{} `json:"bill_country"` IsPostPaid int `json:"is_post_paid"` } `json:"balanceData"` }
type ListFirewallGroupsRoot ¶
type ListFirewallGroupsRoot struct { Error bool `json:"error"` Data []FirewallGroupListData `json:"data"` Total int64 `json:"total"` }
type ListGatewayRoot ¶
type ListIPsRoot ¶
type ListInvoicesRoot ¶
type ListK8s ¶
type ListK8s struct { ClusterName string `json:"cluster_name"` Identifier string `json:"identifier"` Count int `json:"count"` CreatedOn string `json:"created_on"` UpdatedOn string `json:"updated_on"` CreatedBy string `json:"created_by"` NickName string `json:"nickname"` Cpu int `json:"cpu"` Ram int `json:"ram"` Traffic int `json:"traffic"` Color string `json:"color"` Price float64 `json:"price"` ManagerCount int `json:"managerCount"` SlaveCount int `json:"slaveCount"` }
type ListK8sGroupRoot ¶
type ListK8sRoot ¶
type ListLBDataCentersRoot ¶
type ListLBDataCentersRoot struct { Error bool `json:"error"` Data []LBDataCenter `json:"data"` Total int `json:"total"` }
type ListLBsRoot ¶
type ListMacrosRoot ¶
type ListMacrosRoot []Macros
type ListMonitoringRuleRoot ¶
type ListMonitoringRuleRoot struct { Error bool `json:"error"` Data []MonitoringRule `json:"data"` Total int `json:"total"` }
type ListOffersRoot ¶
type ListOptions ¶
type ListOptions struct { // For paginated result sets, page of results to retrieve. Page int `url:"page,omitempty"` // For paginated result sets, the number of results to include per page. PerPage int `url:"per_page,omitempty"` }
ListOptions specifies the optional parameters to various List methods that support pagination.
type ListPurchaseLogRoot ¶
type ListPurchaseLogRoot struct { Error bool `json:"error"` Data []PurchaseLog `json:"data"` Total int `json:"total"` }
type ListReversePTRRoot ¶
type ListReversePTRRoot struct { Error bool `json:"error"` Data []ReversePTR `json:"data"` }
type ListScriptRoot ¶
type ListServerByIdentifierRoot ¶
type ListServerByIdentifierRoot struct { Error bool `json:"error"` Data struct { VmData VmData `json:"vmData"` ImageCategories []ImageCategories `json:"imageCategories"` VmTags []VmTags `json:"vmTags"` PrivateIpData []PrivateIpData `json:"privateIpData"` FloatingIpData []FloatingIpData `json:"floatingIpData"` } `json:"data"` Total int64 `json:"total"` }
type ListServerRoot ¶
type ListSnapShotPoliciesRoot ¶
type ListSnapShotPoliciesRoot struct { Error bool `json:"error"` Data struct { Rows []SnapShotPolicyListDetail `json:"rows"` } `json:"data"` }
type ListSnapshotsRoot ¶
type ListStorageDataCenterRoot ¶
type ListStorageDataCenterRoot struct { Error bool `json:"error"` Data []DataCenter `json:"data"` }
type ListStorageRoot ¶
type ListStorageSnapShotRoot ¶
type ListStorageSnapShotRoot struct { Error bool `json:"error"` Data []StorageSnapShot `json:"data"` Total int `json:"total"` }
type ListUserLimitRoot ¶
type ListVPCRoot ¶
type ListVirtualMachineRoot ¶
type ListVirtualMachineRoot struct { Error bool `json:"error"` Data []VirtualMachine `json:"data"` }
type ListVmLogsRoot ¶
type ListVmToAttachRoot ¶
type ListVmToAttachRoot struct { Error bool `json:"error"` Data []VmToAttach `json:"data"` Total int `json:"total"` }
type LogsService ¶
type LogsService interface { ListActivityLogs(ctx context.Context, options *ListOptions) ([]ActivityLog, error) ListBillingLogs(ctx context.Context, options *ListOptions) ([]BillingLog, error) ListAuditLogs(ctx context.Context, options *ListOptions) ([]AuditLog, error) ListVPSieLogs(ctx context.Context, options *ListOptions) ([]VmLog, error) }
type MonitoringRule ¶
type MonitoringRule struct { ID int `json:"id"` UserId int `json:"user_id"` MetricType string `json:"metric_type"` RuleName string `json:"rule_name"` Condition string `json:"condition"` Email string `json:"email"` Threshold int `json:"threshold"` ThresholdType string `json:"threshold_type"` Period int `json:"period"` Status int `json:"status"` CreatedOn string `json:"created_on"` Frequency int `json:"frequency"` LastAlertDate string `json:"last_alert_date"` Identifier string `json:"identifier"` IsDeleted int `json:"is_deleted"` CreatedBY string `json:"created_by"` }
type MonitoringService ¶
type MonitoringService interface { ListMonitoringRule(ctx context.Context, options *ListOptions) ([]MonitoringRule, error) CreateRule(ctx context.Context, createReq *CreateMonitoringRuleReq) error ToggleMonitoringRuleStatus(ctx context.Context, status, ruleIdentifier string) error DeleteMonitoringRule(ctx context.Context, ruleIdentifier string) error }
type Node ¶
type Node struct { Id int `json:"id"` UserId int `json:"user_id"` HostName string `json:"hostname"` DefaultIP string `json:"default_ip"` PrivateIP string `json:"private_ip"` NodeType int `json:"node_type"` NodeId int `json:"node_id"` DatacenterId int `json:"datacenter_id"` CreatedOn string `json:"created_on"` }
type OutBoundFirewallRules ¶
type OutBoundFirewallRules struct { ID int64 `json:"id"` GroupID int64 `json:"group_id"` UserID int64 `json:"user_id"` Action string `json:"action"` Type string `json:"type"` Comment string `json:"comment"` Dest []string `json:"dest,omitempty"` Dport string `json:"dport"` Proto string `json:"proto"` Source []string `json:"source"` Sport string `json:"sport"` Enable int64 `json:"enable"` Iface string `json:"iface,omitempty"` Log string `json:"log,omitempty"` Macro string `json:"macro,omitempty"` Identifier string `json:"identifier"` CreatedOn time.Time `json:"created_on"` UpdatedOn time.Time `json:"updated_on"` }
type PendingLB ¶
type PendingLB struct { ID string `json:"id"` User struct { } `json:"user"` UserID int `json:"user_id"` Data struct { Algorithm string `json:"algorithm"` LbName string `json:"lbName"` Rules []interface{} `json:"rules"` DcIdentifier string `json:"dcIdentifier"` ResourceIdentifier string `json:"resourceIdentifier"` CookieName string `json:"cookieName"` RedirectHTTP int `json:"redirectHTTP"` CookieCheck bool `json:"cookieCheck"` RequestIP string `json:"requestIp"` PrivateIps []interface{} `json:"privateIps"` } `json:"data"` ResourceData struct { } `json:"resourceData"` Datacenter []interface{} `json:"datacenter"` OsData struct { } `json:"osData"` Running int `json:"running"` Type string `json:"type"` }
type PendingLBRoot ¶
type PendingService ¶
type PendingVm ¶
type PendingVm struct { ID string `json:"id"` User struct { } `json:"user"` UserID int `json:"user_id"` Data struct { ResourceIdentifier string `json:"resourceIdentifier"` OsIdentifier string `json:"osIdentifier"` DcIdentifier string `json:"dcIdentifier"` Hostname string `json:"hostname"` AddPublicIPV4 bool `json:"addPublicIpV4"` AddPublicIPV6 bool `json:"addPublicIpV6"` AddPrivateIP bool `json:"addPrivateIp"` BackupEnabled bool `json:"backupEnabled"` WeeklyBackupEnabled bool `json:"weeklyBackupEnabled"` MonthlyBackupEnabled bool `json:"monthlyBackupEnabled"` Tags []interface{} `json:"tags"` ProjectID int `json:"projectId"` VMPassword string `json:"vmPassword"` ProcessID string `json:"processId"` SSHKeyIdentifier string `json:"sshKeyIdentifier"` ScriptIdentifier string `json:"scriptIdentifier"` IsGeneratedPassword bool `json:"isGeneratedPassword"` RequestIP string `json:"requestIp"` IsCreateFromLibrary bool `json:"isCreateFromLibrary"` } `json:"data"` ResourceData struct { } `json:"resourceData"` Datacenter []interface{} `json:"datacenter"` OsData struct { } `json:"osData"` Running int `json:"running"` Type string `json:"type"` }
type PendingVmsRoot ¶
type PermissionGroup ¶
type PrivateIpData ¶
type PrivateIpData struct { }
type Profile ¶
type Profile struct { Id int `json:"id"` Name string `json:"name"` FirstName string `json:"firstname"` LastName string `json:"lastname"` Email string `json:"email"` CurrentBalance float64 `json:"current_balance"` Identifier string `json:"identifier"` Status string `json:"status"` MonthlyCharge string `json:"monthly_charge"` Invitations int `json:"invitations"` }
type ProfilesService ¶
type ProfilesService interface { ListQuickActionOfUser(ctx context.Context, options *ListOptions) ([]QuickActions, error) ListQuickActionOfAccount(ctx context.Context, options *ListOptions) ([]QuickActions, error) SaveQuickActions(ctx context.Context, actions []int) error GetProfile(ctx context.Context) (*Profile, error) UpdateProfile(context.Context, UpdateProfileRequest) error GetPermissionGroups(ctx context.Context) ([]PermissionGroup, error) DeletePermissionGroup(ctx context.Context, groupId string) error CreatePermissionGroup(ctx context.Context, groupName string) error ChangePassword(ctx context.Context, oldPassword string, newPassword string) error UpdateBilling(ctx context.Context, billing BillingAddress) error ValidatePhone(ctx context.Context, phone string) error VerifyPhone(ctx context.Context, code string) error EnableTwofa(ctx context.Context) error DisableTwofa(ctx context.Context) error }
type ProjectRoot ¶
type ProjectsRoot ¶
type ProjectsService ¶
type ProjectsService interface { List(context.Context, *ListOptions) ([]Project, error) SetDefault(context.Context, string) error Get(ctx context.Context, identifer string) (*Project, error) Create(context.Context, *CreateProjectRequest) error ListAnotherVms(context.Context, string) ([]VmData, error) MoveVms(context.Context, string, string) error AssignToVms(ctx context.Context, projectIdentifier, projectId string) error ListDomains(ctx context.Context, projectIdentifier string) ([]Domain, error) Delete(ctx context.Context, id string) error ListUserLimits(ctx context.Context) (*UserLimit, error) }
type PurchaseLog ¶
type PurchaseLog struct { UserID int `json:"user_id"` ID int `json:"id"` Authority string `json:"authority"` TransactionID string `json:"transaction_id"` VatPercentage interface{} `json:"vat_percentage"` NetAmount string `json:"net_amount"` VatValue interface{} `json:"vat_value"` TotalAmount int `json:"total_amount"` Message string `json:"message"` Amount int `json:"amount"` CreatedOn time.Time `json:"created_on"` LastFour *string `json:"last_four"` CardType *string `json:"card_type"` Firstname string `json:"firstname"` Lastname string `json:"lastname"` BillAddress string `json:"bill_address"` BillCountry string `json:"bill_country"` BillCity string `json:"bill_city"` BillState string `json:"bill_state"` BillZip string `json:"bill_zip"` EntityName *string `json:"entity_name"` }
type QuickActions ¶
type ResumeReq ¶
type ResumeReq struct { VmIdentifier string `json:"vmIdentifier"` OsIdentifier string `json:"osIdentifier"` ScriptIdentifier string `json:"scriptIdentifier"` SshKeyIdentifier string `json:"sshKeyIdentifier"` HostName string `json:"hostname"` Password string `json:"password"` IsOnPremise bool `json:"isOnPremise"` }
type ReversePTR ¶
type ReverseRequest ¶
type RuleUpdateReq ¶
type Script ¶
type Script struct { UserID int `json:"user_id"` BoxID int `json:"box_id"` BoxIdentifier string `json:"box_identifier"` ScriptName string `json:"script_name"` Script string `json:"script"` CreatedOn time.Time `json:"created_on"` Identifier string `json:"identifier"` CreatedBy string `json:"created_by"` }
type ScriptDetail ¶
type ScriptDetail struct { ID int `json:"id"` UserID int `json:"user_id"` BoxID int `json:"box_id"` BoxIdentifier string `json:"box_identifier"` Name string `json:"name"` Script string `json:"script"` CreatedOn time.Time `json:"created_on"` Identifier string `json:"identifier"` ScriptName string `json:"script_name"` Type string `json:"type"` }
type ScriptRoot ¶
type ScriptRoot struct { Error bool `json:"error"` Data ScriptDetail `json:"data"` }
type ScriptUpdateRequest ¶
type ScriptsService ¶
type ScriptsService interface { GetScripts(ctx context.Context) ([]Script, error) GetScript(ctx context.Context, scriptId string) (ScriptDetail, error) CreateScript(ctx context.Context, createScriptRequest *CreateScriptRequest) error UpdateScript(ctx context.Context, scriptUpdateRequest *ScriptUpdateRequest) error DeleteScript(ctx context.Context, scriptId string) error }
type ServerConsole ¶
type ServerConsoleRoot ¶
type ServerConsoleRoot struct { Error bool `json:"error"` ServerConsole ServerConsole `json:"data"` }
type ServerService ¶
type ServerService interface { ListServer(context.Context, *ListOptions, string) ([]VmData, error) List(context.Context, *ListOptions) ([]VmData, error) GetServerByIdentifier(context.Context, string) (*VmData, error) GetServerStatusByIdentifier(context.Context, string) (*Status, error) GetServerConsole(ctx context.Context, identifierId string) (*ServerConsole, error) CreateServer(context.Context, *CreateServerRequest) error DeleteServer(ctx context.Context, identifierId, password, reason, note string) error StartServer(ctx context.Context, identifierId string) error StopServer(ctx context.Context, identifierId string) error RestartServer(ctx context.Context, identifierId string) error ChangePassword(ctx context.Context, identifierId string, newPassword string) error ChangeHostName(ctx context.Context, identifierId string, newHostname string) error AddVPC(ctx context.Context, request *VpcRequest) error MoveVPC(ctx context.Context, request *VpcRequest) error AddTags(ctx context.Context, identifierId string, tags []string) error ResizeServer(ctx context.Context, identifierId, cpu, ram string) error AddSsh(ctx context.Context, identifierId, sshKeyIdentifier string) error AddScript(ctx context.Context, identifierId, scriptIdentifier string) error Lock(ctx context.Context, identifierId string) error UnLock(ctx context.Context, identifierId string) error DoMultiActions(ctx context.Context, vmsIdentifiers []string, actionType, sshKeyIdentifier string) error EnableIpv6(ctx context.Context, identifierId string) error EnableIpv4(ctx context.Context, identifierId string) error AddFip(ctx context.Context, identifierId, dcIdentifier string) error Resume(ctx context.Context, resumeReq *ResumeReq) error ResetNetwork(ctx context.Context, vmIdentifier string) error EditTag(ctx context.Context, tags []string, vmIdentifer string) error ResetAllFirewalls(ctx context.Context) error ListVirtualMachines(ctx context.Context) ([]VirtualMachine, error) ListAllNodesOfUser(ctx context.Context) ([]VmData, error) CheckAgentStatus(ctx context.Context, vmIdentifier string) (bool, error) }
type SnapShotPolicy ¶
type SnapShotPolicy struct { Name string `json:"name"` Identifier string `json:"identifier"` CreatedOn string `json:"created_on"` CreatedBy string `json:"created_by"` BackupPlan string `json:"backupPlan"` PlanEvery int64 `json:"planEvery"` Keep int64 `json:"keep"` Disabled int64 `json:"disabled"` UserId int64 `json:"userId"` Vms []SnapShotVms `json:"vms"` }
type SnapShotPolicyListDetail ¶
type SnapShotPolicyListDetail struct { Name string `json:"name"` Identifier string `json:"identifier"` CreatedOn string `json:"created_on"` CreatedBy string `json:"created_by"` BackupPlan string `json:"backupPlan"` PlanEvery int64 `json:"planEvery"` Keep int64 `json:"keep"` Disabled int64 `json:"disabled"` VmsCount int64 `json:"vmsCount"` UserId int64 `json:"userId"` }
type SnapShotVms ¶
type SnapShotVms struct { Name string `json:"name"` Identifier string `json:"identifier"` Category string `json:"category"` Fullname string `json:"fullname"` Type string `json:"type"` }
snap shot policy
type Snapshot ¶
type Snapshot struct { Hostname string `json:"hostname"` Name string `json:"name"` Identifier string `json:"identifier"` BackupKey string `json:"backupKey"` State string `json:"state"` DcIdentifier string `json:"dcIdentifier"` Daily int64 `json:"daily"` IsSnapshot int64 `json:"is_snapshot"` VmIdentifier string `json:"vmIdentifier"` BackupSHA1 string `json:"backupsha1"` IsDeletedVM int64 `json:"is_deleted_vm"` CreatedOn time.Time `json:"created_on"` Note string `json:"note"` BackupSize int64 `json:"backup_size"` DcName string `json:"dcName"` Weekly int64 `json:"weekly"` Monthly int64 `json:"monthly"` BoxID int64 `json:"box_id"` GlobalBackup int64 `json:"global_backup"` OsIdentifier string `json:"osIdentifier"` OsFullName string `json:"osFullName"` VMCategory string `json:"vmCategory"` VMSSD int64 `json:"vmSSD"` }
type SnapshotService ¶
type SnapshotService interface { List(ctx context.Context, options *ListOptions) ([]Snapshot, error) Create(ctx context.Context, name, vmIdentifier, note string) error ListByVm(ctx context.Context, options *ListOptions, vmIdentifier string) ([]Snapshot, error) Rollback(ctx context.Context, snapshotIdentifier string) error EnableAuto(ctx context.Context, enableReq *EnableAutoSnapshotReq) error Delete(ctx context.Context, snapshotIdentifier, reason, note string) error Update(ctx context.Context, snapshotIdentifier, newNote string) error Get(ctx context.Context, buckupIdentifier string) (*Snapshot, error) GetSnapShotPolicy(ctx context.Context, identifier string) (*SnapShotPolicy, error) CreateSnapShotPolicy(ctx context.Context, createReq *CreateSnapShotPolicyReq) error DeleteSnapShotPolicy(ctx context.Context, policyId, identifier string) error ManageRetainSnapShotPolicy(ctx context.Context, policyId string, keep int64) error AttachSnapShotPolicy(ctx context.Context, policyId string, vms []string) error DetachSnapShotPolicy(ctx context.Context, policyId string, vms []string) error ListSnapShotPolicies(ctx context.Context, options *ListOptions) ([]SnapShotPolicyListDetail, error) }
type SshKeysGetRoot ¶
type SshKeysListRoot ¶
type SshkeysService ¶
type Status ¶
type Status struct { Cpu int64 `json:"cpu"` Ballon int64 `json:"ballon"` Uptime int64 `json:"uptime"` Pid string `json:"pid"` Disk int64 `json:"disk"` RunningMachine string `json:"running-machine"` RunningQemu string `json:"running-qemu"` Status string `json:"status"` DiskRead string `json:"diskread"` DiskWrite string `json:"diskwrite"` Fullname string `json:"fullname"` }
type Storage ¶
type Storage struct { ID int `json:"id"` Name string `json:"name"` Description string `json:"description"` UserID int `json:"user_id"` BoxID int `json:"box_id"` Identifier string `json:"identifier"` UserTemplateID int `json:"user_template_id"` StorageType string `json:"storage_type"` DiskFormat string `json:"disk_format"` IsAutomatic int `json:"is_automatic"` Size int `json:"size"` StorageID int `json:"storage_id"` DiskKey string `json:"disk_key"` CreatedOn string `json:"created_on"` VmIdentifier string `json:"vmIdentifier"` Hostname string `json:"hostname"` OsIdentifier string `json:"osIdentifier"` State string `json:"state"` DcIdentifier string `json:"dcIdentifier"` BusDevice string `json:"bus_device"` BusNumber int `json:"bus_number"` }
type StorageCreateRequest ¶
type StorageCreateRequest struct { Name string `json:"name"` DcIdentifier string `json:"dcIdentifier"` Description string `json:"description"` Size int `json:"size"` StorageType string `json:"storageType"` DiskFormat string `json:"diskFormat"` IsAutomatic int `json:"isAutomatic"` K8sTrials int `json:"k8sTrials"` }
type StorageDetail ¶
type StorageDetail struct { ID int `json:"id"` Name string `json:"name"` Description string `json:"description"` UserID int `json:"user_id"` BoxID int `json:"box_id"` Identifier string `json:"identifier"` UserTemplateID int `json:"user_template_id"` StorageType string `json:"storage_type"` DiskFormat string `json:"disk_format"` BusDevice string `json:"bus_device"` IsAutomatic int `json:"is_automatic"` Size int `json:"size"` IsDeleted int `json:"is_deleted"` BusNumber int `json:"bus_number"` DatacenterID int `json:"datacenter_id"` UpdatedAt time.Time `json:"updated_at"` StorageID int `json:"storage_id"` DiskKey string `json:"disk_key"` CreatedOn time.Time `json:"created_on"` IndexTemplateProp string `json:"index_template_prop"` EntityType string `json:"entity_type"` Hostname string `json:"hostname"` IsDeletedVM int `json:"is_deleted_vm"` State string `json:"state"` DcName string `json:"dcName"` DcIdentifier string `json:"dcIdentifier"` VMIdentifier string `json:"vmIdentifier"` OsIdentifier string `json:"osIdentifier"` OsFullName string `json:"osFullName"` VMCategory string `json:"vmCategory"` VMSSD int `json:"vmSSD"` }
type StorageService ¶
type StorageService interface { List(ctx context.Context, options *ListOptions) ([]Storage, error) Delete(ctx context.Context, storageIdentifier string) error AttachToServer(ctx context.Context, storageIdentifier, vmIdentifier string, vmType string) error DetachToServer(ctx context.Context, storageIdentifier, vmIdentifier string, vmType string) error CreateContainer(ctx context.Context, dcIdentifier string) error ListAll(ctx context.Context, options *ListOptions) ([]Storage, error) Create(ctx context.Context, createReq *StorageCreateRequest, vmIdentifier string, vmType string) error ListVmsToAttach(ctx context.Context) ([]VmToAttach, error) CreateVolume(ctx context.Context, creatReq *StorageCreateRequest) error CreateStorage(ctx context.Context, createReq *StorageCreateRequest) error DetachAllFromServer(ctx context.Context, vmIdentifier string, vmType string) error UpdateSize(ctx context.Context, storageIdentifier, size string) error UpdateName(ctx context.Context, storageIdentifier, name string) error CreateSnapshot(ctx context.Context, storageIdentifier, name, storageType string) error ListSnapshots(ctx context.Context, options *ListOptions) ([]StorageSnapShot, error) UpdateSnapshotName(ctx context.Context, snapshotIdentifier, name string) error RollbackSnapshot(ctx context.Context, snapshotIdentifier, snapType string) error CloneSnapshot(ctx context.Context, snapshotIdentifier, snapType string) error DeleteSnapshot(ctx context.Context, snapshotIdentifier string) error DeleteAllSnapshots(ctx context.Context, storageIdentifier string) error Get(ctx context.Context, identifier string) (*StorageDetail, error) ListStorageDataCenter(ctx context.Context) ([]DataCenter, error) }
type StorageSnapShot ¶
type StorageSnapShot struct { ID int `json:"id"` StorageID int `json:"storage_id"` Identifier string `json:"identifier"` Name string `json:"name"` Size int `json:"size"` CreatedOn time.Time `json:"created_on"` UserID int `json:"user_id"` IsDeleted int `json:"is_deleted"` SnapshotKey string `json:"snapshot_key"` StorageName string `json:"storage_name"` StorageType string `json:"storage_type"` DiskFormat string `json:"disk_format"` BoxID int `json:"box_id"` EntityType string `json:"entity_type"` }
type StorageUpdateRequest ¶
type Token ¶
type Token struct { Access TokenDetails `json:"access"` Refresh TokenDetails `json:"refresh"` }
type TokenDetails ¶
type UpdateDnsRecordReq ¶
type UpdateProfileRequest ¶
type VPC ¶
type VPC struct { ID int `json:"id"` UserID int `json:"user_id"` OwnerID int `json:"owner_id"` DatacenterID int `json:"datacenter_id"` Name string `json:"name"` Description string `json:"description"` InterfaceNumber int `json:"interface_number"` NetworkTagNumber int `json:"network_tag_number"` NetworkRange string `json:"network_range"` NetworkSize int `json:"network_size"` IsDefault int `json:"is_default"` CreatedBy int `json:"created_by"` UpdatedBy int `json:"updated_by"` CreatedOn time.Time `json:"created_on"` LastUpdated time.Time `json:"last_updated"` LowIPNum int `json:"low_ip_num"` HightIPNum int `json:"hight_ip_num"` IsUpcNetwork int `json:"is_upc_network"` Firstname string `json:"firstname"` Lastname string `json:"lastname"` Username string `json:"username"` State string `json:"state"` DcName string `json:"dc_name"` DcIdentifier string `json:"dc_identifier"` }
type VPCService ¶
type VPCService interface { List(ctx context.Context, options *ListOptions) ([]VPC, error) Get(ctx context.Context, id string) (*VPC, error) AssignServer(ctx context.Context, assignReq *AssignServerReq) error MoveServer(ctx context.Context, assignReq *AssignServerReq) error CreateVpc(ctx context.Context, createReq *CreateVpcReq) error ReleasePrivateIP(ctx context.Context, vmIdentifer string, privateIpId int) error DeleteVpc(ctx context.Context, vpcId, reason, note string) error }
type VirtualMachine ¶
type VirtualMachine struct { Hostname string `json:"hostname"` ID int `json:"id"` Identifier string `json:"identifier"` DefaultIP string `json:"default_ip"` DefaultIpv6 string `json:"default_ipv6"` RAM int `json:"ram"` CPU int `json:"cpu"` Ssd int `json:"ssd"` IsSuspended int `json:"is_suspended"` IsLocked int `json:"is_locked"` IsActive int `json:"is_active"` CreatedOn time.Time `json:"created_on"` UserID int `json:"user_id"` PrivateIP interface{} `json:"private_ip"` Power int `json:"power"` Traffic int `json:"traffic"` IsAgentActive int `json:"is_agent_active"` Firstname string `json:"firstname"` Lastname string `json:"lastname"` Username string `json:"username"` Category string `json:"category"` Fullname string `json:"fullname"` APIConfID string `json:"api_conf_id"` VMDescription string `json:"vmDescription"` State string `json:"state"` IsFipAvailable int `json:"is_fip_available"` IsBucketAvailable int `json:"is_bucket_available"` DcIdentifier string `json:"dcIdentifier"` }
type VmData ¶
type VmData struct { ID int64 `json:"id"` UserID int64 `json:"user_id"` BoxSizeID int64 `json:"boxsize_id"` BoxImageID int64 `json:"boximage_id"` DataCenterID int64 `json:"datacenter_id"` NodeID int64 `json:"node_id"` BoxdIsCountID *int64 `json:"boxdiscount_id"` Hostname string `json:"hostname"` DefaultIP string `json:"default_ip"` DefaultIPv6 string `json:"default_ipv6"` PrivateIP string `json:"private_ip"` IsAutoBackup int64 `json:"is_autobackup"` BoxVirtualization string `json:"box_virtualization_id"` Ram int64 `json:"ram"` Cpu int64 `json:"cpu"` Ssd int64 `json:"ssd"` Traffic int64 `json:"traffic"` AddedIpAddresses *string `json:"added_ip_addresses"` InitialPassword string `json:"initial_password"` Notes *string `json:"notes"` CreatedOn string `json:"created_on"` LastUpdated string `json:"last_updated"` DroppedOn *string `json:"dropped_on"` IsActive int64 `json:"is_active"` IsDeleted int64 `json:"is_deleted"` Identifier string `json:"identifier"` Power int64 `json:"power"` ProjectID int64 `json:"project_id"` IsCustom int64 `json:"is_custom"` NrAddedIps int64 `json:"nr_added_ips"` InPcs int64 `json:"in_pcs"` CustomPrice *int64 `json:"custom_price"` PayableLicense int64 `json:"payable_license"` LastLicensePay *string `json:"last_license_pay"` ScriptID *string `json:"script_id"` SshKeyID *string `json:"sshkey_id"` IsLocked int64 `json:"is_locked"` IsWorkWithNew int64 `json:"is_work_with_new_version"` IsSuspended int64 `json:"is_suspended"` IsTerminated int64 `json:"is_terminated"` OldID int64 `json:"old_id"` CustomIsoID *int64 `json:"custom_iso_id"` IsIsoImageBootAble int64 `json:"is_iso_image_bootable"` HasSsl int64 `json:"has_ssl"` LastActionDate *string `json:"last_action_date,omitempty"` IsCreatedFromLegacy int64 `json:"is_created_from_legacy"` IsSmtpAllowed int64 `json:"is_smtp_allowed"` WeeklyBackup int64 `json:"weekly_backup"` MonthlyBackup int64 `json:"monthly_backup"` LibIsoID *int64 `json:"lib_iso_id,omitempty"` DailySnapshot int64 `json:"daily_snapshot"` WeeklySnapshot int64 `json:"weekly_snapshot"` MonthlySnapshot int64 `json:"monthly_snap"` LastActionInMin int64 `json:"last_action_in_min"` FirstName string `json:"firstname"` LastName string `json:"lastname"` Username string `json:"username"` State string `json:"state"` IsFipAvailable int64 `json:"is_fip_available"` IsBucketAvailable int64 `json:"is_bucket_available"` DcIdentifier string `json:"dcIdentifier"` Category string `json:"category"` FullName string `json:"fullname"` VmDescription string `json:"vmDescription"` BoxesSuspended int64 `json:"boxes_suspended"` IsSataAvailable int64 `json:"is_sata_available"` IsSsdAvailable int64 `json:"is_ssd_available"` PublicIp *string `json:"publicIp,omitempty"` VMType string `json:"vmType,omitempty"` }
type VmLog ¶
type VmLog struct { ID int `json:"id"` UserID int `json:"user_id"` EntityID int `json:"entity_id"` EntityType string `json:"entity_type"` Action string `json:"action"` Description string `json:"description"` CreatedOn string `json:"created_on"` UserAgent string `json:"user_agent"` IPAddress string `json:"ip_address"` Country string `json:"country"` BoxID int `json:"box_id"` }
type VmToAttach ¶
type VmToAttach struct { Hostname string `json:"hostname"` Identifier string `json:"identifier"` DatacenterID int `json:"datacenter_id"` DefaultIP string `json:"default_ip"` DefaultIpv6 string `json:"default_ipv6"` PrivateIP interface{} `json:"private_ip"` Ssd int `json:"ssd"` State string `json:"state"` IsFipAvailable int `json:"is_fip_available"` IsBucketAvailable int `json:"is_bucket_available"` DcIdentifier string `json:"dcIdentifier"` Fullname string `json:"fullname"` Category string `json:"category"` Type string `json:"type"` }
type VpcRequest ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.