Documentation
¶
Index ¶
- type AuthSignature
- type AuthSignatureBase
- type AuthSignatureBaseConfig
- type AuthSms
- type AutoReconnectHandlers
- type Client
- type ClientOperation
- type EmbeddedClientHandlers
- func (e *EmbeddedClientHandlers) Config() interface{}
- func (e *EmbeddedClientHandlers) GetCredentials(ctx op_context.Context) (login string, password string, err error)
- func (e *EmbeddedClientHandlers) GetRefreshToken() string
- func (e *EmbeddedClientHandlers) InitDirect(ctx op_context.Context, login string, password string, tokenCacheKey string) error
- func (e *EmbeddedClientHandlers) InitFromConfig(configPath ...string) error
- func (e *EmbeddedClientHandlers) SaveRefreshToken(ctx op_context.Context, token string)
- type EmbeddedClientHandlersConfig
- type Handler
- type HandlerInTenancy
- type HandlerInTenancyCmd
- type HandlerInTenancyNil
- type HandlerInTenancyResult
- type HandlerNil
- type HandlerRequest
- type HandlerResult
- type InteractiveClientHandlers
- func (e *InteractiveClientHandlers) Config() interface{}
- func (e *InteractiveClientHandlers) GetCredentials(ctx op_context.Context) (string, string, error)
- func (e *InteractiveClientHandlers) GetRefreshToken() string
- func (e *InteractiveClientHandlers) Init(configPath ...string) error
- func (e *InteractiveClientHandlers) SaveRefreshToken(ctx op_context.Context, token string)
- type InteractiveClientHandlersConfig
- type OperationResponse
- type ServiceClient
- type TenancyClientOperation
- type TokenKeeper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthSignature ¶
type AuthSignature struct {
Signer crypt_utils.ESigner
EndpoindsConfig auth.EndpointsAuthConfig
}
func (*AuthSignature) HandleResponse ¶
func (a *AuthSignature) HandleResponse(resp OperationResponse)
func (*AuthSignature) MakeHeaders ¶
func (a *AuthSignature) MakeHeaders(ctx op_context.Context, operation api.Operation, cmd interface{}) (map[string]string, error)
type AuthSignatureBase ¶
type AuthSignatureBase struct {
AuthSignatureBaseConfig
AuthSignature
// contains filtered or unexported fields
}
func NewAuthSignature ¶
func NewAuthSignature() *AuthSignatureBase
func (*AuthSignatureBase) Config ¶
func (a *AuthSignatureBase) Config() interface{}
func (*AuthSignatureBase) Construct ¶
func (c *AuthSignatureBase) Construct()
type AuthSignatureBaseConfig ¶
type AuthSms ¶
type AuthSms struct {
// contains filtered or unexported fields
}
func NewAuthSms ¶
func NewAuthSms() *AuthSms
func (*AuthSms) HandleResponse ¶
func (a *AuthSms) HandleResponse(resp OperationResponse)
func (*AuthSms) MakeHeaders ¶
type AutoReconnectHandlers ¶
type AutoReconnectHandlers interface {
GetRefreshToken() string
SaveRefreshToken(ctx op_context.Context, token string)
GetCredentials(ctx op_context.Context) (login string, password string, err error)
}
type Client ¶
type Client interface {
Exec(ctx op_context.Context, operation api.Operation, cmd interface{}, response interface{}, tenancy ...multitenancy.TenancyPath) error
Transport() interface{}
SetPropagateAuthUser(val bool)
SetPropagateContextId(val bool)
}
type ClientOperation ¶
type EmbeddedClientHandlers ¶
type EmbeddedClientHandlers struct {
app_context.WithAppBase
EmbeddedClientHandlersConfig
}
func NewEmbeddedClientHandlers ¶
func NewEmbeddedClientHandlers(app app_context.Context) *EmbeddedClientHandlers
func (*EmbeddedClientHandlers) Config ¶
func (e *EmbeddedClientHandlers) Config() interface{}
func (*EmbeddedClientHandlers) GetCredentials ¶
func (e *EmbeddedClientHandlers) GetCredentials(ctx op_context.Context) (login string, password string, err error)
func (*EmbeddedClientHandlers) GetRefreshToken ¶
func (e *EmbeddedClientHandlers) GetRefreshToken() string
func (*EmbeddedClientHandlers) InitDirect ¶
func (e *EmbeddedClientHandlers) InitDirect(ctx op_context.Context, login string, password string, tokenCacheKey string) error
func (*EmbeddedClientHandlers) InitFromConfig ¶
func (e *EmbeddedClientHandlers) InitFromConfig(configPath ...string) error
func (*EmbeddedClientHandlers) SaveRefreshToken ¶
func (e *EmbeddedClientHandlers) SaveRefreshToken(ctx op_context.Context, token string)
type Handler ¶
func NewHandler ¶
type HandlerInTenancy ¶
func NewHandlerInTenancy ¶
func NewHandlerInTenancy[Cmd any, Result any](cmd *Cmd, result *Result) *HandlerInTenancy[Cmd, Result]
func (*HandlerInTenancy[Cmd, Result]) Exec ¶
func (h *HandlerInTenancy[Cmd, Result]) Exec(client Client, ctx multitenancy.TenancyContext, operation api.Operation) error
type HandlerInTenancyCmd ¶
type HandlerInTenancyCmd[Cmd any] struct { Cmd *Cmd }
func NewHandlerInTenancyCmd ¶
func NewHandlerInTenancyCmd[Cmd any](cmd *Cmd) *HandlerInTenancyCmd[Cmd]
func (*HandlerInTenancyCmd[Cmd]) Exec ¶
func (h *HandlerInTenancyCmd[Cmd]) Exec(client Client, ctx multitenancy.TenancyContext, operation api.Operation) error
type HandlerInTenancyNil ¶
type HandlerInTenancyNil struct {
}
func NewHandlerInTenancyNil ¶
func NewHandlerInTenancyNil() *HandlerInTenancyNil
func (*HandlerInTenancyNil) Exec ¶
func (h *HandlerInTenancyNil) Exec(client Client, ctx multitenancy.TenancyContext, operation api.Operation) error
type HandlerInTenancyResult ¶
type HandlerInTenancyResult[Result any] struct { Result *Result }
func NewHandlerInTenancyResult ¶
func NewHandlerInTenancyResult[Result any](result *Result) *HandlerInTenancyResult[Result]
func (*HandlerInTenancyResult[Result]) Exec ¶
func (h *HandlerInTenancyResult[Result]) Exec(client Client, ctx multitenancy.TenancyContext, operation api.Operation) error
type HandlerNil ¶
type HandlerNil struct {
}
func NewHandlerNil ¶
func NewHandlerNil() *HandlerNil
func (*HandlerNil) Exec ¶
func (h *HandlerNil) Exec(client Client, ctx op_context.Context, operation api.Operation) error
type HandlerRequest ¶
type HandlerRequest[Request any] struct { Request *Request }
func NewHandlerRequest ¶
func NewHandlerRequest[Request any](request *Request) *HandlerRequest[Request]
func (*HandlerRequest[Request]) Exec ¶
func (h *HandlerRequest[Request]) Exec(client Client, ctx op_context.Context, operation api.Operation) error
type HandlerResult ¶
type HandlerResult[Result any] struct { Result *Result }
func NewHandlerResult ¶
func NewHandlerResult[Result any](result *Result) *HandlerResult[Result]
func (*HandlerResult[Result]) Exec ¶
func (h *HandlerResult[Result]) Exec(client Client, ctx op_context.Context, operation api.Operation) error
type InteractiveClientHandlers ¶
type InteractiveClientHandlers struct {
app_context.WithAppBase
InteractiveClientHandlersConfig
}
func NewInteractiveClientHandlers ¶
func NewInteractiveClientHandlers(app app_context.Context) *InteractiveClientHandlers
func (*InteractiveClientHandlers) Config ¶
func (e *InteractiveClientHandlers) Config() interface{}
func (*InteractiveClientHandlers) GetCredentials ¶
func (e *InteractiveClientHandlers) GetCredentials(ctx op_context.Context) (string, string, error)
func (*InteractiveClientHandlers) GetRefreshToken ¶
func (e *InteractiveClientHandlers) GetRefreshToken() string
func (*InteractiveClientHandlers) Init ¶
func (e *InteractiveClientHandlers) Init(configPath ...string) error
func (*InteractiveClientHandlers) SaveRefreshToken ¶
func (e *InteractiveClientHandlers) SaveRefreshToken(ctx op_context.Context, token string)
type InteractiveClientHandlersConfig ¶
type InteractiveClientHandlersConfig struct {
TOKEN_FILE_NAME string `validate:"required,file"`
}
type OperationResponse ¶
type OperationResponse interface {
SetHeader(key string, value string)
GetHeader(key string) string
Code() int
Error() generic_error.Error
SetError(err generic_error.Error)
}
type ServiceClient ¶
type ServiceClient struct {
generic_error.ErrorsExtenderStub
api.ResourceBase
// contains filtered or unexported fields
}
func (*ServiceClient) ApiClient ¶
func (s *ServiceClient) ApiClient() Client
func (*ServiceClient) Client ¶
func (s *ServiceClient) Client() Client
func (*ServiceClient) Init ¶
func (s *ServiceClient) Init(client Client, serviceName string)
type TenancyClientOperation ¶
type TenancyClientOperation interface {
Exec(client Client, ctx multitenancy.TenancyContext, operation api.Operation) error
}
type TokenKeeper ¶
type TokenKeeper struct {
Token string `json:"token"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.