go-selvpcclient: github.com/selectel/go-selvpcclient/selvpcclient/resell/v2/capabilities Index | Files | Directories

package capabilities

import "github.com/selectel/go-selvpcclient/selvpcclient/resell/v2/capabilities"

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

Package Files

doc.go requests.go schemas.go

type Capabilities Uses

type Capabilities struct {
    // Licenses contains licenses information.
    Licenses []License `json:"licenses"`

    // Logo contains project logo information.
     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 Uses

func Get(ctx context.Context, client *selvpcclient.ServiceClient) (*Capabilities, *selvpcclient.ResponseResult, error)

Get returns the domain capabilities.

type Granularity Uses

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 Uses

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 struct {
    // MaxSizeBytes represents maximum valid size of the logo.
    MaxSizeBytes int `json:"max_size_bytes"`
}

Logo contains project logo information.

type Region Uses

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 Uses

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 Uses

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 Uses

type Traffic struct {
    // Granularities represents traffic granularities.
    Granularities []Granularity `json:"granularities"`
}

Traffic contains information about domain traffic.

type Zone Uses

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.

Directories

PathSynopsis
testing

Package capabilities imports 4 packages (graph). Updated 2018-12-12. Refresh now. Tools for package owners.