Documentation ¶
Overview ¶
Package admindbout defines the output database adapters for the Admin resource.
Index ¶
- type Repository
- func (repository *Repository) Add(ctx context.Context, data admin.Admin) (*admin.Admin, error)
- func (repository *Repository) All(ctx context.Context, filters admin.AdminFilters) (*admin.AdminCollection, error)
- func (repository *Repository) Edit(ctx context.Context, data admin.Admin) (*admin.Admin, error)
- func (repository *Repository) Filter() admin.AdminFilters
- func (repository *Repository) Get(ctx context.Context, id entities.StandardID) (*admin.Admin, error)
- func (repository *Repository) Remove(ctx context.Context, id entities.StandardID) (*admin.Admin, 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 admin.AdminStorage
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 admin.AdminFilters) (*admin.AdminCollection, error)
All retrieves all Admins from the storage.
func (*Repository) Filter ¶
func (repository *Repository) Filter() admin.AdminFilters
Filter creates a new filter for the provided admin.
func (*Repository) Get ¶
func (repository *Repository) Get(ctx context.Context, id entities.StandardID) (*admin.Admin, error)
Get a Admin from storage.
func (*Repository) Remove ¶
func (repository *Repository) Remove(ctx context.Context, id entities.StandardID) (*admin.Admin, error)
Remove a Admin from the storage.
type RepositoryOptions ¶
type RepositoryOptions struct {
Infra *admindb.AdminRepositoryInfra
}
RepositoryOptions configures a Repository
Click to show internal directories.
Click to hide internal directories.