Versions in this module Expand all Collapse all v0 v0.0.13 Apr 21, 2019 Changes in this version + func Connection(ctx context.Context, cfg *Configuration) (*mongowrapper.WrappedClient, error) + func ConvertSortParameters(params db.SortParameters) []string + func Transaction(ctx context.Context, client *mongowrapper.WrappedClient, fn TransactionFunc) error + type Configuration struct + AutoMigrate bool + ConnectionString string + DatabaseName string + Password string + Username string + type Default struct + func NewCRUDTable(session *mongowrapper.WrappedClient, db, table string) *Default + func (d *Default) Delete(ctx context.Context, id interface{}) error + func (d *Default) DeleteAll(ctx context.Context, pred interface{}) error + func (d *Default) Find(ctx context.Context, id interface{}, value interface{}) error + func (d *Default) FindBy(ctx context.Context, key string, value interface{}, results interface{}) error + func (d *Default) FindByAndCount(ctx context.Context, key string, value interface{}) (int64, error) + func (d *Default) FindByAndFetch(ctx context.Context, key string, value interface{}, results interface{}) error + func (d *Default) FindFetchOne(ctx context.Context, id string, value interface{}) error + func (d *Default) FindOneBy(ctx context.Context, key string, value interface{}, result interface{}) error + func (d *Default) GetDBName() string + func (d *Default) GetSession() interface{} + func (d *Default) GetTable() interface{} + func (d *Default) GetTableName() string + func (d *Default) Insert(ctx context.Context, data interface{}) error + func (d *Default) InsertOrUpdate(ctx context.Context, id interface{}, data interface{}) error + func (d *Default) List(ctx context.Context, results interface{}, sortParams *db.SortParameters, ...) error + func (d *Default) Search(ctx context.Context, results interface{}, filter interface{}, ...) error + func (d *Default) Update(ctx context.Context, selector interface{}, data interface{}) error + func (d *Default) UpdateID(ctx context.Context, id interface{}, data interface{}) error + func (d *Default) Where(ctx context.Context, filter interface{}, results interface{}) error + func (d *Default) WhereAndFetchLimit(ctx context.Context, filter interface{}, paginator *db.Pagination, ...) error + func (d *Default) WhereAndFetchOne(ctx context.Context, filter interface{}, result interface{}) error + func (d *Default) WhereCount(ctx context.Context, filter interface{}) (int64, error) + type TransactionFunc func() error