Documentation ¶ Index ¶ type Mongo func New(mdb *mongo.Database) *Mongo func (m *Mongo) BatchUpdate(ctx context.Context, data []entity.Author) (int, error) func (m *Mongo) GetAll(ctx context.Context, data entity.GetAllRequest) ([]entity.Author, int, int, error) Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Mongo ¶ type Mongo struct { // contains filtered or unexported fields } Mongo contains functions for author mongodb. func New ¶ func New(mdb *mongo.Database) *Mongo New to create new author database. func (*Mongo) BatchUpdate ¶ func (m *Mongo) BatchUpdate(ctx context.Context, data []entity.Author) (int, error) BatchUpdate to batch update. func (*Mongo) GetAll ¶ added in v0.2.0 func (m *Mongo) GetAll(ctx context.Context, data entity.GetAllRequest) ([]entity.Author, int, int, error) GetAll to get all. Source Files ¶ View all Source files model.go mongo.go Click to show internal directories. Click to hide internal directories.