Documentation ¶
Overview ¶
Package userdbout defines the output database adapters for the User resource.
Index ¶
- type Repository
- func (repository *Repository) Add(ctx context.Context, data user.User) (*user.User, error)
- func (repository *Repository) All(ctx context.Context, filters user.UserFilters) (*user.UserCollection, error)
- func (repository *Repository) Edit(ctx context.Context, data user.User) (*user.User, error)
- func (repository *Repository) Filter(applicationID string) user.UserFilters
- func (repository *Repository) Get(ctx context.Context, id entities.ApplicationStandardID) (*user.User, error)
- func (repository *Repository) Remove(ctx context.Context, id entities.ApplicationStandardID) (*user.User, error)
- type RepositoryOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
Repository implementation of user.UserStorage
func NewRepository ¶
func NewRepository(options RepositoryOptions) (*Repository, error)
NewRepository creates a Repository with the given options
func (*Repository) All ¶
func (repository *Repository) All(ctx context.Context, filters user.UserFilters) (*user.UserCollection, error)
All retrieves all Users from the storage.
func (*Repository) Filter ¶
func (repository *Repository) Filter(applicationID string) user.UserFilters
Filter creates a new filter for the provided application.
func (*Repository) Get ¶
func (repository *Repository) Get(ctx context.Context, id entities.ApplicationStandardID) (*user.User, error)
Get a User from storage.
func (*Repository) Remove ¶
func (repository *Repository) Remove(ctx context.Context, id entities.ApplicationStandardID) (*user.User, error)
Remove a User from the storage.
type RepositoryOptions ¶
type RepositoryOptions struct {
Infra *userdb.UserRepositoryInfra
}
RepositoryOptions configures a Repository
Click to show internal directories.
Click to hide internal directories.