eccr

package
v0.9.160 Latest Latest
Warning

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

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

Documentation

Index

Constants

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

	URI_PREFIX = bce.URI_PREFIX + "v1"

	REQUEST_INSTANCE_URL = "/instances"

	REQUEST_PRIVATELINK_URL = "/privatelinks"

	REQUEST_PUBLICLINK_URL = "/publiclinks"

	REQUEST_PUBLICLINK_WITHLIST_URL = "/whitelist"

	REQUEST_CREDENTIAL_URL = "/credential"

	REQUEST_REGISTRY_URL = "/registries"

	REQUEST_REPOSITORIES_URL = "/repositories"

	REQUEST_PROJECT_URL = "/projects"

	REQUEST_IMAGEBUILD_URL = "/imagebuilds"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AddPublicNetworkWhitelistArgs added in v0.9.144

type AddPublicNetworkWhitelistArgs struct {
	IPAddr      string `json:"ipAddr,omitempty" binding:"required,cidrv4|ipv4"`
	Description string `json:"description"`
}

type BatchDeleteBuildRepositoryTaskArgs added in v0.9.152

type BatchDeleteBuildRepositoryTaskArgs struct {
	Items []string `json:"items"`
}

BatchDeleteBuildRepositoryTaskArgs delete task request

type Billing added in v0.9.144

type Billing struct {
	ReservationTimeUnit string `json:"reservationTimeUnit" binding:"required,oneof=MONTH YEAR"`
	ReservationTime     int    `json:"reservationTime" binding:"required,oneof=1 2 3 4 5 6 7 8 9"`
	AutoRenew           bool   `json:"autoRenew"`
	AutoRenewTimeUnit   string `json:"autoRenewTimeUnit" binding:"oneof=MONTH YEAR"`
	AutoRenewTime       int    `json:"autoRenewTime" binding:"required,oneof=1 2 3 4 5 6 7 8 9"`
}

type BuildRepositoryTaskArgs added in v0.9.152

type BuildRepositoryTaskArgs struct {
	TagName    string `json:"tagName"`
	IsLatest   bool   `json:"isLatest"`
	FromType   string `json:"fromType"`
	Dockerfile string `json:"dockerfile"`
}

BuildRepositoryTaskArgs build repository task request

type BuildRepositoryTaskResponse added in v0.9.152

type BuildRepositoryTaskResponse struct {
	ID string `json:"id"`
}

BuildRepositoryTaskResponse build repository task response

type BuildRepositoryTaskResult added in v0.9.152

type BuildRepositoryTaskResult struct {
	ID         string    `json:"id"`
	TagName    string    `json:"tagName"`
	IsLatest   bool      `json:"isLatest"`
	Status     string    `json:"status"`
	FromType   string    `json:"fromType"`
	Dockerfile string    `json:"dockerfile"`
	CreateBy   string    `json:"createBy"`
	CreateAt   time.Time `json:"createAt"`
	Image      string    `json:"image"`
}

BuildRepositoryTaskResult build repository task result

type Client

type Client struct {
	*bce.BceClient
}

Client ccr enterprise interface.Interface

func NewClient

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

func (*Client) AddPublicNetworkWhitelist added in v0.9.144

func (c *Client) AddPublicNetworkWhitelist(instanceID string, args *AddPublicNetworkWhitelistArgs) error

AddPublicNetworkWhitelist - add Publiclink white list

PARAMS:

  • instanceId: the specific instance ID
  • DeletePublicNetworkWhiteListArgs: the arguments to delete publiclinks withlist

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) BatchDeleteBuildRepositoryTask added in v0.9.152

func (c *Client) BatchDeleteBuildRepositoryTask(instanceID, projectName, repositoryName string, args *BatchDeleteBuildRepositoryTaskArgs) error

func (*Client) CheckHealthRegistry added in v0.9.144

func (c *Client) CheckHealthRegistry(instanceID string, args *RegistryRequestArgs) error

CheckHealthRegistry - check if the registry is healthy

PARAMS:

  • instanceID: the specific instance ID
  • RegistryRequestArgs: parameters required to check registry

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) CreateBuildRepositoryTask added in v0.9.152

func (c *Client) CreateBuildRepositoryTask(instanceID, projectName, repositoryName string, args *BuildRepositoryTaskArgs) (
	*BuildRepositoryTaskResponse, error)

func (*Client) CreateInstance added in v0.9.144

func (c *Client) CreateInstance(args *CreateInstanceArgs) (*CreateInstanceResponse, error)

CreateInstance - create instance with the specific parameters

