Documentation ¶
Overview ¶
Package applicationdbout defines the output database adapters for the Application resource.
Index ¶
- type Repository
- func (repository *Repository) Add(ctx context.Context, data application.Application) (*application.Application, error)
- func (repository *Repository) All(ctx context.Context, filters application.ApplicationFilters) (*application.ApplicationCollection, error)
- func (repository *Repository) Edit(ctx context.Context, data application.Application) (*application.Application, error)
- func (repository *Repository) Exists(ctx context.Context, id entities.StandardID) error
- func (repository *Repository) Filter() application.ApplicationFilters
- func (repository *Repository) Get(ctx context.Context, id entities.StandardID) (*application.Application, error)
- func (repository *Repository) Remove(ctx context.Context, id entities.StandardID) (*application.Application, 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 application.ApplicationStorage
func NewRepository ¶
func NewRepository(options RepositoryOptions) (*Repository, error)
NewRepository creates a Repository with the given options
func (*Repository) Add ¶
func (repository *Repository) Add(ctx context.Context, data application.Application) (*application.Application, error)
Add an Application to the database
func (*Repository) All ¶
func (repository *Repository) All(ctx context.Context, filters application.ApplicationFilters) (*application.ApplicationCollection, error)
All Application from storage according to the provided filters
func (*Repository) Edit ¶
func (repository *Repository) Edit(ctx context.Context, data application.Application) (*application.Application, error)
Edit an Application in storage
func (*Repository) Exists ¶
func (repository *Repository) Exists(ctx context.Context, id entities.StandardID) error
Exists returns whether the specified Application exists in storage. It returns an error if the operation fails.
func (*Repository) Filter ¶
func (repository *Repository) Filter() application.ApplicationFilters
func (*Repository) Get ¶
func (repository *Repository) Get(ctx context.Context, id entities.StandardID) (*application.Application, error)
Get an Application from storages
func (*Repository) Remove ¶
func (repository *Repository) Remove(ctx context.Context, id entities.StandardID) (*application.Application, error)
Remove removes an Application from storage
type RepositoryOptions ¶
type RepositoryOptions struct {
Infra *applicationdb.ApplicationRepositoryInfra
}
RepositoryOptions configures a Repository
Click to show internal directories.
Click to hide internal directories.