README ¶ cloudplatform The Cloud Platform Private SDK Expand ▾ Collapse ▴ Documentation ¶ Index ¶ func AddCtx(ctx ...*Context) type Context func GetCtxByID(id uint) *Context func GetCtxByUrl(baseUrl string) *Context type Request type Response func Execute[R Request, RR any](ctx *Context, request R) (resp Response[RR], err error) Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func AddCtx ¶ func AddCtx(ctx ...*Context) Types ¶ type Context ¶ type Context struct { ID uint BaseUrl string Uid int Username string Password string // contains filtered or unexported fields } func GetCtxByID ¶ func GetCtxByID(id uint) *Context func GetCtxByUrl ¶ func GetCtxByUrl(baseUrl string) *Context type Request ¶ type Request interface { Url() string Method() string Header() http.Header Values() (values url.Values) Form() (form url.Values) Body() any } type Response ¶ type Response[T any] struct { StatusCode int `json:"-"` Error string `json:"error"` Result T `json:"-"` } func Execute ¶ func Execute[R Request, RR any](ctx *Context, request R) (resp Response[RR], err error) Execute 接口请求入口 Source Files ¶ View all Source files interface.go Directories ¶ Show internal Expand all Path Synopsis cloudops clouds disks floatip image ip ipsegment natacl natweb nodes sg sgrules snapshots tasks vpcnetworks Click to show internal directories. Click to hide internal directories.