base

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2023 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseRepository

type BaseRepository struct {
	// contains filtered or unexported fields
}

func NewBaseRepository

func NewBaseRepository(gmc *mongo.Database, column map[string]search.Filter) BaseRepository

func (BaseRepository) Query

func (b BaseRepository) Query(ctx context.Context, cq common.Query, collection string, list interface{}) (page *common.Pagination, err error)

func (BaseRepository) ReadById

func (b BaseRepository) ReadById(ctx context.Context, collection string, id, bean interface{}) error

func (*BaseRepository) Save

func (b *BaseRepository) Save(ctx context.Context, collection string, bean interface{}) (interface{}, error)

func (BaseRepository) Update

func (b BaseRepository) Update(ctx context.Context, collection string, id, update interface{}) (int64, error)

type IBaseRepository

type IBaseRepository interface {
	Save(ctx context.Context, collection string, bean interface{}) (interface{}, error)
	Update(ctx context.Context, collection string, id, update interface{}) (int64, error)
	ReadById(ctx context.Context, collection string, id, bean interface{}) error
	Query(ctx context.Context, cq common.Query, collection string, list interface{}) (page *common.Pagination, err error)
}

Jump to

Keyboard shortcuts

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