Documentation ¶
Index ¶
- func New(db *mongo.Database) storage.Repository
- type PropertySetRepository
- func (repository PropertySetRepository) Create(ctx context.Context, property *model.PropertySet) error
- func (repository PropertySetRepository) Delete(context context.Context, id string) error
- func (repository PropertySetRepository) FindByID(context context.Context, id string) (*model.PropertySet, error)
- func (repository PropertySetRepository) ReadAll(ctx context.Context) ([]*model.PropertySet, error)
- func (repository PropertySetRepository) Update(ctx context.Context, property *model.PropertySet) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type PropertySetRepository ¶
type PropertySetRepository struct {
// contains filtered or unexported fields
}
PropertySetRepository is a representation of the property repository for a mongo DBs.
func (PropertySetRepository) Create ¶
func (repository PropertySetRepository) Create(ctx context.Context, property *model.PropertySet) error
Create a new entry based on the provided property.
func (PropertySetRepository) Delete ¶
func (repository PropertySetRepository) Delete(context context.Context, id string) error
Delete the property with the given id.
func (PropertySetRepository) FindByID ¶
func (repository PropertySetRepository) FindByID(context context.Context, id string) (*model.PropertySet, error)
FindByID retrieves the property matching the given id if such a property exists; otherwise will return a not found error.
func (PropertySetRepository) ReadAll ¶
func (repository PropertySetRepository) ReadAll(ctx context.Context) ([]*model.PropertySet, error)
ReadAll retrieves all available properties.
func (PropertySetRepository) Update ¶
func (repository PropertySetRepository) Update(ctx context.Context, property *model.PropertySet) error
Update all fields of the given property.
Click to show internal directories.
Click to hide internal directories.