aclscopedynamodb

package
v1.6.18 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 19, 2024 License: AGPL-3.0 Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MarshalScope

func MarshalScope(scope aclcore.Scope) (map[string]types.AttributeValue, error)

func MarshalScopeId

func MarshalScopeId(id aclcore.ScopeId) map[string]types.AttributeValue

func ScopeRecordPk

func ScopeRecordPk(user usermodel.UserId, scopeType string, owner ownermodel.Owner, id string) appdynamodb.TablePk

func UnmarshalScope

func UnmarshalScope(attributes map[string]types.AttributeValue) (*aclcore.Scope, error)

Types

type GrantRepository

type GrantRepository interface {
	aclcore.ScopeReadRepository
	aclcore.ScopeWriter
	aclcore.IdentityQueriesScopeRepository

	aclcore.ScopesReader        // TODO remove: duplicates aclcore.ScopeReadRepository
	aclcore.ReverseScopesReader // TODO remove: duplicates aclcore.ScopeReadRepository
}

func Must

func Must(repository GrantRepository, err error) GrantRepository

type Repository added in v1.5.49

type Repository struct {
	// contains filtered or unexported fields
}

func New

func New(client *dynamodb.Client, tableName string) (*Repository, error)

func (*Repository) DeleteScopes added in v1.5.49

func (r *Repository) DeleteScopes(ids ...aclcore.ScopeId) error

func (*Repository) FindScopesById added in v1.5.49

func (r *Repository) FindScopesById(ids ...aclcore.ScopeId) ([]*aclcore.Scope, error)

func (*Repository) FindScopesByIdCtx added in v1.6.4

func (r *Repository) FindScopesByIdCtx(ctx context.Context, ids ...aclcore.ScopeId) ([]*aclcore.Scope, error)

func (*Repository) ListScopesByOwner added in v1.5.49

func (r *Repository) ListScopesByOwner(ctx context.Context, owner ownermodel.Owner, scopeTypes ...aclcore.ScopeType) ([]*aclcore.Scope, error)

func (*Repository) ListScopesByOwners added in v1.5.49

func (r *Repository) ListScopesByOwners(ctx context.Context, owners []ownermodel.Owner, scopeTypes ...aclcore.ScopeType) ([]*aclcore.Scope, error)

func (*Repository) ListScopesByUser added in v1.5.49

func (r *Repository) ListScopesByUser(ctx context.Context, email usermodel.UserId, scopeTypes ...aclcore.ScopeType) ([]*aclcore.Scope, error)

func (*Repository) SaveIfNewScope added in v1.5.49

func (r *Repository) SaveIfNewScope(scope aclcore.Scope) error

type ScopeRecord

type ScopeRecord struct {
	appdynamodb.TablePk
	Type          string
	GrantedAt     time.Time
	GrantedTo     string
	ResourceOwner string
	ResourceId    string
	ResourceName  string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL