Documentation
¶
Index ¶
- Variables
- func CheckDelegateExist(context context.Context, req *delegate.CheckDelegateExistRequest, ...) (resp *delegate.CheckDelegateExistResponse, rawResponse *protocol.Response, ...)
- func ConfigDefaultDelegateClient(ops ...Option) (err error)
- func CreateAutomateDelegateRole(context context.Context, req *delegate.CreateAutomateDelegateRoleRequest, ...) (resp *delegate.CreateAutomateDelegateRoleResponse, ...)
- func JsonMarshal(val interface{}) string
- func QueryDelegateList(context context.Context, req *delegate.QueryDelegateListRequest, ...) (resp *delegate.QueryDelegateListResponse, rawResponse *protocol.Response, ...)
- func SetEpGroup(context context.Context, req *delegate.SetEpGroupRequest, ...) (resp *delegate.SetEpGroupResponse, rawResponse *protocol.Response, err error)
- func SwitchDelegate(context context.Context, req *delegate.SwitchDelegateRequest, ...) (resp *delegate.SwitchDelegateResponse, rawResponse *protocol.Response, ...)
- type ClientSet
- type DelegateClient
- type HttpClient
- type Option
- func WithClient(client client.Doer) Option
- func WithClientConfig(cfg *apiCfg.OpenapiConfig) Option
- func WithClientMiddleware(mws ...cli.Middleware) Option
- func WithClientOption(opt ...config.ClientOption) Option
- func WithHeader(header http.Header) Option
- func WithHostUrl(HostUrl string) Option
- func WithResponseResultDecider(decider ResponseResultDecider) Option
- type Options
- type ResponseResultDecider
Constants ¶
This section is empty.
Variables ¶
View Source
var OptimizeQueryParams = utils.OptimizeQueryParams
Functions ¶
func CheckDelegateExist ¶
func CheckDelegateExist(context context.Context, req *delegate.CheckDelegateExistRequest, reqOpt ...config.RequestOption) (resp *delegate.CheckDelegateExistResponse, rawResponse *protocol.Response, err error)
func CreateAutomateDelegateRole ¶
func CreateAutomateDelegateRole(context context.Context, req *delegate.CreateAutomateDelegateRoleRequest, reqOpt ...config.RequestOption) (resp *delegate.CreateAutomateDelegateRoleResponse, rawResponse *protocol.Response, err error)
func JsonMarshal ¶ added in v1.0.0
func JsonMarshal(val interface{}) string
func QueryDelegateList ¶
func QueryDelegateList(context context.Context, req *delegate.QueryDelegateListRequest, reqOpt ...config.RequestOption) (resp *delegate.QueryDelegateListResponse, rawResponse *protocol.Response, err error)
func SetEpGroup ¶ added in v1.0.0
func SetEpGroup(context context.Context, req *delegate.SetEpGroupRequest, reqOpt ...config.RequestOption) (resp *delegate.SetEpGroupResponse, rawResponse *protocol.Response, err error)
func SwitchDelegate ¶
func SwitchDelegate(context context.Context, req *delegate.SwitchDelegateRequest, reqOpt ...config.RequestOption) (resp *delegate.SwitchDelegateResponse, rawResponse *protocol.Response, err error)
Types ¶
type ClientSet ¶
type ClientSet interface {
Delegate() DelegateClient
}
type DelegateClient ¶
type DelegateClient interface {
CreateAutomateDelegateRole(context context.Context, req *delegate.CreateAutomateDelegateRoleRequest, reqOpt ...config.RequestOption) (resp *delegate.CreateAutomateDelegateRoleResponse, rawResponse *protocol.Response, err error)
SwitchDelegate(context context.Context, req *delegate.SwitchDelegateRequest, reqOpt ...config.RequestOption) (resp *delegate.SwitchDelegateResponse, rawResponse *protocol.Response, err error)
CheckDelegateExist(context context.Context, req *delegate.CheckDelegateExistRequest, reqOpt ...config.RequestOption) (resp *delegate.CheckDelegateExistResponse, rawResponse *protocol.Response, err error)
QueryDelegateList(context context.Context, req *delegate.QueryDelegateListRequest, reqOpt ...config.RequestOption) (resp *delegate.QueryDelegateListResponse, rawResponse *protocol.Response, err error)
SetEpGroup(context context.Context, req *delegate.SetEpGroupRequest, reqOpt ...config.RequestOption) (resp *delegate.SetEpGroupResponse, rawResponse *protocol.Response, err error)
}
func NewDelegateClient ¶
func NewDelegateClient(hostUrl string, ops ...Option) (DelegateClient, 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) Use ¶
func (c *HttpClient) Use(mws ...cli.Middleware) error
type Option ¶
type Option struct {
// contains filtered or unexported fields
}
Option Configuration of client
func WithClient ¶
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 ¶
WithHeader is used to add the default header, which is carried by every request
func WithHostUrl ¶
func WithResponseResultDecider ¶
func WithResponseResultDecider(decider ResponseResultDecider) Option
WithResponseResultDecider configure custom deserialization of http response to response struct
type ResponseResultDecider ¶
type ResponseResultDecider func(*response) error
ResponseResultDecider Definition of global data and types.
Click to show internal directories.
Click to hide internal directories.