mongo

package
v0.0.0-...-9135915 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChatsRepo

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

func NewChatsRepo

func NewChatsRepo(db *mongo.Database) (*ChatsRepo, error)

func (*ChatsRepo) Create

func (r *ChatsRepo) Create(ctx context.Context, chats ...*tglog.Chat) ([]*tglog.Chat, error)

func (*ChatsRepo) CreateIfNotExist

func (r *ChatsRepo) CreateIfNotExist(ctx context.Context, chats ...*tglog.Chat) ([]*tglog.Chat, error)

type UpdatesRepo

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

func NewUpdatesRepo

func NewUpdatesRepo(db *mongo.Database, ur tglog.UsersRepo, cr tglog.ChatsRepo) *UpdatesRepo

func (*UpdatesRepo) Create

func (r *UpdatesRepo) Create(ctx context.Context, updates ...*tglog.Update) ([]*tglog.Update, error)

func (*UpdatesRepo) CreateIfNotExist

func (r *UpdatesRepo) CreateIfNotExist(ctx context.Context, updates ...*tglog.Update) ([]*tglog.Update, error)

type UsersRepo

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

func NewUsersRepo

func NewUsersRepo(db *mongo.Database) (*UsersRepo, error)

func (*UsersRepo) Create

func (r *UsersRepo) Create(ctx context.Context, users ...*tglog.User) ([]*tglog.User, error)

func (*UsersRepo) CreateIfNotExist

func (r *UsersRepo) CreateIfNotExist(ctx context.Context, users ...*tglog.User) ([]*tglog.User, error)

Jump to

Keyboard shortcuts

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