Documentation ¶
Index ¶
- func ClientWithDatabaseRead(db db.Manager) common.Option[clientManager]
- func ClientWithExecuteMigration(enabled bool, dir ...string) common.Option[clientManager]
- func ClientWithLazyLoadData(v bool) common.Option[clientManager]
- func ClientWithLogger(v logger.Manager) common.Option[clientManager]
- type Client
- type ClientManager
- type ClientScope
- type ClientScopes
- type ClientWithScopes
- type Clients
- type ClientsWithScopes
- type OAuthManager
- type OAuthPermission
- type OAuthPermissions
- type Scope
- type Scopes
- func (s Scopes) AllowedTo(scope Scope) bool
- func (s Scopes) AllowedToRead() bool
- func (s Scopes) AllowedToWrite() bool
- func (s Scopes) FromStringArray(values []string) Scopes
- func (s Scopes) IsAllowedByHttpMethod(method string) bool
- func (s *Scopes) Scan(src interface{}) error
- func (s Scopes) ToStringArray() []string
- func (s Scopes) Value() (driver.Value, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClientWithDatabaseRead ¶ added in v0.3.0
func ClientWithExecuteMigration ¶ added in v0.3.0
func ClientWithLazyLoadData ¶ added in v0.3.0
Types ¶
type ClientManager ¶ added in v0.3.0
type ClientManager interface { AddClients(ctx context.Context, items Clients) error AddScopes(ctx context.Context, items ClientScopes) error AddClientsWithScopes(ctx context.Context, items ClientWithScopes) error GetClientsWithScopesBy(ctx context.Context, by db.IHelper) (ClientsWithScopes, error) VoidClientsByIds(ctx context.Context, ids ...int) error VoidScopeByIds(ctx context.Context, id ...int) error IsAllowed(secret, resource, scope string) (clientName string, allowed bool) Init() error MustInit() ClientManager AddOptions(opts ...common.Option[clientManager]) ClientManager // contains filtered or unexported methods }
func NewClientManager ¶ added in v0.3.0
func NewClientManager(db db.Manager, opts ...common.Option[clientManager]) ClientManager
type ClientScope ¶ added in v0.3.0
type ClientScopes ¶ added in v0.3.0
type ClientScopes []*ClientScope
type ClientWithScopes ¶ added in v0.3.0
type ClientWithScopes struct { *Client Scopes ClientScopes }
type ClientsWithScopes ¶ added in v0.3.0
type ClientsWithScopes []*ClientWithScopes
type OAuthManager ¶ added in v0.3.0
type OAuthManager interface {
GetPermissions(ctx context.Context, token, realm string) (OAuthPermissions, error)
}
func NewOAuthManager ¶ added in v0.3.0
func NewOAuthManager(opts ...common.Option[oauthManager]) OAuthManager
type OAuthPermission ¶ added in v0.3.0
type OAuthPermissions ¶ added in v0.3.0
type OAuthPermissions []*OAuthPermission
type Scope ¶ added in v0.3.0
type Scope string
func (Scope) FromHttpMethod ¶ added in v0.3.2
type Scopes ¶ added in v0.3.0
type Scopes []Scope
func (Scopes) AllowedToRead ¶ added in v0.3.0
func (Scopes) AllowedToWrite ¶ added in v0.3.0
func (Scopes) FromStringArray ¶ added in v0.3.0
func (Scopes) IsAllowedByHttpMethod ¶ added in v0.3.0
func (Scopes) ToStringArray ¶ added in v0.3.0
Click to show internal directories.
Click to hide internal directories.