PARAMS:

  • CreateInstanceArgs: the arguments to crate Instance

RETURNS:

  • CreateInstanceResponse: the result of create Instance
  • error: nil if success otherwise the specific error

func (*Client) CreatePrivateNetwork added in v0.9.144

func (c *Client) CreatePrivateNetwork(instanceID string, args *CreatePrivateNetworkArgs) (map[string]string, error)

CreatePrivateNetwork - create private Network with the specific parameters

PARAMS:

  • instanceID: the specific instance ID
  • CreateInstanceArgs: the arguments to crate private network

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) CreateRegistry added in v0.9.144

func (c *Client) CreateRegistry(instanceID string, args *CreateRegistryArgs) (*CreateRegistryResponse, error)

CreateRegistry - create registry

PARAMS:

  • instanceID: the specific instance ID
  • CreateRegistryArgs: the arguments to crate registry

RETURNS:

  • error: nil if success otherwise the specific error
  • CreateRegistryResponse: the result od create registry

func (*Client) CreateTemporaryToken added in v0.9.144

func (c *Client) CreateTemporaryToken(instanceID string, args *CreateTemporaryTokenArgs) (*CreateTemporaryTokenResponse, error)

CreateTemporaryToken - create temporary token

PARAMS:

  • instanceID: the specific instance ID
  • CreateTemporaryTokenArgs: the arguments to crate temporary token

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) DeleteBuildRepositoryTask added in v0.9.152

func (c *Client) DeleteBuildRepositoryTask(instanceID, projectName, repositoryName, imageBuildID string) error

func (*Client) DeletePrivateNetwork added in v0.9.144

func (c *Client) DeletePrivateNetwork(instanceID string, args *DeletePrivateNetworkArgs) error

DeletePrivateNetwork - delete private Network with the specific parameters

PARAMS:

  • instanceID: the specific instance ID
  • DeletePrivateNetworkArgs: the arguments to delete private network

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) DeletePublicNetworkWhitelist added in v0.9.144

func (c *Client) DeletePublicNetworkWhitelist(instanceID string, args *DeletePublicNetworkWhitelistArgs) error

DeletePublicNetworkWhitelist - delete Publiclink white list

PARAMS:

  • instanceId: the specific instance ID
  • DeletePublicNetworkWhiteListArgs: delete publiclinks list

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) DeleteRegistry added in v0.9.144

func (c *Client) DeleteRegistry(instanceID, registryID string) error

func (*Client) GetBuildRepositoryTask added in v0.9.152

func (c *Client) GetBuildRepositoryTask(instanceID, projectName, repositoryName, imageBuildID string) (*BuildRepositoryTaskResult, 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) GetRegistryDetail added in v0.9.144

func (c *Client) GetRegistryDetail(instanceID, registryID string) (*RegistryResponse, error)

GetRegistryDetail - get a specific registry detail info

PARAMS:

  • instanceID: the specific instance ID
  • registryID: the specific registry ID

RETURNS:

  • error: nil if success otherwise the specific error
  • RegistryResponse: the result of create registry

func (*Client) ListBuildRepositoryTask added in v0.9.152

func (c *Client) ListBuildRepositoryTask(instanceID, projectName, repositoryName string, args *ListBuildRepositoryTaskArgs) (
	*ListBuildRepositoryTaskResponse, 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

func (*Client) ListPublicNetworks added in v0.9.144

func (c *Client) ListPublicNetworks(instanceID string) (*ListPublicNetworksResponse, error)

ListPublicNetworks - list all Publiclinks in an instance with the specific parameters

PARAMS:

  • instanceID: the specific instance ID

RETURNS:

  • *ListPublicNetworksResponse: the result of list Publiclinks
  • error: nil if success otherwise the specific error

func (*Client) ListRegistries added in v0.9.144

func (c *Client) ListRegistries(instanceID string, args *ListRegistriesArgs) (*ListRegistriesResponse, error)

ListRegistries - get a registry list of instance

PARAMS:

  • instanceID: the specific instance ID
  • ListRegistriesArgs: parameters required to list registry information

RETURNS:

  • error: nil if success otherwise the specific error
  • ListRegistriesResponse: the result of list registry

func (*Client) RenewInstance added in v0.9.144

func (c *Client) RenewInstance(orderType string, args *RenewInstanceArgs) (*RenewInstanceResponse, error)

RenewInstance - create instance with the specific parameters

PARAMS:

  • orderType: the operation type, value requires renew
  • ConfirmOrderRequest: the arguments to crate Instance

RETURNS:

  • CreateInstanceResponse: the result of create Instance
  • error: nil if success otherwise the specific error

func (*Client) ResetPassword added in v0.9.144

func (c *Client) ResetPassword(instanceID string, args *ResetPasswordArgs) (map[string]string, error)

ResetPassword - reset login password

PARAMS:

  • instanceId: the specific instance ID
  • ResetPasswordArgs: the arguments to reset password

RETURNS:

  • error: nil if success otherwise the specific error
  • map[string]string: the result of reset password

func (*Client) UpdateInstance added in v0.9.144

func (c *Client) UpdateInstance(instanceID string, args *UpdateInstanceArgs) (*UpdateInstanceResponse, error)

UpdateInstance - update instance info

PARAMS:

  • instanceId: the specific instance ID
  • UpdateInstanceArgs: parameters required to update instance info

RETURNS:

  • *UpdateInstanceResponse: the result of updated instance info
  • error: nil if success otherwise the specific error

func (*Client) UpdatePublicNetwork added in v0.9.144

func (c *Client) UpdatePublicNetwork(instanceID string, args *UpdatePublicNetworkArgs) error

UpdatePublicNetwork - update Publiclink

PARAMS:

  • instanceId: the specific instance ID
  • UpdatePublicNetworkArgs: parameters required to update publiclink info

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) UpdateRegistry added in v0.9.144

