Documentation ¶
Overview ¶
Package capabilities provides the ability to retrieve capabilities information through the Resell v2 API.
Example of getting domain capabilities
domainCapabilities, _, err := capabilities.Get(ctx, resellClient) if err != nil { log.Fatal(err) } fmt.Println(domainCapabilities)
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Capabilities ¶
type Capabilities struct { // Licenses contains licenses information. Licenses []License `json:"licenses"` // Logo contains project logo information. Logo Logo `json:"logo"` // Regions contains Identity service regions information. Regions []Region `json:"regions"` // Resources contains billing resources information. Resources []Resource `json:"resources"` // Subnets contains public subnets information. Subnets []Subnet `json:"subnets"` // Traffic contains domain traffic information. Traffic Traffic `json:"traffic"` }
Capabilities contains possible availability values of different domain resources.
func Get ¶
func Get(ctx context.Context, client *selvpcclient.ServiceClient) (*Capabilities, *selvpcclient.ResponseResult, error)
Get returns the domain capabilities.
type Granularity ¶
type Granularity struct { // Granularity represents granularity in seconds. Granularity int `json:"granularity"` // Timespan represents period of time in days. Timespan int `json:"timespan"` }
Granularity contains information about domain traffic granularity.
type License ¶
type License struct { // Availability contains availability between locations. Availability []string `json:"availability"` // Type represents license type. Type string `json:"type"` }
License contains single license information.
type Logo ¶
type Logo struct { // MaxSizeBytes represents maximum valid size of the logo. MaxSizeBytes int `json:"max_size_bytes"` }
Logo contains project logo information.
type Region ¶
type Region struct { // Description contains a human-readable region description. Description string `json:"description"` // IsDefault shows if region is a default Identity region. IsDefault bool `json:"is_default"` // Name contains a human-readable region name. Name string `json:"name"` // Zones contains information about different region zones. Zones []Zone `json:"zones"` }
Region contains information about single Identity region.
type Resource ¶
type Resource struct { // Name contains a human-readable resource name. Name string `json:"name"` // QuotaScope shows scope of the resource. It can be region, zone or null. QuotaScope string `json:"quota_scope"` // Preordered shows if resource is preordered. Preordered bool `json:"preordered"` // Quotable shows if resource is quotable. Quotable bool `json:"quotable"` // Unbillable shows if resource is not should be billed. Unbillable bool `json:"unbillable"` }
Resource contains information about single billing resource.
type Subnet ¶
type Subnet struct { // Availability contains availability between locations. Availability []string `json:"availability"` // Type represents subnet type. Type string `json:"type"` // PrefixLength represents subnet prefix length. PrefixLength string `json:"prefix_length"` }
Subnet contains information about single public subnet.
type Traffic ¶
type Traffic struct { // Granularities represents traffic granularities. Granularities []Granularity `json:"granularities"` }
Traffic contains information about domain traffic.
type Zone ¶
type Zone struct { // Description contains a human-readable region description. Description string `json:"description"` // Enabled shows if zone is enabled or not. Enabled bool `json:"enabled"` // IsDefault shows if zone is a default availability zone. IsDefault bool `json:"is_default"` // IsPrivate shows if zone is a private availability zone. IsPrivate bool `json:"is_private"` // Name contains a human-readable region name. Name string `json:"name"` }
Zone contains information about single availability zone.