groups

package
v0.0.0-...-63319d1 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: MPL-2.0, Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateOpts

type CreateOpts struct {
	// Name of the API group
	Name string `json:"name" required:"true"`
	// Description of the API group
	Remark string `json:"remark,omitempty"`
}

CreateOpts contains options for creating a API group. This object is passed to the API groups Create function.

func (CreateOpts) ToGroupCreateMap

func (opts CreateOpts) ToGroupCreateMap() (map[string]interface{}, error)

ToGroupCreateMap assembles a request body based on the contents of a CreateOpts.

type CreateOptsBuilder

type CreateOptsBuilder interface {
	ToGroupCreateMap() (map[string]interface{}, error)
}

CreateOptsBuilder allows extensions to add additional parameters to the Create request.

type CreateResult

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

CreateResult contains the response body and error from a Create request.

func Create

func Create(client *golangsdk.ServiceClient, opts CreateOptsBuilder) (r CreateResult)

Create will create a new API group based on the values in CreateOpts.

func (CreateResult) Extract

func (r CreateResult) Extract() (*Group, error)

Extract will get the Group object out of the commonResult object.

type DeleteResult

type DeleteResult struct {
	golangsdk.ErrResult
}

DeleteResult contains the response body and error from a Delete request.

func Delete

func Delete(client *golangsdk.ServiceClient, id string) (r DeleteResult)

Delete will delete the existing group with the provided ID.

type GetResult

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

GetResult contains the response body and error from a Get request.

func Get

func Get(client *golangsdk.ServiceClient, id string) (r GetResult)

Get retrieves the group with the provided ID. To extract the Group object from the response, call the Extract method on the GetResult.

func (GetResult) Extract

func (r GetResult) Extract() (*Group, error)

Extract will get the Group object out of the commonResult object.

type Group

type Group struct {
	// Unique identifier for the Group.
	ID string `json:"id"`
	// Human-readable display name for the Group.
	Name string `json:"name"`
	// Description of the API group.
	Remark string `json:"remark"`
	// Status of the Group.
	Status int `json:"status"`
	// Indicates whether the API group has been listed on the marketplace.
	OnSellStatus int `json:"on_sell_status"`
	// Subdomain name automatically allocated by the system to the API group.
	SlDomain string `json:"sl_domain"`
	// Total number of times all APIs in the API group can be accessed.
	CallLimits int `json:"call_limits"`
	// The type of Group to create, either SATA or SSD.
	TimeInterval int `json:"time_interval"`
	// Time unit for limiting the number of API calls
	TimeUnit string `json:"time_unit"`
	// List of independent domain names bound to the API group
	UrlDomains []UrlDomain `json:"url_domains"`
	// Time when the API group is created
	RegisterTime time.Time `json:"-"`
	// Time when the API group was last modified
	UpdateTime time.Time `json:"-"`
}

Group contains all the information associated with a API group.

type UpdateOpts

type UpdateOpts struct {
	// Name of the API group
	Name string `json:"name" required:"true"`
	// Description of the API group
	Remark string `json:"remark,omitempty"`
}

UpdateOpts contain options for updating an existing API group.

func (UpdateOpts) ToGroupUpdateMap

func (opts UpdateOpts) ToGroupUpdateMap() (map[string]interface{}, error)

ToGroupUpdateMap assembles a request body based on the contents of an UpdateOpts.

type UpdateOptsBuilder

type UpdateOptsBuilder interface {
	ToGroupUpdateMap() (map[string]interface{}, error)
}

UpdateOptsBuilder allows extensions to add additional parameters to the Update request.

type UpdateResult

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

UpdateResult contains the response body and error from an Update request.

func Update

func Update(client *golangsdk.ServiceClient, id string, opts UpdateOptsBuilder) (r UpdateResult)

Update will update the API group with provided information. To extract the updated API group from the response, call the Extract method on the UpdateResult.

func (UpdateResult) Extract

func (r UpdateResult) Extract() (*Group, error)

Extract will get the Group object out of the commonResult object.

type UrlDomain

type UrlDomain struct {
	ID          string `json:"id"`
	Domain      string `json:"domain"`
	CnameStatus int    `json:"cname_status"`
	SslID       string `json:"ssl_id"`
	SslName     string `json:"ssl_name"`
}

Jump to

Keyboard shortcuts

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