func (c *Client) UpdateRegistry(instanceID, registryID string, args *RegistryRequestArgs) (*RegistryResponse, error)

UpdateRegistry - update the registry info

PARAMS:

  • instanceID: the specific instance ID
  • registryID: the specific registry ID
  • RegistryRequestArgs: parameters required to update registry

RETURNS:

  • error: nil if success otherwise the specific error
  • RegistryResponse: the result of update registry

func (*Client) UpgradeInstance added in v0.9.144

func (c *Client) UpgradeInstance(instanceID string, args *UpgradeInstanceArgs) (*UpgradeInstanceResponse, error)

UpgradeInstance - upgrade instance by specific parameters

PARAMS:

  • instanceId: the specific instance ID
  • UpgradeInstanceArgs: parameters required to upgrade instance information

RETURNS:

= UpgradeInstanceResponse: the result of upgrade instance
- error: nil if success otherwise the specific error

type Config added in v0.9.144

type Config struct {
	// renewal time
	Duration   int    `json:"duration"`
	InstanceId string `json:"instanceId"`
	// Product name
	ServiceType string `json:"serviceType"`
	// renew time unit 'year' | 'month' | 'day'; default `month`
	TimeUnit string `json:"timeUnit"`
	// Whether it is an order that expires uniformly. default(no): no parameter, yes: 1
	UnionExpireOrderFlag string `json:"unionExpireOrderFlag"`
	// UUID
	UUID string `json:"uuid"`
}

type CreateInstanceArgs added in v0.9.144

type CreateInstanceArgs struct {
	Type   string `json:"type" binding:"required,oneof=BASIC STANDARD ADVANCED"`
	Name   string `json:"name" binding:"required,max=256,min=1"`
	Bucket string `json:"bucket"`

	PaymentTiming string  `json:"paymentTiming" binding:"required,oneof=prepay"`
	Billing       Billing `json:"billing"`

	PaymentMethod []PaymentMethod `json:"paymentMethod"`
}

type CreateInstanceResponse added in v0.9.144

type CreateInstanceResponse struct {
	InstanceID string `json:"instanceID"`
	OrderID    string `json:"orderID"`
}

type CreatePrivateNetworkArgs added in v0.9.144

type CreatePrivateNetworkArgs struct {
	VpcID          string `json:"vpcID,omitempty" binding:"required"`
	SubnetID       string `json:"subnetID,omitempty" binding:"required"`
	IPAddress      string `json:"ipAddress,omitempty"`
	IPType         string `json:"ipType,omitempty"`
	AutoDNSResolve bool   `json:"autoDnsResolve,omitempty"`
}

type CreateRegistryArgs added in v0.9.144

type CreateRegistryArgs struct {
	// credential
	Credential *RegistryCredential `json:"credential"`

	// Description of the registry.
	Description string `json:"description"`

	// Whether or not the certificate will be verified when Harbor tries to access the server.
	Insecure bool `json:"insecure"`

	// The registry name.
	Name string `json:"name"`

	// Type of the registry, e.g. 'harbor'.
	Type string `json:"type" binding:"required,oneof=harbor docker-hub docker-registry baidu-ccr"`

	// The registry URL string.
	URL string `json:"url"`
}

type CreateRegistryResponse added in v0.9.144

