quotacenter

package
v0.0.1-alpha Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package quotacenter defines the QuotaCenter services of BCE. The supported APIs are all defined in sub-package

model.go - definitions of the request arguments and results data structure model

quota_center.go - the quota_center APIs definition supported by the QUOTA_CENTER service

Index

Constants

View Source
const (
	URI_PREFIX = bce.URI_PREFIX + "v1"

	DEFAULT_ENDPOINT = "quota-center.baidubce.com"

	BASE_QUOTA_CENTER_URL = "/quota_center"

	BASE_PRODUCT_URL = "/info/product"

	BASE_INFO_URL = "/info"

	BASE_REGION_URL = "/info/region"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*bce.BceClient
}

Client of QUOTA_CENTER service is a kind of BceClient, so derived from BceClient

func NewClient

func NewClient(ak, sk, endPoint string) (*Client, error)

func (*Client) InfoQuery

func (c *Client) InfoQuery(args *InfoQueryArgs) (*ListInfoResult, error)

InfoQuery - query basic infos from quota_center with the specific parameters

PARAMS:

  • args: the arguments to query infos.

RETURNS:

  • *ListInfoResult: the result of infos from quota_center.
  • error: nil if success otherwise the specific error

func (*Client) ListProducts

func (c *Client) ListProducts(args *ProductQueryArgs) (*ListProductResult, error)

ListProducts - list quota center support products.

PARAMS:

  • args: the arguments to list products.

RETURNS:

  • *ListProductResult: the result of list products.
  • error: nil if success otherwise the specific error

func (*Client) ListRegions

func (c *Client) ListRegions(args *RegionQueryArgs) (*ListRegionResult, error)

listRegions - list quota center support regions with the specific parameters.

PARAMS:

  • args: the arguments to list regions.

RETURNS:

  • *ListRegionResult: the result of regions.
  • error: nil if success otherwise the specific error

func (*Client) QuotaCenterQuery

func (c *Client) QuotaCenterQuery(args *QuotaCenterQueryArgs) (*ListQuotaResult, error)

QuotaCenterQuery - query from quota_center with the specific parameters

PARAMS:

  • args: the arguments to query quota_center

RETURNS:

  • *ListQuotaResult: the result of query from quota_center.
  • error: nil if success otherwise the specific error

type InfoModel

type InfoModel struct {
	ProductType string `json:"productType"`
	ServiceType string `json:"serviceType"`
	Type        string `json:"type"`
	Region      string `json:"region"`
	Name        string `json:"name"`
	Description string `json:"description"`
}

type InfoQueryArgs

type InfoQueryArgs struct {
	ServiceType string `json:"serviceType,omitempty"`
	Region      string `json:"region,omitempty"`
	Marker      string `json:"marker,omitempty"`
	MaxKeys     int    `json:"maxKeys,omitempty"`
}

type ListInfoResult

type ListInfoResult struct {
	Marker      string      `json:"marker"`
	MaxKeys     int         `json:"maxKeys"`
	NextMarker  string      `json:"nextMarker"`
	IsTruncated bool        `json:"isTruncated"`
	Result      []InfoModel `json:"result"`
}

type ListProductResult

type ListProductResult struct {
	Marker      string         `json:"marker"`
	MaxKeys     int            `json:"maxKeys"`
	NextMarker  string         `json:"nextMarker"`
	IsTruncated bool           `json:"isTruncated"`
	Result      []ProductModel `json:"result"`
}

type ListQuotaResult

type ListQuotaResult struct {
	Marker      string       `json:"marker"`
	MaxKeys     int          `json:"maxKeys"`
	NextMarker  string       `json:"nextMarker"`
	IsTruncated bool         `json:"isTruncated"`
	Result      []QuotaModel `json:"result"`
}

type ListRegionResult

type ListRegionResult struct {
	Regions []string `json:"regions"`
}

type ProductModel

type ProductModel struct {
	ProductType string `json:"productType"`
	ServiceType string `json:"serviceType"`
}

type ProductQueryArgs

type ProductQueryArgs struct {
	ProductType string `json:"productType,omitempty"`
	Marker      string `json:"marker,omitempty"`
	MaxKeys     int    `json:"maxKeys,omitempty"`
}

type QuotaCenterQueryArgs

type QuotaCenterQueryArgs struct {
	Type        string `json:"type"`
	ServiceType string `json:"serviceType"`
	Region      string `json:"region"`
	Name        string `json:"name,omitempty"`
	Marker      string `json:"marker,omitempty"`
	MaxKeys     int    `json:"maxKeys,omitempty"`
}

type QuotaModel

type QuotaModel struct {
	ProductType string `json:"productType"`
	ServiceType string `json:"serviceType"`
	Type        string `json:"type"`
	Region      string `json:"region"`
	Name        string `json:"name"`
	Description string `json:"description"`
	Value       string `json:"value"`
	Used        string `json:"used"`
}

type RegionQueryArgs

type RegionQueryArgs struct {
	ProductType string `json:"productType"`
	ServiceType string `json:"serviceType"`
	Type        string `json:"type"`
}

Jump to

Keyboard shortcuts

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