quotacenter

package
v0.9.130 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2022 License: Apache-2.0 Imports: 5 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"

	BASE_APPLY_URL = "/apply"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ApplicationCreateModel added in v0.9.100

type ApplicationCreateModel struct {
	ProductType string `json:"productType"`
	ServiceType string `json:"serviceType"`
	Type        string `json:"type"`
	Region      string `json:"region"`
	Name        string `json:"name"`
	Value       string `json:"value"`
	Reason      string `json:"reason"`
}

type ApplicationModel added in v0.9.100

type ApplicationModel struct {
	Id          string `json:"id"`
	ProductType string `json:"productType"`
	ServiceType string `json:"serviceType"`
	Type        string `json:"type"`
	Region      string `json:"region"`
	Name        string `json:"name"`
	Value       string `json:"value"`
	Reason      string `json:"reason"`
	Status      string `json:"status"`
	Conclusion  string `json:"conclusion"`
	CreateTime  string `json:"createTime"`
	EffectTime  string `json:"effectTime,omitempty"`
	ApproveTime string `json:"approveTime,omitempty"`
}

type ApplicationQueryArgs added in v0.9.100

type ApplicationQueryArgs struct {
	Id          string `json:"id,omitempty"`
	Name        string `json:"name,omitempty"`
	Status      string `json:"status,omitempty"`
	ProductType string `json:"status,productType"`
	ServiceType string `json:"serviceType"`
	Type        string `json:"type"`
	Region      string `json:"region"`
	Marker      string `json:"marker,omitempty"`
	MaxKeys     int    `json:"maxKeys,omitempty"`
}

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) ApplicationDetail added in v0.9.100

func (c *Client) ApplicationDetail(id string) (*ApplicationModel, error)

ApplicationDetail - query application detail from quota_center with id.

PARAMS:

  • id: the application's id.

RETURNS:

  • *ApplicationModel: the result of application.
  • error: nil if success otherwise the specific error

func (*Client) ApplicationQuery added in v0.9.100

func (c *Client) ApplicationQuery(args *ApplicationQueryArgs) (*ListApplicationResult, error)

ApplicationQuery - query applications from quota_center with the specific parameters

PARAMS:

  • args: the arguments to query application.

RETURNS:

  • *ListApplicationResult: the result of applications.
  • error: nil if success otherwise the specific error

func (*Client) Apply added in v0.9.100

func (c *Client) Apply(args *ApplicationCreateModel) (*IdModel, 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 IdModel added in v0.9.100

type IdModel struct {
	// contains filtered or unexported fields
}

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"`
	Apply       bool   `json:"apply"`
}

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 ListApplicationResult added in v0.9.100

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

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