type CreateRegistryResponse struct {
	// The create time of the policy.
	CreationTime string `json:"creation_time,omitempty"`

	// credential
	Credential *RegistryCredential `json:"credential,omitempty"`

	// Description of the registry.
	Description string `json:"description,omitempty"`

	// The registry ID.
	ID int64 `json:"id,omitempty"`

	// Whether or not the certificate will be verified when Harbor tries to access the server.
	Insecure bool `json:"insecure,omitempty"`

	// The registry name.
	Name string `json:"name,omitempty"`

	// Health status of the registry.
	Status string `json:"status,omitempty"`

	// Type of the registry, e.g. 'harbor'.
	Type string `json:"type,omitempty"`

	// The update time of the policy.
	UpdateTime string `json:"update_time,omitempty"`

	// The registry URL string.
	URL string `json:"url,omitempty"`
}

type CreateTemporaryTokenArgs added in v0.9.144

type CreateTemporaryTokenArgs struct {
	Duration int `json:"duration,omitempty" binding:"required,min=1,max=24"`
}

type CreateTemporaryTokenResponse added in v0.9.144

type CreateTemporaryTokenResponse struct {
	Password string `json:"password,omitempty"`
}

type DeletePrivateNetworkArgs added in v0.9.144

type DeletePrivateNetworkArgs struct {
	VpcID    string `json:"vpcID,omitempty"`
	SubnetID string `json:"subnetID,omitempty"`
}

type DeletePublicNetworkWhitelistArgs added in v0.9.144

type DeletePublicNetworkWhitelistArgs struct {
	Items []string `json:"items,omitempty" binding:"required"`
}

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)
	CreateInstance(args *CreateInstanceArgs) (*CreateInstanceResponse, error)
	RenewInstance(orderType string, args *RenewInstanceArgs) (*RenewInstanceResponse, error)
	UpdateInstance(instanceID string, args *UpdateInstanceArgs) (*UpdateInstanceResponse, error)
	UpgradeInstance(instanceID string, args *UpgradeInstanceArgs) (*UpgradeInstanceResponse, error)
	ListPrivateNetworks(instanceID string) (*ListPrivateNetworksResponse, error)
	CreatePrivateNetwork(instanceID string, args *CreatePrivateNetworkArgs) (map[string]string, error)
	DeletePrivateNetwork(instanceID string, args *DeletePrivateNetworkArgs) error
	ListPublicNetworks(instanceID string) (*ListPublicNetworksResponse, error)
	UpdatePublicNetwork(instanceID string, args *UpdatePublicNetworkArgs) error
	DeletePublicNetworkWhitelist(instanceID string, args *DeletePublicNetworkWhitelistArgs) error
	AddPublicNetworkWhitelist(instanceID string, args *AddPublicNetworkWhitelistArgs) error
	ResetPassword(instanceID string, args *ResetPasswordArgs) (map[string]string, error)
	CreateTemporaryToken(instanceID string, args *CreateTemporaryTokenArgs) (*CreateTemporaryTokenResponse, error)
	CreateRegistry(instanceID string, args *CreateRegistryArgs) (*CreateRegistryResponse, error)
	GetRegistryDetail(instanceID, registryID string) (*RegistryResponse, error)
	ListRegistries(instanceID string, args *ListRegistriesArgs) (*ListRegistriesResponse, error)
	CheckHealthRegistry(instanceID string, args *RegistryRequestArgs) error
	UpdateRegistry(instanceID, registryID string, args *RegistryRequestArgs) (*RegistryResponse, error)
	DeleteRegistry(instanceID, registryID string) error
	ListBuildRepositoryTask(instanceID, projectName, repositoryName string, args *ListBuildRepositoryTaskArgs) (*ListBuildRepositoryTaskResponse, error)
	CreateBuildRepositoryTask(instanceID, projectName, repositoryName string, args *BuildRepositoryTaskArgs) (*BuildRepositoryTaskResponse, error)
	GetBuildRepositoryTask(instanceID, projectName, repositoryName, imageBuildID string) (*BuildRepositoryTaskResult, error)
	DeleteBuildRepositoryTask(instanceID, projectName, repositoryName, imageBuildID string) error
	BatchDeleteBuildRepositoryTask(instanceID, projectName, repositoryName string, args *BatchDeleteBuildRepositoryTaskArgs) error
}

type Item added in v0.9.144

type Item struct {
	Config Config `json:"config"`
	// Payment information
	PaymentMethod []PaymentMethod `json:"paymentMethod"`
}

type ListBuildRepositoryTaskArgs added in v0.9.152

