Documentation
¶
Index ¶
- Constants
- type APIError
- func (e APIError) Error() string
- func (e APIError) HasCode(code ErrorCode) bool
- func (e APIError) IsInsufficientCredit() bool
- func (e APIError) IsNotAuthorized() bool
- func (e APIError) IsNotFound() bool
- func (e APIError) IsOutOfStock() bool
- func (e APIError) IsQuotaExceeded() bool
- func (e APIError) IsValidationFailed() bool
- type Account
- type AggregatedTraffic
- type Billing
- type BillingCycle
- type BillingIntervalUnit
- type BootDevice
- type ChangeIpmiPasswordInput
- type ChangeServerIpmiPasswordResponse
- type Client
- func (c *Client) Account(ctx context.Context) (*Account, error)
- func (c *Client) AllInvoices(ctx context.Context, filter *InvoicesInput) ([]Invoice, error)
- func (c *Client) AllPostInstallScripts(ctx context.Context, filter *PostInstallScriptsInput) ([]PostInstallScript, error)
- func (c *Client) AllServers(ctx context.Context, filter *ServersInput) ([]Server, error)
- func (c *Client) AllSubscriptions(ctx context.Context, filter *SubscriptionsInput) ([]Subscription, error)
- func (c *Client) ChangeServerIpmiPassword(ctx context.Context, input ChangeIpmiPasswordInput) (*Server, error)
- func (c *Client) ConfigureServerLinks(ctx context.Context, input ConfigureServerLinksInput) (*ServerLinksConfigurationTask, error)
- func (c *Client) CreatePostInstallScript(ctx context.Context, input CreatePostInstallScriptInput) (*PostInstallScript, error)
- func (c *Client) CreateSupportRequest(ctx context.Context, input CreateSupportRequestInput) (bool, error)
- func (c *Client) DeletePostInstallScript(ctx context.Context, input DeletePostInstallScriptInput) (bool, error)
- func (c *Client) ErrorCodes(ctx context.Context) ([]ErrorCode, error)
- func (c *Client) Invoice(ctx context.Context, input InvoiceInput) (*Invoice, error)
- func (c *Client) InvoiceIterator(ctx context.Context, filter *InvoicesInput) iter.Seq2[Invoice, error]
- func (c *Client) Invoices(ctx context.Context, input *PaginatedInvoicesInput) (*PaginatedInvoiceResponse, error)
- func (c *Client) Locations(ctx context.Context) ([]Location, error)
- func (c *Client) OperatingSystems(ctx context.Context) ([]OperatingSystem, error)
- func (c *Client) PerformServerPowerAction(ctx context.Context, input PerformServerPowerActionInput) (*Server, error)
- func (c *Client) PostInstallScriptIterator(ctx context.Context, filter *PostInstallScriptsInput) iter.Seq2[PostInstallScript, error]
- func (c *Client) PostInstallScripts(ctx context.Context, input *PaginatedPostInstallScriptsInput) (*PaginatedPostInstallScriptResponse, error)
- func (c *Client) ProvisionServer(ctx context.Context, input ProvisionServerInput) (*Server, error)
- func (c *Client) ProvisioningConfigurations(ctx context.Context, input *ProvisioningConfigurationsInput) ([]ProvisioningConfiguration, error)
- func (c *Client) ReverseDnsRecord(ctx context.Context, input ReverseDnsRecordInput) (*ReverseDnsRecordResponse, error)
- func (c *Client) Server(ctx context.Context, input ServerInput) (*Server, error)
- func (c *Client) ServerIterator(ctx context.Context, filter *ServersInput) iter.Seq2[Server, error]
- func (c *Client) ServerLinksConfigurationTask(ctx context.Context, input ServerLinksConfigurationTaskInput) (*ServerLinksConfigurationTask, error)
- func (c *Client) Servers(ctx context.Context, input *PaginatedServersInput) (*PaginatedServerResponse, error)
- func (c *Client) SetDefaultTrafficPlan(ctx context.Context, input SetDefaultTrafficPlanInput) (bool, error)
- func (c *Client) SetReverseDnsRecord(ctx context.Context, input SetReverseDnsRecordInput) (*IpAddress, error)
- func (c *Client) SetServerAlias(ctx context.Context, input SetServerAliasInput) (*Server, error)
- func (c *Client) SetServerBootDevice(ctx context.Context, input SetServerBootDeviceInput) (*Server, error)
- func (c *Client) SetServerPrimaryIp(ctx context.Context, input SetServerPrimaryIpInput) (*Server, error)
- func (c *Client) SetServerTag(ctx context.Context, input SetServerTagInput) (bool, error)
- func (c *Client) SetServerTags(ctx context.Context, input SetServerTagsInput) (bool, error)
- func (c *Client) Subscription(ctx context.Context, input SubscriptionInput) (*Subscription, error)
- func (c *Client) SubscriptionIterator(ctx context.Context, filter *SubscriptionsInput) iter.Seq2[Subscription, error]
- func (c *Client) Subscriptions(ctx context.Context, input *PaginatedSubscriptionsInput) (*PaginatedSubscriptionResponse, error)
- func (c *Client) SupportRequest(ctx context.Context, input SupportRequestInput) (*SupportRequest, error)
- func (c *Client) SupportRequestReply(ctx context.Context, input SupportRequestReplyInput) (bool, error)
- func (c *Client) SupportRequests(ctx context.Context, input *PaginatedSupportRequestsInput) ([]SupportRequest, error)
- func (c *Client) Traffic(ctx context.Context, input TrafficInput) (*Traffic, error)
- func (c *Client) UpdatePostInstallScript(ctx context.Context, input UpdatePostInstallScriptInput) (*PostInstallScript, error)
- type ConfigureServerLinksInput
- type Cpu
- type CreatePostInstallScriptInput
- type CreateSupportRequestInput
- type Currency
- type DateTime
- type DdosShieldLevel
- type Decimal
- type DecimalRange
- type DefaultTrafficPlanType
- type DeletePostInstallScriptInput
- type ErrorCode
- type Gpu
- type GraphQLError
- type Hardware
- type IntRange
- type Invoice
- type InvoiceInput
- type InvoiceItem
- type InvoiceItemType
- type InvoiceType
- type InvoicesInput
- type IpAddress
- type IpAddressType
- type Ipmi
- type Location
- type LocationIdentifier
- type Money
- type Network
- type OperatingSystem
- type Option
- type PaginatedInvoiceResponse
- type PaginatedInvoicesInput
- type PaginatedPostInstallScriptResponse
- type PaginatedPostInstallScriptsInput
- type PaginatedServerResponse
- type PaginatedServersInput
- type PaginatedSubscriptionResponse
- type PaginatedSubscriptionsInput
- type PaginatedSupportRequestsInput
- type Payment
- type PaymentMethod
- type PaymentStatus
- type PerServerTraffic
- type PerformServerPowerActionInput
- type PerformServerPowerActionResponse
- type Period
- type Port
- type Post
- type PostInstallScript
- type PostInstallScriptsInput
- type PowerAction
- type PowerStatus
- type ProvisionServerInput
- type ProvisionServerResponse
- type ProvisioningBillingPeriod
- type ProvisioningConfiguration
- type ProvisioningConfigurationsInput
- type ProvisioningStorageRequirementInput
- type Raid
- type Ram
- type Region
- type ReverseDnsRecordInput
- type ReverseDnsRecordResponse
- type Server
- type ServerInput
- type ServerLinksConfigurationStatus
- type ServerLinksConfigurationTask
- type ServerLinksConfigurationTaskInput
- type ServerStatusV2
- type ServerTag
- type ServerTagInput
- type ServersInput
- type SetDefaultTrafficPlanInput
- type SetReverseDnsRecordInput
- type SetReverseDnsRecordResponse
- type SetServerAliasInput
- type SetServerAliasResponse
- type SetServerBootDeviceInput
- type SetServerBootDeviceResponse
- type SetServerPrimaryIpInput
- type SetServerPrimaryIpResponse
- type SetServerTagInput
- type SetServerTagsInput
- type Storage
- type StorageInputType
- type StorageType
- type Subscription
- type SubscriptionInput
- type SubscriptionItem
- type SubscriptionItemDetail
- type SubscriptionItemType
- type SubscriptionType
- type SubscriptionsInput
- type SupportRequest
- type SupportRequestCategory
- type SupportRequestInput
- type SupportRequestPostBy
- type SupportRequestPriority
- type SupportRequestReplyInput
- type SupportRequestStatus
- type SupportRequestSubject
- type SupportRequestsInput
- type System
- type Traffic
- type TrafficInput
- type TrafficPlan
- type TrafficPlanScope
- type TrafficPlanType
- type TrafficServersInput
- type TrafficStatistics
- type UpdatePostInstallScriptInput
- type Uplink
Constants ¶
View Source
const ( DefaultEndpoint = "https://api.datapacket.com/v0/graphql" DefaultTimeout = 30 * time.Second )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIError ¶
type APIError struct {
Errors []GraphQLError `json:"errors"`
}
func (APIError) IsInsufficientCredit ¶
func (APIError) IsNotAuthorized ¶
func (APIError) IsNotFound ¶
func (APIError) IsOutOfStock ¶
func (APIError) IsQuotaExceeded ¶
func (APIError) IsValidationFailed ¶
type AggregatedTraffic ¶
type AggregatedTraffic struct {
StatisticsIn *TrafficStatistics `json:"statisticsIn,omitempty"`
StatisticsOut *TrafficStatistics `json:"statisticsOut,omitempty"`
}
type Billing ¶
type Billing struct {
SubscriptionItem SubscriptionItem `json:"subscriptionItem"`
}
type BillingCycle ¶
type BillingCycle struct {
Unit BillingIntervalUnit `json:"unit"`
Quantity int `json:"quantity"`
Start int `json:"start"`
}
type BillingIntervalUnit ¶
type BillingIntervalUnit string
const ( BillingIntervalUnitMonth BillingIntervalUnit = "MONTH" BillingIntervalUnitYear BillingIntervalUnit = "YEAR" BillingIntervalUnitDay BillingIntervalUnit = "DAY" )
type BootDevice ¶
type BootDevice string
const ( BootDeviceDisk BootDevice = "DISK" BootDevicePXE BootDevice = "PXE" BootDeviceSafeMode BootDevice = "SAFE_MODE" BootDeviceDiagnostic BootDevice = "DIAGNOSTIC" BootDeviceBIOS BootDevice = "BIOS" )
type ChangeIpmiPasswordInput ¶
type ChangeIpmiPasswordInput struct {
Server ServerInput `json:"server"`
Password string `json:"password"`
}
type ChangeServerIpmiPasswordResponse ¶
type ChangeServerIpmiPasswordResponse struct {
Server Server `json:"server"`
}
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) AllInvoices ¶
func (*Client) AllPostInstallScripts ¶
func (c *Client) AllPostInstallScripts(ctx context.Context, filter *PostInstallScriptsInput) ([]PostInstallScript, error)
func (*Client) AllServers ¶
func (*Client) AllSubscriptions ¶
func (c *Client) AllSubscriptions(ctx context.Context, filter *SubscriptionsInput) ([]Subscription, error)
func (*Client) ChangeServerIpmiPassword ¶
func (*Client) ConfigureServerLinks ¶
func (c *Client) ConfigureServerLinks(ctx context.Context, input ConfigureServerLinksInput) (*ServerLinksConfigurationTask, error)
func (*Client) CreatePostInstallScript ¶
func (c *Client) CreatePostInstallScript(ctx context.Context, input CreatePostInstallScriptInput) (*PostInstallScript, error)
func (*Client) CreateSupportRequest ¶
func (*Client) DeletePostInstallScript ¶
func (*Client) InvoiceIterator ¶
func (*Client) Invoices ¶
func (c *Client) Invoices(ctx context.Context, input *PaginatedInvoicesInput) (*PaginatedInvoiceResponse, error)
func (*Client) OperatingSystems ¶
func (c *Client) OperatingSystems(ctx context.Context) ([]OperatingSystem, error)
func (*Client) PerformServerPowerAction ¶
func (*Client) PostInstallScriptIterator ¶
func (c *Client) PostInstallScriptIterator(ctx context.Context, filter *PostInstallScriptsInput) iter.Seq2[PostInstallScript, error]
func (*Client) PostInstallScripts ¶
func (c *Client) PostInstallScripts(ctx context.Context, input *PaginatedPostInstallScriptsInput) (*PaginatedPostInstallScriptResponse, error)
func (*Client) ProvisionServer ¶
func (*Client) ProvisioningConfigurations ¶
func (c *Client) ProvisioningConfigurations(ctx context.Context, input *ProvisioningConfigurationsInput) ([]ProvisioningConfiguration, error)
func (*Client) ReverseDnsRecord ¶
func (c *Client) ReverseDnsRecord(ctx context.Context, input ReverseDnsRecordInput) (*ReverseDnsRecordResponse, error)
func (*Client) ServerIterator ¶
func (*Client) ServerLinksConfigurationTask ¶
func (c *Client) ServerLinksConfigurationTask(ctx context.Context, input ServerLinksConfigurationTaskInput) (*ServerLinksConfigurationTask, error)
func (*Client) Servers ¶
func (c *Client) Servers(ctx context.Context, input *PaginatedServersInput) (*PaginatedServerResponse, error)
func (*Client) SetDefaultTrafficPlan ¶
func (*Client) SetReverseDnsRecord ¶
func (*Client) SetServerAlias ¶
func (*Client) SetServerBootDevice ¶
func (*Client) SetServerPrimaryIp ¶
func (*Client) SetServerTag ¶
func (*Client) SetServerTags ¶
func (*Client) Subscription ¶
func (c *Client) Subscription(ctx context.Context, input SubscriptionInput) (*Subscription, error)
func (*Client) SubscriptionIterator ¶
func (c *Client) SubscriptionIterator(ctx context.Context, filter *SubscriptionsInput) iter.Seq2[Subscription, error]
func (*Client) Subscriptions ¶
func (c *Client) Subscriptions(ctx context.Context, input *PaginatedSubscriptionsInput) (*PaginatedSubscriptionResponse, error)
func (*Client) SupportRequest ¶
func (c *Client) SupportRequest(ctx context.Context, input SupportRequestInput) (*SupportRequest, error)
func (*Client) SupportRequestReply ¶
func (*Client) SupportRequests ¶
func (c *Client) SupportRequests(ctx context.Context, input *PaginatedSupportRequestsInput) ([]SupportRequest, error)
func (*Client) UpdatePostInstallScript ¶
func (c *Client) UpdatePostInstallScript(ctx context.Context, input UpdatePostInstallScriptInput) (*PostInstallScript, error)
type ConfigureServerLinksInput ¶
type ConfigureServerLinksInput struct {
Server ServerInput `json:"server"`
LinkAggregation bool `json:"linkAggregation"`
}
type CreateSupportRequestInput ¶
type CreateSupportRequestInput struct {
Message string `json:"message"`
Subject SupportRequestSubject `json:"subject"`
Priority SupportRequestPriority `json:"priority"`
Servers []string `json:"servers,omitempty"`
Sources []string `json:"sources,omitempty"`
Destinations []string `json:"destinations,omitempty"`
}
type DdosShieldLevel ¶
type DdosShieldLevel string
const ( DdosShieldLevelVolumetric DdosShieldLevel = "VOLUMETRIC" DdosShieldLevelFull DdosShieldLevel = "FULL" DdosShieldLevelOff DdosShieldLevel = "OFF" )
type DecimalRange ¶
type DefaultTrafficPlanType ¶
type DefaultTrafficPlanType string
const ( DefaultTrafficPlanTypeP95 DefaultTrafficPlanType = "P95" DefaultTrafficPlanTypePeakUnmetered DefaultTrafficPlanType = "PEAK_UNMETERED" )
type DeletePostInstallScriptInput ¶
type DeletePostInstallScriptInput struct {
ID string `json:"id"`
}
type ErrorCode ¶
type ErrorCode string
const ( ErrorCodeBadRequest ErrorCode = "BAD_REQUEST" ErrorCodeGraphQLValidationFailed ErrorCode = "GRAPHQL_VALIDATION_FAILED" ErrorCodeNotAuthorized ErrorCode = "NOT_AUTHORIZED" ErrorCodeValidationFailed ErrorCode = "VALIDATION_FAILED" ErrorCodeNotFound ErrorCode = "NOT_FOUND" ErrorCodeInternalServerError ErrorCode = "INTERNAL_SERVER_ERROR" ErrorCodeReverseDNSAPINotAvailable ErrorCode = "REVERSE_DNS_API_NOT_AVAILABLE" ErrorCodeInsufficientCreditBalance ErrorCode = "INSUFFICIENT_CREDIT_BALANCE" ErrorCodeOutOfStock ErrorCode = "OUT_OF_STOCK" ErrorCodeDailyProvisioningQuotaExceeded ErrorCode = "DAILY_PROVISIONING_QUOTA_EXCEEDED" )
type GraphQLError ¶
type GraphQLError struct {
Message string `json:"message"`
Path []any `json:"path,omitempty"`
Extensions map[string]any `json:"extensions,omitempty"`
}
func (GraphQLError) Code ¶
func (e GraphQLError) Code() ErrorCode
func (GraphQLError) Error ¶
func (e GraphQLError) Error() string
type Invoice ¶
type Invoice struct {
InvoiceNumber string `json:"invoiceNumber"`
Subscription *Subscription `json:"subscription,omitempty"`
Period Period `json:"period"`
Payment *Payment `json:"payment,omitempty"`
InvoiceItems []InvoiceItem `json:"invoiceItems"`
Subtotal float64 `json:"subtotal"`
Total float64 `json:"total"`
TotalVat float64 `json:"totalVat"`
Currency Currency `json:"currency"`
CreatedAt time.Time `json:"createdAt"`
DueDate time.Time `json:"dueDate"`
InvoiceType *InvoiceType `json:"invoiceType,omitempty"`
}
type InvoiceInput ¶
type InvoiceInput struct {
InvoiceNumber string `json:"invoiceNumber"`
}
type InvoiceItem ¶
type InvoiceItemType ¶
type InvoiceItemType string
const ( InvoiceItemTypeServer InvoiceItemType = "SERVER" InvoiceItemTypeIP InvoiceItemType = "IP" InvoiceItemTypeFee InvoiceItemType = "FEE" InvoiceItemTypeDiscount InvoiceItemType = "DISCOUNT" InvoiceItemTypeDDoS InvoiceItemType = "DDOS" InvoiceItemTypeBGP InvoiceItemType = "BGP" InvoiceItemTypeCredit InvoiceItemType = "CREDIT" InvoiceItemTypeTraffic InvoiceItemType = "TRAFFIC" InvoiceItemTypeTrafficOverage InvoiceItemType = "TRAFFIC_OVERAGE" InvoiceItemTypeOther InvoiceItemType = "OTHER" )
type InvoiceType ¶
type InvoiceType string
const ( InvoiceTypeDraft InvoiceType = "DRAFT" InvoiceTypeTax InvoiceType = "TAX" )
type InvoicesInput ¶
type InvoicesInput struct {
InvoiceNumberIn []string `json:"invoiceNumber_in,omitempty"`
CurrencyIn []Currency `json:"currency_in,omitempty"`
PaymentStatusIn []PaymentStatus `json:"paymentStatus_in,omitempty"`
}
type IpAddress ¶
type IpAddress struct {
IsPrimary bool `json:"isPrimary"`
IsBgpPrefix bool `json:"isBgpPrefix"`
Type IpAddressType `json:"type"`
NetMask *string `json:"netMask,omitempty"`
Gateway *string `json:"gateway,omitempty"`
Network *string `json:"network,omitempty"`
Broadcast *string `json:"broadcast,omitempty"`
IP string `json:"ip"`
CIDR string `json:"cidr"`
}
type IpAddressType ¶
type IpAddressType string
const ( IpAddressTypeIPv4 IpAddressType = "IPV4" IpAddressTypeIPv6 IpAddressType = "IPV6" )
type Location ¶
type Location struct {
Name string `json:"name"`
Region Region `json:"region"`
Short string `json:"short"`
Identifier LocationIdentifier `json:"identifier"`
}
type LocationIdentifier ¶
type LocationIdentifier string
const ( LocationAmsterdam LocationIdentifier = "AMSTERDAM" LocationAshburn LocationIdentifier = "ASHBURN" LocationAthens LocationIdentifier = "ATHENS" LocationAtlanta LocationIdentifier = "ATLANTA" LocationAuckland LocationIdentifier = "AUCKLAND" LocationBerlin LocationIdentifier = "BERLIN" LocationBogota LocationIdentifier = "BOGOTA" LocationBordeaux LocationIdentifier = "BORDEAUX" LocationBoston LocationIdentifier = "BOSTON" LocationBratislava LocationIdentifier = "BRATISLAVA" LocationBrussels LocationIdentifier = "BRUSSELS" LocationBucharest LocationIdentifier = "BUCHAREST" LocationBudapest LocationIdentifier = "BUDAPEST" LocationBuenosAires LocationIdentifier = "BUENOS_AIRES" LocationChicago LocationIdentifier = "CHICAGO" LocationCopenhagen LocationIdentifier = "COPENHAGEN" LocationDallas LocationIdentifier = "DALLAS" LocationDenver LocationIdentifier = "DENVER" LocationDublin LocationIdentifier = "DUBLIN" LocationFrankfurt LocationIdentifier = "FRANKFURT" LocationFujairah LocationIdentifier = "FUJAIRAH" LocationHongKong LocationIdentifier = "HONG_KONG" LocationHouston LocationIdentifier = "HOUSTON" LocationIstanbul LocationIdentifier = "ISTANBUL" LocationJohannesburg LocationIdentifier = "JOHANNESBURG" LocationKualaLumpur LocationIdentifier = "KUALA_LUMPUR" LocationKyiv LocationIdentifier = "KYIV" LocationLagos LocationIdentifier = "LAGOS" LocationLima LocationIdentifier = "LIMA" LocationLisbon LocationIdentifier = "LISBON" LocationLondon LocationIdentifier = "LONDON" LocationLosAngeles LocationIdentifier = "LOS_ANGELES" LocationMadrid LocationIdentifier = "MADRID" LocationManchester LocationIdentifier = "MANCHESTER" LocationMarseille LocationIdentifier = "MARSEILLE" LocationMcAllen LocationIdentifier = "MCALLEN" LocationMelbourne LocationIdentifier = "MELBOURNE" LocationMiami LocationIdentifier = "MIAMI" LocationMilan LocationIdentifier = "MILAN" LocationMontreal LocationIdentifier = "MONTREAL" LocationNewYork LocationIdentifier = "NEW_YORK" LocationOslo LocationIdentifier = "OSLO" LocationPalermo LocationIdentifier = "PALERMO" LocationParis LocationIdentifier = "PARIS" LocationPrague LocationIdentifier = "PRAGUE" LocationQueretaro LocationIdentifier = "QUERETARO" LocationSanJose LocationIdentifier = "SAN_JOSE" LocationSantiago LocationIdentifier = "SANTIAGO" LocationSaoPaulo LocationIdentifier = "SAO_PAULO" LocationSeattle LocationIdentifier = "SEATTLE" LocationSeoul LocationIdentifier = "SEOUL" LocationSingapore LocationIdentifier = "SINGAPORE" LocationSofia LocationIdentifier = "SOFIA" LocationStockholm LocationIdentifier = "STOCKHOLM" LocationSydney LocationIdentifier = "SYDNEY" LocationTelAviv LocationIdentifier = "TEL_AVIV" LocationTokyo LocationIdentifier = "TOKYO" LocationToronto LocationIdentifier = "TORONTO" LocationVancouver LocationIdentifier = "VANCOUVER" LocationVienna LocationIdentifier = "VIENNA" LocationWarsaw LocationIdentifier = "WARSAW" LocationZagreb LocationIdentifier = "ZAGREB" LocationZurich LocationIdentifier = "ZURICH" )
type OperatingSystem ¶
type Option ¶
type Option func(*Client)
func WithEndpoint ¶
func WithHTTPClient ¶
func WithTimeout ¶
type PaginatedInvoiceResponse ¶
type PaginatedInvoiceResponse struct {
EntriesTotalCount int `json:"entriesTotalCount"`
PageCount int `json:"pageCount"`
CurrentPageIndex int `json:"currentPageIndex"`
PageSize int `json:"pageSize"`
NextPageIndex *int `json:"nextPageIndex,omitempty"`
PreviousPageIndex *int `json:"previousPageIndex,omitempty"`
IsLastPage bool `json:"isLastPage"`
IsFirstPage bool `json:"isFirstPage"`
Entries []Invoice `json:"entries"`
}
type PaginatedInvoicesInput ¶
type PaginatedInvoicesInput struct {
PageIndex int `json:"pageIndex,omitempty"`
PageSize int `json:"pageSize,omitempty"`
Filter *InvoicesInput `json:"filter,omitempty"`
}
type PaginatedPostInstallScriptResponse ¶
type PaginatedPostInstallScriptResponse struct {
EntriesTotalCount int `json:"entriesTotalCount"`
PageCount int `json:"pageCount"`
CurrentPageIndex int `json:"currentPageIndex"`
PageSize int `json:"pageSize"`
NextPageIndex *int `json:"nextPageIndex,omitempty"`
PreviousPageIndex *int `json:"previousPageIndex,omitempty"`
IsLastPage bool `json:"isLastPage"`
IsFirstPage bool `json:"isFirstPage"`
Entries []PostInstallScript `json:"entries"`
}
type PaginatedPostInstallScriptsInput ¶
type PaginatedPostInstallScriptsInput struct {
PageIndex int `json:"pageIndex,omitempty"`
PageSize int `json:"pageSize,omitempty"`
Filter *PostInstallScriptsInput `json:"filter,omitempty"`
}
type PaginatedServerResponse ¶
type PaginatedServerResponse struct {
EntriesTotalCount int `json:"entriesTotalCount"`
PageCount int `json:"pageCount"`
CurrentPageIndex int `json:"currentPageIndex"`
PageSize int `json:"pageSize"`
NextPageIndex *int `json:"nextPageIndex,omitempty"`
PreviousPageIndex *int `json:"previousPageIndex,omitempty"`
IsLastPage bool `json:"isLastPage"`
IsFirstPage bool `json:"isFirstPage"`
Entries []Server `json:"entries"`
}
type PaginatedServersInput ¶
type PaginatedServersInput struct {
PageIndex int `json:"pageIndex,omitempty"`
PageSize int `json:"pageSize,omitempty"`
Filter *ServersInput `json:"filter,omitempty"`
}
type PaginatedSubscriptionResponse ¶
type PaginatedSubscriptionResponse struct {
EntriesTotalCount int `json:"entriesTotalCount"`
PageCount int `json:"pageCount"`
CurrentPageIndex int `json:"currentPageIndex"`
PageSize int `json:"pageSize"`
NextPageIndex *int `json:"nextPageIndex,omitempty"`
PreviousPageIndex *int `json:"previousPageIndex,omitempty"`
IsLastPage bool `json:"isLastPage"`
IsFirstPage bool `json:"isFirstPage"`
Entries []Subscription `json:"entries"`
}
type PaginatedSubscriptionsInput ¶
type PaginatedSubscriptionsInput struct {
PageIndex int `json:"pageIndex,omitempty"`
PageSize int `json:"pageSize,omitempty"`
Filter *SubscriptionsInput `json:"filter,omitempty"`
}
type PaginatedSupportRequestsInput ¶
type PaginatedSupportRequestsInput struct {
PageIndex int `json:"pageIndex,omitempty"`
PageSize int `json:"pageSize,omitempty"`
Filter *SupportRequestsInput `json:"filter,omitempty"`
}
type Payment ¶
type Payment struct {
Status PaymentStatus `json:"status"`
PaidOn *time.Time `json:"paidOn,omitempty"`
Method *PaymentMethod `json:"method,omitempty"`
}
type PaymentMethod ¶
type PaymentMethod string
const ( PaymentMethodBankTransfer PaymentMethod = "BANK_TRANSFER" PaymentMethodCard PaymentMethod = "CARD" PaymentMethodDPBalance PaymentMethod = "DP_BALANCE" PaymentMethodPayPal PaymentMethod = "PAYPAL" PaymentMethodCreditNote PaymentMethod = "CREDIT_NOTE" )
type PaymentStatus ¶
type PaymentStatus string
const ( PaymentStatusPaid PaymentStatus = "PAID" PaymentStatusNotPaid PaymentStatus = "NOT_PAID" PaymentStatusPastDue PaymentStatus = "PAST_DUE" )
type PerServerTraffic ¶
type PerServerTraffic struct {
Server Server `json:"server"`
Traffic AggregatedTraffic `json:"traffic"`
}
type PerformServerPowerActionInput ¶
type PerformServerPowerActionInput struct {
Action PowerAction `json:"action"`
Server ServerInput `json:"server"`
}
type PerformServerPowerActionResponse ¶
type PerformServerPowerActionResponse struct {
Server Server `json:"server"`
}
type PostInstallScript ¶
type PostInstallScriptsInput ¶
type PostInstallScriptsInput struct {
NameIn []string `json:"name_in,omitempty"`
}
type PowerAction ¶
type PowerAction string
const ( PowerActionOn PowerAction = "ON" PowerActionOff PowerAction = "OFF" PowerActionReset PowerAction = "RESET" PowerActionSoft PowerAction = "SOFT" PowerActionCycle PowerAction = "CYCLE" )
type PowerStatus ¶
type PowerStatus string
const ( PowerStatusOn PowerStatus = "ON" PowerStatusOff PowerStatus = "OFF" PowerStatusUnknown PowerStatus = "UNKNOWN" )
type ProvisionServerInput ¶
type ProvisionServerInput struct {
ConfigurationID string `json:"configurationId"`
BillingPeriod ProvisioningBillingPeriod `json:"billingPeriod"`
OsImageID string `json:"osImageId"`
SSHKeyNames []string `json:"sshKeyNames,omitempty"`
DisableLinkAggregation *bool `json:"disableLinkAggregation,omitempty"`
PostInstallScriptName *string `json:"postInstallScriptName,omitempty"`
}
type ProvisionServerResponse ¶
type ProvisionServerResponse struct {
Server Server `json:"server"`
}
type ProvisioningBillingPeriod ¶
type ProvisioningBillingPeriod string
const ( ProvisioningBillingPeriodDaily ProvisioningBillingPeriod = "DAILY" ProvisioningBillingPeriodMonthly ProvisioningBillingPeriod = "MONTHLY" )
type ProvisioningConfiguration ¶
type ProvisioningConfiguration struct {
ConfigurationID string `json:"configurationId"`
Memory int `json:"memory"`
Storage []Storage `json:"storage"`
Cpus []Cpu `json:"cpus"`
CpuBenchmarkScore *int `json:"cpuBenchmarkScore,omitempty"`
Gpus []Gpu `json:"gpus"`
Uplink Uplink `json:"uplink"`
MonthlyHwPrice Money `json:"monthlyHwPrice"`
DailyHwPrice Money `json:"dailyHwPrice"`
Location Location `json:"location"`
StockCount int `json:"stockCount"`
}
type ProvisioningConfigurationsInput ¶
type ProvisioningConfigurationsInput struct {
CpuNameIn []string `json:"cpuName_in,omitempty"`
CpuCount *IntRange `json:"cpuCount,omitempty"`
CpuCores *IntRange `json:"cpuCores,omitempty"`
CpuThreads *IntRange `json:"cpuThreads,omitempty"`
CpuBenchmarkScore *IntRange `json:"cpuBenchmarkScore,omitempty"`
Memory *IntRange `json:"memory,omitempty"`
GpuCount *IntRange `json:"gpuCount,omitempty"`
GpuMemory *IntRange `json:"gpuMemory,omitempty"`
StorageRequirements []ProvisioningStorageRequirementInput `json:"storageRequirements,omitempty"`
UplinkTotalCapacity *IntRange `json:"uplinkTotalCapacity,omitempty"`
MonthlyHwPriceAmount *DecimalRange `json:"monthlyHwPriceAmount,omitempty"`
DailyHwPriceAmount *DecimalRange `json:"dailyHwPriceAmount,omitempty"`
LocationIdentifierIn []LocationIdentifier `json:"locationIdentifier_in,omitempty"`
RegionIn []Region `json:"region_in,omitempty"`
StockCount *IntRange `json:"stockCount,omitempty"`
}
type ProvisioningStorageRequirementInput ¶
type ProvisioningStorageRequirementInput struct {
TypeIn []StorageInputType `json:"type_in,omitempty"`
TotalSize *IntRange `json:"totalSize,omitempty"`
Count *IntRange `json:"count,omitempty"`
}
type ReverseDnsRecordInput ¶
type ReverseDnsRecordInput struct {
IP string `json:"ip"`
}
type Server ¶
type Server struct {
Name string `json:"name"`
Alias *string `json:"alias,omitempty"`
Hostname *string `json:"hostname,omitempty"`
Location Location `json:"location"`
Uptime int `json:"uptime"`
PowerStatus PowerStatus `json:"powerStatus"`
StatusV2 ServerStatusV2 `json:"statusV2"`
Network Network `json:"network"`
Hardware Hardware `json:"hardware"`
System System `json:"system"`
TrafficPlan TrafficPlan `json:"trafficPlan"`
Tags []ServerTag `json:"tags"`
Billing Billing `json:"billing"`
}
type ServerInput ¶
type ServerInput struct {
Name *string `json:"name,omitempty"`
Alias *string `json:"alias,omitempty"`
IP *string `json:"ip,omitempty"`
IpmiIP *string `json:"ipmiIp,omitempty"`
Tag *ServerTagInput `json:"tag,omitempty"`
}
type ServerLinksConfigurationStatus ¶
type ServerLinksConfigurationStatus string
const ( ServerLinksConfigurationStatusPending ServerLinksConfigurationStatus = "PENDING" ServerLinksConfigurationStatusInProgress ServerLinksConfigurationStatus = "IN_PROGRESS" ServerLinksConfigurationStatusSuccess ServerLinksConfigurationStatus = "SUCCESS" ServerLinksConfigurationStatusFailed ServerLinksConfigurationStatus = "FAILED" )
type ServerLinksConfigurationTask ¶
type ServerLinksConfigurationTask struct {
TaskID string `json:"taskId"`
Status ServerLinksConfigurationStatus `json:"status"`
}
type ServerLinksConfigurationTaskInput ¶
type ServerLinksConfigurationTaskInput struct {
TaskID string `json:"taskId"`
}
type ServerStatusV2 ¶
type ServerStatusV2 string
const ( ServerStatusV2Waiting ServerStatusV2 = "WAITING" ServerStatusV2Provisioning ServerStatusV2 = "PROVISIONING" ServerStatusV2Maintenance ServerStatusV2 = "MAINTENANCE" ServerStatusV2Unreachable ServerStatusV2 = "UNREACHABLE" ServerStatusV2Active ServerStatusV2 = "ACTIVE" )
type ServerTagInput ¶
type ServersInput ¶
type ServersInput struct {
NameIn []string `json:"name_in,omitempty"`
AliasIn []string `json:"alias_in,omitempty"`
LocationIn []string `json:"location_in,omitempty"`
RegionIn []string `json:"region_in,omitempty"`
ServerStatusV2In []ServerStatusV2 `json:"serverStatusV2_in,omitempty"`
PowerStatusIn []PowerStatus `json:"powerStatus_in,omitempty"`
IPIn []string `json:"ip_in,omitempty"`
IpmiIPIn []string `json:"ipmiIp_in,omitempty"`
TagsIn []ServerTagInput `json:"tags_in,omitempty"`
TagKey []string `json:"tag_key,omitempty"`
TagValue []ServerTagInput `json:"tag_value,omitempty"`
}
type SetDefaultTrafficPlanInput ¶
type SetDefaultTrafficPlanInput struct {
Type DefaultTrafficPlanType `json:"type"`
Bandwidth float64 `json:"bandwidth"`
}
type SetReverseDnsRecordResponse ¶
type SetReverseDnsRecordResponse struct {
IP IpAddress `json:"ip"`
}
type SetServerAliasInput ¶
type SetServerAliasInput struct {
Alias *string `json:"alias,omitempty"`
Server ServerInput `json:"server"`
}
type SetServerAliasResponse ¶
type SetServerAliasResponse struct {
Server Server `json:"server"`
}
type SetServerBootDeviceInput ¶
type SetServerBootDeviceInput struct {
BootDevice BootDevice `json:"bootDevice"`
Server ServerInput `json:"server"`
}
type SetServerBootDeviceResponse ¶
type SetServerBootDeviceResponse struct {
Server Server `json:"server"`
}
type SetServerPrimaryIpInput ¶
type SetServerPrimaryIpInput struct {
IP string `json:"ip"`
Server ServerInput `json:"server"`
}
type SetServerPrimaryIpResponse ¶
type SetServerPrimaryIpResponse struct {
Server Server `json:"server"`
}
type SetServerTagInput ¶
type SetServerTagInput struct {
Server ServerInput `json:"server"`
Key string `json:"key"`
Value *string `json:"value,omitempty"`
}
type SetServerTagsInput ¶
type SetServerTagsInput struct {
Server ServerInput `json:"server"`
Tags []ServerTagInput `json:"tags"`
}
type Storage ¶
type Storage struct {
Size int `json:"size"`
Type StorageType `json:"type"`
}
type StorageInputType ¶
type StorageInputType string
const ( StorageInputTypeHDD StorageInputType = "HDD" StorageInputTypeSATASSD StorageInputType = "SATA_SSD" StorageInputTypeNVMe StorageInputType = "NVME" )
type StorageType ¶
type StorageType string
const ( StorageTypeSATASSD StorageType = "SATA_SSD" StorageTypeHDD StorageType = "HDD" StorageTypeNVMe StorageType = "NVME" StorageTypeSATADOM StorageType = "SATADOM" StorageTypeEMMC StorageType = "EMMC" )
type Subscription ¶
type Subscription struct {
Name string `json:"name"`
Type SubscriptionType `json:"type"`
Subtotal float64 `json:"subtotal"`
Currency Currency `json:"currency"`
BillingCycle *BillingCycle `json:"billingCycle,omitempty"`
CreatedAt time.Time `json:"createdAt"`
SubscriptionItems []SubscriptionItem `json:"subscriptionItems"`
Invoices []Invoice `json:"invoices"`
}
type SubscriptionInput ¶
type SubscriptionInput struct {
Name string `json:"name"`
}
type SubscriptionItem ¶
type SubscriptionItem struct {
Description *string `json:"description"`
Price float64 `json:"price"`
Currency Currency `json:"currency"`
Type SubscriptionItemType `json:"type"`
SubscriptionItemDetail SubscriptionItemDetail `json:"subscriptionItemDetail"`
}
type SubscriptionItemDetail ¶
type SubscriptionItemDetail struct {
Server *Server `json:"server,omitempty"`
TrafficPlan *TrafficPlan `json:"trafficPlan,omitempty"`
}
type SubscriptionItemType ¶
type SubscriptionItemType string
const ( SubscriptionItemTypeServer SubscriptionItemType = "SERVER" SubscriptionItemTypeIP SubscriptionItemType = "IP" SubscriptionItemTypeFee SubscriptionItemType = "FEE" SubscriptionItemTypeDDoS SubscriptionItemType = "DDOS" SubscriptionItemTypeTraffic SubscriptionItemType = "TRAFFIC" SubscriptionItemTypeOther SubscriptionItemType = "OTHER" )
type SubscriptionType ¶
type SubscriptionType string
const ( SubscriptionTypePrepaid SubscriptionType = "PREPAID" SubscriptionTypePostpaid SubscriptionType = "POSTPAID" SubscriptionTypeTrial SubscriptionType = "TRIAL" )
type SubscriptionsInput ¶
type SubscriptionsInput struct {
NameIn []string `json:"name_in,omitempty"`
CurrencyIn []Currency `json:"currency_in,omitempty"`
TypeIn []SubscriptionType `json:"type_in,omitempty"`
}
type SupportRequest ¶
type SupportRequest struct {
ID int `json:"id"`
Subject string `json:"subject"`
Status SupportRequestStatus `json:"status"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
NumberOfReplies int `json:"numberOfReplies"`
LastReplyAt time.Time `json:"lastReplyAt"`
FullName string `json:"fullName"`
Email string `json:"email"`
Category *SupportRequestCategory `json:"category,omitempty"`
Posts []Post `json:"posts,omitempty"`
}
type SupportRequestCategory ¶
type SupportRequestCategory string
const ( SupportRequestCategoryNew SupportRequestCategory = "NEW" SupportRequestCategorySalesInquiry SupportRequestCategory = "SALES_INQUIRY" SupportRequestCategoryNetworkIssue SupportRequestCategory = "NETWORK_ISSUE" SupportRequestCategoryTechnicalIssue SupportRequestCategory = "TECHNICAL_ISSUE" SupportRequestCategoryAbuseReport SupportRequestCategory = "ABUSE_REPORT" )
type SupportRequestInput ¶
type SupportRequestInput struct {
ID int `json:"id"`
}
type SupportRequestPostBy ¶
type SupportRequestPostBy string
const ( SupportRequestPostByUser SupportRequestPostBy = "USER" SupportRequestPostByStaff SupportRequestPostBy = "STAFF" )
type SupportRequestPriority ¶
type SupportRequestPriority string
const ( SupportRequestPriorityNormal SupportRequestPriority = "NORMAL" SupportRequestPriorityHigh SupportRequestPriority = "HIGH" SupportRequestPriorityUrgent SupportRequestPriority = "URGENT" )
type SupportRequestStatus ¶
type SupportRequestStatus string
const ( SupportRequestStatusOpen SupportRequestStatus = "OPEN" SupportRequestStatusClosed SupportRequestStatus = "CLOSED" )
type SupportRequestSubject ¶
type SupportRequestSubject string
const ( SupportRequestSubjectHardwareIssue SupportRequestSubject = "HARDWARE_ISSUE" SupportRequestSubjectHardwareOther SupportRequestSubject = "HARDWARE_OTHER" SupportRequestSubjectNetworkRouting SupportRequestSubject = "NETWORK_ROUTING" SupportRequestSubjectNetworkBGP SupportRequestSubject = "NETWORK_BGP" SupportRequestSubjectNetworkAdditionalIPs SupportRequestSubject = "NETWORK_ADDITIONAL_IPS" SupportRequestSubjectNetworkOther SupportRequestSubject = "NETWORK_OTHER" SupportRequestSubjectSalesServerOrder SupportRequestSubject = "SALES_SERVER_ORDER" SupportRequestSubjectSalesPricing SupportRequestSubject = "SALES_PRICING" SupportRequestSubjectSalesBandwidthPlan SupportRequestSubject = "SALES_BANDWIDTH_PLAN" SupportRequestSubjectSalesOther SupportRequestSubject = "SALES_OTHER" SupportRequestSubjectSalesCancellation SupportRequestSubject = "SALES_CANCELLATION" SupportRequestSubjectSalesServerUpgrade SupportRequestSubject = "SALES_SERVER_UPGRADE" )
type SupportRequestsInput ¶
type SupportRequestsInput struct {
Status *SupportRequestStatus `json:"status,omitempty"`
CategoriesIn []SupportRequestCategory `json:"categories_in,omitempty"`
}
type System ¶
type System struct {
Raid Raid `json:"raid"`
OperatingSystem OperatingSystem `json:"operatingSystem"`
}
type Traffic ¶
type Traffic struct {
Aggregated AggregatedTraffic `json:"aggregated"`
PerServer []PerServerTraffic `json:"perServer"`
}
type TrafficInput ¶
type TrafficInput struct {
From time.Time `json:"from"`
To time.Time `json:"to"`
Filter *TrafficServersInput `json:"filter,omitempty"`
}
type TrafficPlan ¶
type TrafficPlan struct {
Name string `json:"name"`
Type TrafficPlanType `json:"type"`
Scope TrafficPlanScope `json:"scope"`
Bandwidth *float64 `json:"bandwidth,omitempty"`
}
type TrafficPlanScope ¶
type TrafficPlanScope string
const ( TrafficPlanScopePooled TrafficPlanScope = "POOLED" TrafficPlanScopeServer TrafficPlanScope = "SERVER" )
type TrafficPlanType ¶
type TrafficPlanType string
const ( TrafficPlanTypeP95 TrafficPlanType = "P95" TrafficPlanTypeMetered TrafficPlanType = "METERED" TrafficPlanTypePeakUnmetered TrafficPlanType = "PEAK_UNMETERED" TrafficPlanTypePeakMetered TrafficPlanType = "PEAK_METERED" )
type TrafficServersInput ¶
type TrafficServersInput struct {
NameIn []string `json:"name_in,omitempty"`
AliasIn []string `json:"alias_in,omitempty"`
LocationIn []string `json:"location_in,omitempty"`
RegionIn []string `json:"region_in,omitempty"`
IPIn []string `json:"ip_in,omitempty"`
IpmiIPIn []string `json:"ipmiIp_in,omitempty"`
}
type TrafficStatistics ¶
Click to show internal directories.
Click to hide internal directories.