Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewGormStorage ¶
func NewGormStorage() gormStorage
NewGormStorage creates a new instance of gorm storage integration. Since gorm is thread safe (https://v1.gorm.io/docs/method_chaining.html) only one connection will be created. If more than one DB is used use a map for dsn.
func NewTaskQuery ¶
NewTaskQuery Builds a new task query to be used on the storage interface. NOTE: THIS MUST BE REFACTORED TO USE THE OPTIONS PATTERN (https://www.sohamkamani.com/golang/options-pattern/)
func NewTaskRepo ¶
func NewTaskRepo(storage Storage) *taskRepo
NewTaskRepo creates a new taskRepo instance. Storage is the db storage implementation that allows the interaction with the DB
Types ¶
type QueryBuilder ¶
type Storage ¶
type Storage interface { Migrate(interface{}) error Close() Get(uuid.UUID, interface{}) error Filter([]Query, interface{}, models.Pagination, ...string) error Create(interface{}) error Save(interface{}) error Delete(interface{}) error }
Storage is the common interface to interact with the database
Click to show internal directories.
Click to hide internal directories.