Documentation ¶
Index ¶
- type ApplicationCreateDB
- type ApplicationDB
- type ApplicationDBFilter
- type ApplicationExistsDB
- type ApplicationRepositoryInfra
- func (repository *ApplicationRepositoryInfra) Add(ctx context.Context, db ApplicationCreateDB) (*ApplicationDB, error)
- func (repository *ApplicationRepositoryInfra) All(ctx context.Context, filters ApplicationDBFilter) ([]ApplicationDB, error)
- func (repository *ApplicationRepositoryInfra) Edit(ctx context.Context, db ApplicationUpdateDB) (*persistence.ExecuteStmtWithStorageResultOutput, error)
- func (repository *ApplicationRepositoryInfra) Exists(ctx context.Context, id entities.StandardID) ([]ApplicationExistsDB, error)
- func (repository *ApplicationRepositoryInfra) Get(ctx context.Context, id entities.StandardID) ([]ApplicationDB, error)
- func (repository *ApplicationRepositoryInfra) Remove(ctx context.Context, id entities.StandardID) (*persistence.ExecuteStmtWithStorageResultOutput, error)
- type ApplicationRepositoryInfraOptions
- type ApplicationUpdateDB
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApplicationCreateDB ¶
type ApplicationCreateDB struct { // ApplicationDB is the data struct of the resource in the database ApplicationDB }
ApplicationCreateDB is the data struct of the creation of a resource in the database
type ApplicationDB ¶
type ApplicationDB 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"` // ChainID is the id of the Ethereum network in which the application operates ChainID string `storage:"chain_id"` // 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"` // Description of the resource Description *string `storage:"description"` }
ApplicationDB is the data struct of the resource in the database
type ApplicationDBFilter ¶
type ApplicationDBFilter struct { // ApplicationDB is the data struct of the resource in the database ApplicationDB // 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"` }
ApplicationDBFilter to filter lists of resources from the database
func (*ApplicationDBFilter) Paged ¶
func (filter *ApplicationDBFilter) Paged(limit, offset int) *ApplicationDBFilter
Paged creates a pagination filter.
func (*ApplicationDBFilter) Sort ¶
func (filter *ApplicationDBFilter) Sort(orderBy string, orderDirection persistence.OrderDirection) *ApplicationDBFilter
Sort creates a sorting filter.
type ApplicationExistsDB ¶
type ApplicationExistsDB struct { // Exists is true if the resource exists Exists bool `storage:"exists_result" valid:"required"` }
ApplicationExistsDB is the data struct to check if a resource exists in the database
type ApplicationRepositoryInfra ¶
type ApplicationRepositoryInfra struct {
// contains filtered or unexported fields
}
func ProvideApplicationRepositoryInfra ¶
func ProvideApplicationRepositoryInfra(options ApplicationRepositoryInfraOptions) (*ApplicationRepositoryInfra, error)
func (*ApplicationRepositoryInfra) Add ¶
func (repository *ApplicationRepositoryInfra) Add(ctx context.Context, db ApplicationCreateDB) (*ApplicationDB, error)
func (*ApplicationRepositoryInfra) All ¶
func (repository *ApplicationRepositoryInfra) All(ctx context.Context, filters ApplicationDBFilter) ([]ApplicationDB, error)
func (*ApplicationRepositoryInfra) Edit ¶
func (repository *ApplicationRepositoryInfra) Edit(ctx context.Context, db ApplicationUpdateDB) (*persistence.ExecuteStmtWithStorageResultOutput, error)
func (*ApplicationRepositoryInfra) Exists ¶
func (repository *ApplicationRepositoryInfra) Exists(ctx context.Context, id entities.StandardID) ([]ApplicationExistsDB, error)
func (*ApplicationRepositoryInfra) Get ¶
func (repository *ApplicationRepositoryInfra) Get(ctx context.Context, id entities.StandardID) ([]ApplicationDB, error)
func (*ApplicationRepositoryInfra) Remove ¶
func (repository *ApplicationRepositoryInfra) Remove(ctx context.Context, id entities.StandardID) (*persistence.ExecuteStmtWithStorageResultOutput, error)
type ApplicationRepositoryInfraOptions ¶
type ApplicationRepositoryInfraOptions struct {
GenericStorage persistence.Storage
}
type ApplicationUpdateDB ¶
type ApplicationUpdateDB struct { // ApplicationDB is the data struct of the resource in the database ApplicationDB // NewResourceVersion is the new resource version after the edition NewResourceVersion string `storage:"new_resource_version"` }
ApplicationUpdateDB is the data struct of the update of a resource in the database
Click to show internal directories.
Click to hide internal directories.