Documentation
¶
Index ¶
- Variables
- type CachedToken
- type ClientFactoryBuilder
- type CommonCtx
- func (ctx *CommonCtx) AccessToken() string
- func (ctx *CommonCtx) AuthorizerAPIKey() string
- func (ctx *CommonCtx) AuthorizerClient() (*authorizer.Client, error)
- func (ctx *CommonCtx) DecisionLogsClient() (dl.DecisionLogsClient, error)
- func (ctx *CommonCtx) DecisionLogsKey() string
- func (ctx *CommonCtx) Environment() string
- func (ctx *CommonCtx) Logf(format string, v ...interface{})
- func (ctx *CommonCtx) TenantClient() (*tenant.Client, error)
- func (ctx *CommonCtx) TenantID() string
- func (ctx *CommonCtx) Token() *api.Token
Constants ¶
This section is empty.
Variables ¶
View Source
var ( NeedLoginErr = errors.Errorf("user is not logged in, please login using '%s login'", x.AppName) TokenExpiredErr = errors.Errorf("the access token has expired, please login using '%s login'", x.AppName) NeedTenantIDErr = errors.Errorf("operation requires tenant-id, please login using '%s login' or use --tenant to specify an id.", x.AppName) )
Functions ¶
This section is empty.
Types ¶
type CachedToken ¶ added in v0.8.0
type CachedToken struct {
// contains filtered or unexported fields
}
func NewCachedToken ¶ added in v0.8.0
func NewCachedToken(env string) CachedToken
func (CachedToken) Get ¶ added in v0.8.0
func (t CachedToken) Get() *api.Token
func (CachedToken) TenantID ¶ added in v0.8.0
func (t CachedToken) TenantID() string
func (CachedToken) Verify ¶ added in v0.8.0
func (t CachedToken) Verify() error
type ClientFactoryBuilder ¶ added in v0.8.0
type ClientFactoryBuilder struct {
// contains filtered or unexported fields
}
func NewClientFactoryBuilder ¶ added in v0.8.0
func NewClientFactoryBuilder() *ClientFactoryBuilder
func (*ClientFactoryBuilder) ClientFactory ¶ added in v0.8.0
func (b *ClientFactoryBuilder) ClientFactory(env *x.Services, tenantID string, token CachedToken) (*client.AsertoFactory, error)
func (*ClientFactoryBuilder) Override ¶ added in v0.8.0
func (b *ClientFactoryBuilder) Override(svc x.Service, overrides client.Overrides)
func (*ClientFactoryBuilder) RequireToken ¶ added in v0.8.0
func (b *ClientFactoryBuilder) RequireToken()
type CommonCtx ¶
type CommonCtx struct {
Context context.Context
OutWriter io.Writer
ErrWriter io.Writer
Services *x.Services
// contains filtered or unexported fields
}
func NewCommonCtx ¶ added in v0.8.0
func (*CommonCtx) AccessToken ¶
func (*CommonCtx) AuthorizerAPIKey ¶
func (*CommonCtx) AuthorizerClient ¶ added in v0.8.0
func (ctx *CommonCtx) AuthorizerClient() (*authorizer.Client, error)
func (*CommonCtx) DecisionLogsClient ¶ added in v0.8.0
func (ctx *CommonCtx) DecisionLogsClient() (dl.DecisionLogsClient, error)
func (*CommonCtx) DecisionLogsKey ¶ added in v0.8.0
func (*CommonCtx) Environment ¶
func (*CommonCtx) TenantClient ¶ added in v0.8.0
Click to show internal directories.
Click to hide internal directories.