Documentation ¶
Index ¶
- type AdminCreateDB
- type AdminDB
- type AdminDBFilter
- type AdminExistsDB
- type AdminRepositoryInfra
- func (repository *AdminRepositoryInfra) Add(ctx context.Context, db AdminCreateDB) (*AdminDB, error)
- func (repository *AdminRepositoryInfra) Edit(ctx context.Context, db AdminUpdateDB) (*persistence.ExecuteStmtWithStorageResultOutput, error)
- func (repository *AdminRepositoryInfra) Exists(ctx context.Context, id entities.StandardID) ([]AdminExistsDB, error)
- func (repository *AdminRepositoryInfra) Get(ctx context.Context, input entities.StandardID) ([]AdminDB, error)
- func (repository *AdminRepositoryInfra) List(ctx context.Context, filters AdminDBFilter) ([]AdminDB, error)
- func (repository *AdminRepositoryInfra) Remove(ctx context.Context, input entities.StandardID) (*persistence.ExecuteStmtWithStorageResultOutput, error)
- type AdminRepositoryInfraOptions
- type AdminUpdateDB
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdminCreateDB ¶
type AdminCreateDB struct { // AdminDB is the data struct of the resource in the database AdminDB }
AdminCreateDB is the data struct of the creation of a resource in the database
type AdminDB ¶
type AdminDB struct { // StandardID is the ID of the resource entities.StandardID // InternalResourceID is the ID used to reference a resource internally in the application InternalResourceID string `storage:"internal_resource_id"` // Roles are the roles in the RBAC system for the Admin Roles string `storage:"roles"` // Description of the resource Description string `storage:"description"` // CreationDate is the timestamp of the moment of the creation of the resource CreationDate int64 `storage:"creation_date"` // LastUpdate is the timestamp of the moment of the last edition of the resource LastUpdate int64 `storage:"last_update"` // ResourceVersion is the identifier of the current version of the resource ResourceVersion string `storage:"resource_version"` }
AdminDB is the data struct of the resource in the database
type AdminDBFilter ¶
type AdminDBFilter struct { // AdminDB is the data struct of the resource in the database AdminDB // Order is the order of the list based on an attribute Order *persistence.Order `valid:"optional"` // FilterGroup is a collection of filters FilterGroup *persistence.FilterGroup `valid:"optional"` // Pagination is the page info of the list Pagination *persistence.Pagination `valid:"optional"` }
AdminDBFilter to filter lists of resources from the database
func (*AdminDBFilter) AppendFilter ¶
func (filter *AdminDBFilter) AppendFilter(theFilter persistence.Filter)
AppendFilter Append filter.
func (*AdminDBFilter) Paged ¶
func (filter *AdminDBFilter) Paged(limit, offset int) *AdminDBFilter
Paged creates a pagination filter.
func (*AdminDBFilter) Sort ¶
func (filter *AdminDBFilter) Sort(orderBy string, orderDirection persistence.OrderDirection) *AdminDBFilter
Sort creates a sorting filter.
type AdminExistsDB ¶
type AdminExistsDB struct { // Exists is true if the resource exists Exists bool `storage:"exists_result" valid:"required"` }
AdminExistsDB is the data struct to check if a resource exists in the database
type AdminRepositoryInfra ¶
type AdminRepositoryInfra struct {
// contains filtered or unexported fields
}
func ProvideAdminRepositoryInfra ¶
func ProvideAdminRepositoryInfra(options AdminRepositoryInfraOptions) *AdminRepositoryInfra
func (*AdminRepositoryInfra) Add ¶
func (repository *AdminRepositoryInfra) Add(ctx context.Context, db AdminCreateDB) (*AdminDB, error)
func (*AdminRepositoryInfra) Edit ¶
func (repository *AdminRepositoryInfra) Edit(ctx context.Context, db AdminUpdateDB) (*persistence.ExecuteStmtWithStorageResultOutput, error)
func (*AdminRepositoryInfra) Exists ¶
func (repository *AdminRepositoryInfra) Exists(ctx context.Context, id entities.StandardID) ([]AdminExistsDB, error)
func (*AdminRepositoryInfra) Get ¶
func (repository *AdminRepositoryInfra) Get(ctx context.Context, input entities.StandardID) ([]AdminDB, error)
func (*AdminRepositoryInfra) List ¶
func (repository *AdminRepositoryInfra) List(ctx context.Context, filters AdminDBFilter) ([]AdminDB, error)
func (*AdminRepositoryInfra) Remove ¶
func (repository *AdminRepositoryInfra) Remove(ctx context.Context, input entities.StandardID) (*persistence.ExecuteStmtWithStorageResultOutput, error)
type AdminRepositoryInfraOptions ¶
type AdminRepositoryInfraOptions struct {
GenericStorage persistence.Storage
}
type AdminUpdateDB ¶
type AdminUpdateDB struct { // AdminDB is the data struct of the resource in the database AdminDB // NewResourceVersion is the new resource version after the edition NewResourceVersion string `storage:"new_resource_version"` }
AdminUpdateDB is the data struct of the update of a resource in the database
Click to show internal directories.
Click to hide internal directories.