Documentation ¶
Index ¶
- func NewAccessToken() string
- func NewRestrictedToken() string
- func NewServiceSecret() string
- func NewSessionToken() string
- func RandomProviderName() string
- func RandomProviderNames() []string
- func RandomProviderSessionID() string
- func RandomProviderSessionIDs() []string
- func RandomProviderType() string
- func RandomProviderTypes() []string
- func RandomRestrictedTokenID() string
- func RandomRestrictedTokenIDs() []string
- type Client
- type CreateUserProviderSessionInput
- type CreateUserProviderSessionOutput
- type CreateUserRestrictedTokenInput
- type CreateUserRestrictedTokenOutput
- type DeleteProviderSessionInput
- type DeleteRestrictedTokenInput
- type EnsureAuthorizedUserInput
- type EnsureAuthorizedUserOutput
- type ExternalAccessor
- func (e *ExternalAccessor) AssertOutputsEmpty()
- func (e *ExternalAccessor) EnsureAuthorized(ctx context.Context) error
- func (e *ExternalAccessor) EnsureAuthorizedService(ctx context.Context) error
- func (e *ExternalAccessor) EnsureAuthorizedUser(ctx context.Context, targetUserID string, authorizedPermission string) (string, error)
- func (e *ExternalAccessor) ServerSessionToken() (string, error)
- func (e *ExternalAccessor) ValidateSessionToken(ctx context.Context, token string) (request.Details, error)
- type GetProviderSessionInput
- type GetProviderSessionOutput
- type GetRestrictedTokenInput
- type GetRestrictedTokenOutput
- type ListUserProviderSessionsInput
- type ListUserProviderSessionsOutput
- type ListUserRestrictedTokensInput
- type ListUserRestrictedTokensOutput
- type ProviderSessionAccessor
- func (p *ProviderSessionAccessor) CreateUserProviderSession(ctx context.Context, userID string, create *auth.ProviderSessionCreate) (*auth.ProviderSession, error)
- func (p *ProviderSessionAccessor) DeleteProviderSession(ctx context.Context, id string) error
- func (p *ProviderSessionAccessor) Expectations()
- func (p *ProviderSessionAccessor) GetProviderSession(ctx context.Context, id string) (*auth.ProviderSession, error)
- func (p *ProviderSessionAccessor) ListUserProviderSessions(ctx context.Context, userID string, filter *auth.ProviderSessionFilter, ...) (auth.ProviderSessions, error)
- func (p *ProviderSessionAccessor) UpdateProviderSession(ctx context.Context, id string, update *auth.ProviderSessionUpdate) (*auth.ProviderSession, error)
- type RestrictedTokenAccessor
- func (r *RestrictedTokenAccessor) CreateUserRestrictedToken(ctx context.Context, userID string, create *auth.RestrictedTokenCreate) (*auth.RestrictedToken, error)
- func (r *RestrictedTokenAccessor) DeleteRestrictedToken(ctx context.Context, id string) error
- func (r *RestrictedTokenAccessor) Expectations()
- func (r *RestrictedTokenAccessor) GetRestrictedToken(ctx context.Context, id string) (*auth.RestrictedToken, error)
- func (r *RestrictedTokenAccessor) ListUserRestrictedTokens(ctx context.Context, userID string, filter *auth.RestrictedTokenFilter, ...) (auth.RestrictedTokens, error)
- func (r *RestrictedTokenAccessor) UpdateRestrictedToken(ctx context.Context, id string, update *auth.RestrictedTokenUpdate) (*auth.RestrictedToken, error)
- type ServerSessionTokenOutput
- type UpdateProviderSessionInput
- type UpdateProviderSessionOutput
- type UpdateRestrictedTokenInput
- type UpdateRestrictedTokenOutput
- type ValidateSessionTokenInput
- type ValidateSessionTokenOutput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAccessToken ¶
func NewAccessToken() string
func NewRestrictedToken ¶
func NewRestrictedToken() string
func NewServiceSecret ¶
func NewServiceSecret() string
func NewSessionToken ¶
func NewSessionToken() string
func RandomProviderName ¶ added in v1.29.0
func RandomProviderName() string
func RandomProviderNames ¶ added in v1.29.0
func RandomProviderNames() []string
func RandomProviderSessionID ¶ added in v1.29.0
func RandomProviderSessionID() string
func RandomProviderSessionIDs ¶ added in v1.29.0
func RandomProviderSessionIDs() []string
func RandomProviderType ¶ added in v1.29.0
func RandomProviderType() string
func RandomProviderTypes ¶ added in v1.29.0
func RandomProviderTypes() []string
func RandomRestrictedTokenID ¶ added in v1.29.0
func RandomRestrictedTokenID() string
func RandomRestrictedTokenIDs ¶ added in v1.29.0
func RandomRestrictedTokenIDs() []string
Types ¶
type Client ¶
type Client struct { *ProviderSessionAccessor *RestrictedTokenAccessor *ExternalAccessor }
func (*Client) AssertOutputsEmpty ¶ added in v1.29.0
func (c *Client) AssertOutputsEmpty()
type CreateUserProviderSessionInput ¶
type CreateUserProviderSessionInput struct { Context context.Context UserID string Create *auth.ProviderSessionCreate }
type CreateUserProviderSessionOutput ¶
type CreateUserProviderSessionOutput struct { ProviderSession *auth.ProviderSession Error error }
type CreateUserRestrictedTokenInput ¶
type CreateUserRestrictedTokenInput struct { Context context.Context UserID string Create *auth.RestrictedTokenCreate }
type CreateUserRestrictedTokenOutput ¶
type CreateUserRestrictedTokenOutput struct { RestrictedToken *auth.RestrictedToken Error error }
type EnsureAuthorizedUserInput ¶ added in v1.29.0
type EnsureAuthorizedUserOutput ¶ added in v1.29.0
type ExternalAccessor ¶
type ExternalAccessor struct { ServerSessionTokenInvocations int ServerSessionTokenStub func() (string, error) ServerSessionTokenOutputs []ServerSessionTokenOutput ServerSessionTokenOutput *ServerSessionTokenOutput ValidateSessionTokenInvocations int ValidateSessionTokenInputs []ValidateSessionTokenInput ValidateSessionTokenStub func(ctx context.Context, token string) (request.Details, error) ValidateSessionTokenOutputs []ValidateSessionTokenOutput ValidateSessionTokenOutput *ValidateSessionTokenOutput EnsureAuthorizedInvocations int EnsureAuthorizedInputs []context.Context EnsureAuthorizedStub func(ctx context.Context) error EnsureAuthorizedOutputs []error EnsureAuthorizedOutput *error EnsureAuthorizedServiceInvocations int EnsureAuthorizedServiceInputs []context.Context EnsureAuthorizedServiceStub func(ctx context.Context) error EnsureAuthorizedServiceOutputs []error EnsureAuthorizedServiceOutput *error EnsureAuthorizedUserInvocations int EnsureAuthorizedUserInputs []EnsureAuthorizedUserInput EnsureAuthorizedUserStub func(ctx context.Context, targetUserID string, authorizedPermission string) (string, error) EnsureAuthorizedUserOutputs []EnsureAuthorizedUserOutput EnsureAuthorizedUserOutput *EnsureAuthorizedUserOutput }
func NewExternalAccessor ¶
func NewExternalAccessor() *ExternalAccessor
func (*ExternalAccessor) AssertOutputsEmpty ¶ added in v1.29.0
func (e *ExternalAccessor) AssertOutputsEmpty()
func (*ExternalAccessor) EnsureAuthorized ¶ added in v1.29.0
func (e *ExternalAccessor) EnsureAuthorized(ctx context.Context) error
func (*ExternalAccessor) EnsureAuthorizedService ¶ added in v1.29.0
func (e *ExternalAccessor) EnsureAuthorizedService(ctx context.Context) error
func (*ExternalAccessor) EnsureAuthorizedUser ¶ added in v1.29.0
func (*ExternalAccessor) ServerSessionToken ¶
func (e *ExternalAccessor) ServerSessionToken() (string, error)
func (*ExternalAccessor) ValidateSessionToken ¶
type GetProviderSessionInput ¶
type GetProviderSessionOutput ¶
type GetProviderSessionOutput struct { ProviderSession *auth.ProviderSession Error error }
type GetRestrictedTokenInput ¶
type GetRestrictedTokenOutput ¶
type GetRestrictedTokenOutput struct { RestrictedToken *auth.RestrictedToken Error error }
type ListUserProviderSessionsInput ¶
type ListUserProviderSessionsInput struct { Context context.Context UserID string Filter *auth.ProviderSessionFilter Pagination *page.Pagination }
type ListUserProviderSessionsOutput ¶
type ListUserProviderSessionsOutput struct { ProviderSessions auth.ProviderSessions Error error }
type ListUserRestrictedTokensInput ¶
type ListUserRestrictedTokensInput struct { Context context.Context UserID string Filter *auth.RestrictedTokenFilter Pagination *page.Pagination }
type ListUserRestrictedTokensOutput ¶
type ListUserRestrictedTokensOutput struct { RestrictedTokens auth.RestrictedTokens Error error }
type ProviderSessionAccessor ¶
type ProviderSessionAccessor struct { *test.Mock ListUserProviderSessionsInvocations int ListUserProviderSessionsInputs []ListUserProviderSessionsInput ListUserProviderSessionsOutputs []ListUserProviderSessionsOutput CreateUserProviderSessionInvocations int CreateUserProviderSessionInputs []CreateUserProviderSessionInput CreateUserProviderSessionOutputs []CreateUserProviderSessionOutput GetProviderSessionInvocations int GetProviderSessionInputs []GetProviderSessionInput GetProviderSessionOutputs []GetProviderSessionOutput UpdateProviderSessionInvocations int UpdateProviderSessionInputs []UpdateProviderSessionInput UpdateProviderSessionOutputs []UpdateProviderSessionOutput DeleteProviderSessionInvocations int DeleteProviderSessionInputs []DeleteProviderSessionInput DeleteProviderSessionOutputs []error }
func NewProviderSessionAccessor ¶
func NewProviderSessionAccessor() *ProviderSessionAccessor
func (*ProviderSessionAccessor) CreateUserProviderSession ¶
func (p *ProviderSessionAccessor) CreateUserProviderSession(ctx context.Context, userID string, create *auth.ProviderSessionCreate) (*auth.ProviderSession, error)
func (*ProviderSessionAccessor) DeleteProviderSession ¶
func (p *ProviderSessionAccessor) DeleteProviderSession(ctx context.Context, id string) error
func (*ProviderSessionAccessor) Expectations ¶
func (p *ProviderSessionAccessor) Expectations()
func (*ProviderSessionAccessor) GetProviderSession ¶
func (p *ProviderSessionAccessor) GetProviderSession(ctx context.Context, id string) (*auth.ProviderSession, error)
func (*ProviderSessionAccessor) ListUserProviderSessions ¶
func (p *ProviderSessionAccessor) ListUserProviderSessions(ctx context.Context, userID string, filter *auth.ProviderSessionFilter, pagination *page.Pagination) (auth.ProviderSessions, error)
func (*ProviderSessionAccessor) UpdateProviderSession ¶
func (p *ProviderSessionAccessor) UpdateProviderSession(ctx context.Context, id string, update *auth.ProviderSessionUpdate) (*auth.ProviderSession, error)
type RestrictedTokenAccessor ¶
type RestrictedTokenAccessor struct { *test.Mock ListUserRestrictedTokensInvocations int ListUserRestrictedTokensInputs []ListUserRestrictedTokensInput ListUserRestrictedTokensOutputs []ListUserRestrictedTokensOutput CreateUserRestrictedTokenInvocations int CreateUserRestrictedTokenInputs []CreateUserRestrictedTokenInput CreateUserRestrictedTokenOutputs []CreateUserRestrictedTokenOutput GetRestrictedTokenInvocations int GetRestrictedTokenInputs []GetRestrictedTokenInput GetRestrictedTokenOutputs []GetRestrictedTokenOutput UpdateRestrictedTokenInvocations int UpdateRestrictedTokenInputs []UpdateRestrictedTokenInput UpdateRestrictedTokenOutputs []UpdateRestrictedTokenOutput DeleteRestrictedTokenInvocations int DeleteRestrictedTokenInputs []DeleteRestrictedTokenInput DeleteRestrictedTokenOutputs []error }
func NewRestrictedTokenAccessor ¶
func NewRestrictedTokenAccessor() *RestrictedTokenAccessor
func (*RestrictedTokenAccessor) CreateUserRestrictedToken ¶
func (r *RestrictedTokenAccessor) CreateUserRestrictedToken(ctx context.Context, userID string, create *auth.RestrictedTokenCreate) (*auth.RestrictedToken, error)
func (*RestrictedTokenAccessor) DeleteRestrictedToken ¶
func (r *RestrictedTokenAccessor) DeleteRestrictedToken(ctx context.Context, id string) error
func (*RestrictedTokenAccessor) Expectations ¶
func (r *RestrictedTokenAccessor) Expectations()
func (*RestrictedTokenAccessor) GetRestrictedToken ¶
func (r *RestrictedTokenAccessor) GetRestrictedToken(ctx context.Context, id string) (*auth.RestrictedToken, error)
func (*RestrictedTokenAccessor) ListUserRestrictedTokens ¶
func (r *RestrictedTokenAccessor) ListUserRestrictedTokens(ctx context.Context, userID string, filter *auth.RestrictedTokenFilter, pagination *page.Pagination) (auth.RestrictedTokens, error)
func (*RestrictedTokenAccessor) UpdateRestrictedToken ¶
func (r *RestrictedTokenAccessor) UpdateRestrictedToken(ctx context.Context, id string, update *auth.RestrictedTokenUpdate) (*auth.RestrictedToken, error)
type UpdateProviderSessionInput ¶
type UpdateProviderSessionInput struct { Context context.Context ID string Update *auth.ProviderSessionUpdate }
type UpdateProviderSessionOutput ¶
type UpdateProviderSessionOutput struct { ProviderSession *auth.ProviderSession Error error }
type UpdateRestrictedTokenInput ¶
type UpdateRestrictedTokenInput struct { Context context.Context ID string Update *auth.RestrictedTokenUpdate }
type UpdateRestrictedTokenOutput ¶
type UpdateRestrictedTokenOutput struct { RestrictedToken *auth.RestrictedToken Error error }
Click to show internal directories.
Click to hide internal directories.