Documentation
¶
Index ¶
- Constants
- func Delete[S any](ctx context.Context, client FusionComputeClient, uri string, success *S) error
- func DeleteWithError[S any, E fcErr.Error](ctx context.Context, client FusionComputeClient, uri string, success *S, ...) error
- func Do[S any](req *resty.Request, method, uri string, success *S) error
- func DoWithError[S any, E fcErr.Error](req *resty.Request, method, uri string, success *S, failed E) error
- func Get[S any](ctx context.Context, client FusionComputeClient, uri string, success *S) error
- func GetWithError[S any, E fcErr.Error](ctx context.Context, client FusionComputeClient, uri string, success *S, ...) error
- func Post[S any](ctx context.Context, client FusionComputeClient, uri string, body interface{}, ...) error
- func PostWithError[S any, E fcErr.Error](ctx context.Context, client FusionComputeClient, uri string, body interface{}, ...) error
- type Auth
- type Config
- type FusionComputeClient
- type LoginResponse
- type RestyConstructor
- type Session
Constants ¶
View Source
const ( XAuthUser = "X-Auth-User" XAuthKey = "X-Auth-Key" XAuthUserType = "X-Auth-UserType" XAuthToken = "X-Auth-Token" )
Variables ¶
This section is empty.
Functions ¶
func DeleteWithError ¶
func DoWithError ¶
func GetWithError ¶
func PostWithError ¶
Types ¶
type Config ¶
type Config struct {
RestyConstructor RestyConstructor
}
type FusionComputeClient ¶
type FusionComputeClient interface { Connect(context.Context) error DisConnect(context.Context) error SetSession(token string) GetSession() Session GetHost() string GetUser() string GetPassword() string GetHTTPClient() *resty.Client GetApiClient() (*resty.Client, error) }
func NewFusionComputeClient ¶
func NewFusionComputeClient(host string, user string, password string, cfg ...*Config) FusionComputeClient
type LoginResponse ¶
type RestyConstructor ¶
type RestyConstructor func() *resty.Client
Click to show internal directories.
Click to hide internal directories.