mongo

package
v0.0.0-...-18fed97 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 14, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

New retrieves a new repository object ready to be used.

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL