capabilities

package
v3.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 13, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

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(client)
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 {
	Logo Logo `json:"logo"`

	// Regions contains Identity service regions information.
	Regions []Region `json:"regions"`

	// Resources contains billing resources information.
	Resources []Resource `json:"resources"`
}

Capabilities contains possible availability values of different domain resources.

func Get

Get returns the domain capabilities.

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 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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL