redis

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2026 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var OptimizeQueryParams = utils.OptimizeQueryParams

Functions

func ConfigDefaultAccountClient

func ConfigDefaultAccountClient(ops ...Option) (err error)

func ConfigDefaultInstanceClient

func ConfigDefaultInstanceClient(ops ...Option) (err error)

func CreateAccount

func CreateAccount(context context.Context, req *account.CreateAccountRequest, reqOpt ...config.RequestOption) (resp *account.CreateAccountResponse, rawResponse *protocol.Response, err error)

func DescribeAccount

func DescribeAccount(context context.Context, req *account.DescribeAccountRequest, reqOpt ...config.RequestOption) (resp *account.DescribeAccountResponse, rawResponse *protocol.Response, err error)

func DescribeInstances

func DescribeInstances(context context.Context, req *instance.DescribeInstancesRequest, reqOpt ...config.RequestOption) (resp *instance.DescribeInstancesResponse, rawResponse *protocol.Response, err error)

func JsonMarshal

func JsonMarshal(val interface{}) string

Types

type AccountClient

type AccountClient interface {
	CreateAccount(context context.Context, req *account.CreateAccountRequest, reqOpt ...config.RequestOption) (resp *account.CreateAccountResponse, rawResponse *protocol.Response, err error)

	DescribeAccount(context context.Context, req *account.DescribeAccountRequest, reqOpt ...config.RequestOption) (resp *account.DescribeAccountResponse, rawResponse *protocol.Response, err error)
}

func NewAccountClient

func NewAccountClient(hostUrl string, ops ...Option) (AccountClient, error)

type ClientSet

type ClientSet interface {
	Account() AccountClient
	Instance() InstanceClient
}

func NewClientSet

func NewClientSet(baseDomain string, options ...Option) (ClientSet, error)

type HttpClient

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

HttpClient underlying client

func NewHttpClient

func NewHttpClient(opts *Options) (*HttpClient, error)

func (*HttpClient) Execute

func (c *HttpClient) Execute(req *request) (*response, error)

func (*HttpClient) R

func (c *HttpClient) R() *request

R get request

func (*HttpClient) Use

func (c *HttpClient) Use(mws ...cli.Middleware) error

type InstanceClient

type InstanceClient interface {
	DescribeInstances(context context.Context, req *instance.DescribeInstancesRequest, reqOpt ...config.RequestOption) (resp *instance.DescribeInstancesResponse, rawResponse *protocol.Response, err error)

	DescribeInstanceOverview(context context.Context, req *instance.DescribeInstanceOverviewRequest, reqOpt ...config.RequestOption) (resp *instance.DescribeInstanceOverviewResponse, rawResponse *protocol.Response, err error)
}

func NewInstanceClient

func NewInstanceClient(hostUrl string, ops ...Option) (InstanceClient, error)

type Option

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

Option Configuration of client

func WithClient

func WithClient(client client.Doer) Option

WithClient is used to register a custom crafter client

func WithClientConfig

func WithClientConfig(cfg *apiCfg.OpenapiConfig) Option

WithClientConfig is used to pass openapi configuration for the client

func WithClientMiddleware

func WithClientMiddleware(mws ...cli.Middleware) Option

WithClientMiddleware is used to register the middleware for the crafter client

func WithClientOption

func WithClientOption(opt ...config.ClientOption) Option

WithClientOption is used to pass configuration for the crafter client

func WithHeader

func WithHeader(header http.Header) Option

WithHeader is used to add the default header, which is carried by every request

func WithHostUrl

func WithHostUrl(HostUrl string) Option

func WithResponseResultDecider

func WithResponseResultDecider(decider ResponseResultDecider) Option

WithResponseResultDecider configure custom deserialization of http response to response struct

type Options

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

func GetOptions

func GetOptions(ops ...Option) *Options

type ResponseResultDecider

type ResponseResultDecider func(*response) error

ResponseResultDecider Definition of global data and types.

Directories

Path Synopsis
types

Jump to

Keyboard shortcuts

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