eccr

package
v0.9.142 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DEFAULT_ENDPOINT = "ccr." + bce.DEFAULT_REGION + ".baidubce.com"

	URI_PREFIX = bce.URI_PREFIX + "api/ccr/esvc/v1"

	REQUEST_INSTANCE_URL = "/instances"

	REQUEST_PRIVATELINK_URL = "/privatelinks"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*bce.BceClient
}

Client ccr enterprise interface.Interface

func NewClient

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

func (*Client) GetInstanceDetail

func (c *Client) GetInstanceDetail(instanceID string) (*GetInstanceDetailResponse, error)

GetInstanceDetail - get a specific instance detail info

PARAMS:

  • instanceID: the specific instance ID

RETURNS:

  • *GetInstanceDetailResponse: the result of get instance detail info
  • error: nil if success otherwise the specific error

func (*Client) ListInstances

func (c *Client) ListInstances(args *ListInstancesArgs) (*ListInstancesResponse, error)

ListInstances - list all instance with the specific parameters

PARAMS:

  • ListInstancesArgs: the arguments to list all instance

RETURNS:

  • ListInstancesResponse: the result of list Instance
  • error: nil if success otherwise the specific error

func (*Client) ListPrivateNetworks

func (c *Client) ListPrivateNetworks(instanceID string) (*ListPrivateNetworksResponse, error)

ListPrivateNetworks - list all Privatelinks in an instance with the specific parameters

PARAMS:

  • instanceID: the specific instance ID

RETURNS:

  • *ListPrivateNetworksResponse: the result of list Privatelinks
  • error: nil if success otherwise the specific error

type GetInstanceDetailResponse

type GetInstanceDetailResponse struct {
	Info      *InstanceInfo     `json:"info,omitempty"`
	Statistic InstanceStatistic `json:"statistic,omitempty"`
	Quota     UserQuota         `json:"quota,omitempty"`
	Bucket    string            `json:"bucket,omitempty"`
	Region    string            `json:"region,omitempty"`
}

type InstanceInfo

type InstanceInfo struct {
	ID           string    `json:"id"`
	InstanceType string    `json:"instanceType"`
	Name         string    `json:"name"`
	Status       string    `json:"status"`
	CreateTime   time.Time `json:"createTime"`
	Region       string    `json:"region"`
	PublicURL    string    `json:"publicURL"`
	ExpireTime   time.Time `json:"expireTime"`
}

type InstanceStatistic

type InstanceStatistic struct {
	Repo      int64 `json:"repo"`
	Chart     int64 `json:"chart"`
	Namespace int64 `json:"namespace"`
	Storage   int64 `json:"storage"`
}

type Interface

type Interface interface {
	ListInstances(args *ListInstancesArgs) (*ListInstancesResponse, error)
	GetInstanceDetail(instanceID string) (*GetInstanceDetailResponse, error)
	ListPrivateNetworks(instanceID string) (*ListPrivateNetworksResponse, error)
}

type ListInstancesArgs

type ListInstancesArgs struct {
	PageNo       int
	PageSize     int
	KeywordType  string
	Keyword      string
	Acrossregion string
}

type ListInstancesResponse

type ListInstancesResponse struct {
	PageInfo  `json:",inline"`
	Instances []*InstanceInfo `json:"instances"`
}

type ListPrivateNetworksResponse

type ListPrivateNetworksResponse struct {
	Domain string                 `json:"domain"`
	Items  []PrivateNetworksItems `json:"items"`
}

type PageInfo

type PageInfo struct {
	Total    int `json:"total"`
	PageNo   int `json:"pageNo"`
	PageSize int `json:"pageSize"`
}

type PagedListOption

type PagedListOption struct {
	PageNo      int
	PageSize    int
	KeywordType string
	Keyword     string
}

type PrivateNetworksItems

type PrivateNetworksItems struct {
	VpcID          string `json:"vpcID,omitempty"`
	SubnetID       string `json:"subnetID,omitempty"`
	ServiceNetID   string `json:"serviceNetID,omitempty"`
	Status         string `json:"status,omitempty"`
	IPAddress      string `json:"ipAddress,omitempty"`
	ResourceSource string `json:"resourceSource,omitempty"`
}

type UserQuota

type UserQuota struct {
	Repo      int64 `json:"repo"`
	Chart     int64 `json:"chart"`
	Namespace int64 `json:"namespace"`
}

Jump to

Keyboard shortcuts

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