common

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AsyncResponse

type AsyncResponse struct {
	Location string `json:"location"`
	// contains filtered or unexported fields
}

func GetAsyncResponse

func GetAsyncResponse(c *Client, resp *http.Response) (*AsyncResponse, error)

func (*AsyncResponse) QueryLocation

func (async *AsyncResponse) QueryLocation() (*http.Response, error)

func (*AsyncResponse) QueryRealResponse

func (async *AsyncResponse) QueryRealResponse(i interface{}, timeout time.Duration) error

type Client

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

func (*Client) CreateRequestWithURI

func (client *Client) CreateRequestWithURI(method, uri string, body []byte) (*http.Response, error)

func (*Client) Init

func (client *Client) Init(AccountName, Password, ServerEndpoint string) error

type Error

type Error struct {
	Code        string            `json:"code,omitempty"`
	Description string            `json:"description,omitempty"`
	Details     string            `json:"details,omitempty"`
	Elaboration string            `json:"elaboration,omitempty"`
	Opaque      map[string]string `json:"opaque,omitemtpy"`
	Cause       *Error            `json:"cause,omitempty"`
}

func (*Error) WrapError

func (Error *Error) WrapError() error

type ErrorResponse

type ErrorResponse struct {
	Error Error `json:"error,omitempty"`
}

type LoginRequest

type LoginRequest struct {
	LoginContent map[string]string `json:"logInByAccount,omitempty"`
	Tags         `json:",inline"`
}

type LoginResponse

type LoginResponse struct {
	Inventory struct {
		UUID        string `json:"uuid,omitempty"`
		AccountUUID string `json:"accountUuid,omitempty"`
		UserUUID    string `json:"userUuid,omitempty"`
		ExpiredDate string `json:"expiredDate,omitempty"`
		CreateDate  string `json:"createDate,omitempty"`
	} `json:"inventory,omitempty"`
}

type ResourceBase

type ResourceBase struct {
	UUID       string `json:"uuid,omitempty"`
	CreateDate string `json:"createDate,omitempty"`
	LastOpDate string `json:"lastOpDate,omitempty"`
}

type Tags

type Tags struct {
	SystemTags []string `json:"systemTags,omitempty"`
	UserTags   []string `json:"userTags,omitempty"`
}

type ZStack503Error

type ZStack503Error struct {
	Error *Error `json:"error,omitempty"`
}

Jump to

Keyboard shortcuts

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