type ListBuildRepositoryTaskArgs struct {
	KeywordType string `json:"keywordType"`
	Keyword     string `json:"keyword"`
	PageNo      int    `json:"pageNo"`
	PageSize    int    `json:"pageSize"`
}

type ListBuildRepositoryTaskResponse added in v0.9.152

type ListBuildRepositoryTaskResponse struct {
	PageInfo `json:",inline"`
	Items    []*BuildRepositoryTaskResult `json:"items"`
}

ListBuildRepositoryTaskResponse list repository task response

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 ListPublicNetworksResponse added in v0.9.144

type ListPublicNetworksResponse struct {
	Domain    string                       `json:"domain"`
	Status    string                       `json:"status"`
	Whitelist []PublicNetworkInfoWhitelist `json:"whitelist"`
}

type ListRegistriesArgs added in v0.9.144

type ListRegistriesArgs struct {
	RegistryName string `json:"registryName"`
	RegistryType string `json:"registryType"`
	PageNo       int    `json:"pageNo"`
	PageSize     int    `json:"pageSize"`
}

type ListRegistriesResponse added in v0.9.144

type ListRegistriesResponse struct {
	PageInfo `json:",inline"`
	Items    []*RegistryResponse `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 PaymentMethod added in v0.9.144

type PaymentMethod struct {
	Type   string   `json:"type"`
	Values []string `json:"values"`
}

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 PublicNetworkInfoWhitelist added in v0.9.144

type PublicNetworkInfoWhitelist struct {
	IPAddr      string `json:"ipAddr,omitempty" binding:"required,cidrv4|ipv4"`
	Description string `json:"description"`
}

type RegistryCredential added in v0.9.144

type RegistryCredential struct {

	// Access key, e.g. user name when credential type is 'basic'.
	AccessKey string `json:"accessKey"`

	// Access secret, e.g. password when credential type is 'basic'.
	AccessSecret string `json:"accessSecret,omitempty"`

	// Credential type, such as 'basic', 'oauth'.
	Type string `json:"type"`
}

type RegistryRequestArgs added in v0.9.144

type RegistryRequestArgs struct {
	// credential
	Credential *RegistryCredential `json:"credential"`

	// Description of the registry.
	Description string `json:"description"`

	// Whether or not the certificate will be verified when Harbor tries to access the server.
	Insecure bool `json:"insecure"`

	// The registry name.
	Name string `json:"name"`

	// Type of the registry, e.g. 'harbor'.
	Type string `json:"type" binding:"required,oneof=harbor docker-hub docker-registry baidu-ccr"`

	// The registry URL string.
	URL string `json:"url"`
}

type RegistryResponse added in v0.9.144

type RegistryResponse struct {
	// id
	ID int64 `json:"id"`

	// creation time
	CreationTime string `json:"creationTime"`

	// credential
	Credential *RegistryCredential `json:"credential"`

	// description
	Description string `json:"description"`

	// insecure
	Insecure bool `json:"insecure"`

	// name
	Name string `json:"name"`

	// status
	Status string `json:"status"`

	// type
	Type string `json:"type"`

	// update time
	UpdateTime string `json:"updateTime"`

	// url
	URL string `json:"url"`
}

type RenewInstanceArgs added in v0.9.144

type RenewInstanceArgs struct {
	Items []Item `json:"items"`
	// Payment information
	PaymentMethod []PaymentMethod `json:"paymentMethod"`
}

type RenewInstanceResponse added in v0.9.144

type RenewInstanceResponse struct {
	OrderId string `json:"orderId"`
}

type ResetPasswordArgs added in v0.9.144

type ResetPasswordArgs struct {
	Password string `json:"password,omitempty" binding:"required,password"`
}

type UpdateInstanceArgs added in v0.9.144

type UpdateInstanceArgs struct {
	Name string `json:"name,omitempty" binding:"required,max=256,min=1"`
}

type UpdateInstanceResponse added in v0.9.144

type UpdateInstanceResponse 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 UpdatePublicNetworkArgs added in v0.9.144

type UpdatePublicNetworkArgs struct {
	Action string `json:"action,omitempty" enums:"open,close" binding:"required,oneof=open close"`
}

type UpgradeInstanceArgs added in v0.9.144

type UpgradeInstanceArgs struct {
	Type string `json:"type" binding:"required,oneof=BASIC STANDARD ADVANCED"`

	PaymentMethod []PaymentMethod `json:"paymentMethod"`
}

type UpgradeInstanceResponse added in v0.9.144

type UpgradeInstanceResponse struct {
	OrderID string `json:"orderID"`
}

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