chatrepo

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Chat

type Chat struct {
	ID           int64  `bson:"_id,omitempty"     json:"_id,omitempty"`
	Lang         string `bson:"lang,omitempty"    json:"lang,omitempty"`
	CommandAll   string `bson:"all,omitempty"     json:"all,omitempty"`
	CommandAdmin string `bson:"admin,omitempty"   json:"admin,omitempty"`
	// contains filtered or unexported fields
}

Chat implements chatrepo.Chat

func (*Chat) GetCommandAdmin

func (c *Chat) GetCommandAdmin() commandscope.CommandScope

GetCommandAdmin implements chatrepo.Chat

func (*Chat) GetCommandAll

func (c *Chat) GetCommandAll() commandscope.CommandScope

GetCommandAll implements chatrepo.Chat

func (*Chat) GetID

func (c *Chat) GetID() int64

GetID implements chatrepo.Chat

func (*Chat) GetLang

func (c *Chat) GetLang() string

GetLang implements chatrepo.Chat

func (*Chat) Save

func (c *Chat) Save(ctx context.Context) (err error)

Save implements chatrepo.Chat

func (*Chat) SetCommandAdmin

func (c *Chat) SetCommandAdmin(scope commandscope.CommandScope)

SetCommandAdmin implements chatrepo.Chat

func (*Chat) SetCommandAll

func (c *Chat) SetCommandAll(scope commandscope.CommandScope)

SetCommandAll implements chatrepo.Chat

func (*Chat) SetLang

func (c *Chat) SetLang(lang string)

SetLang implements chatrepo.Chat

type ChatRepo

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

ChatRepo implements chatrepo.ChatRepo

func NewChatRepo

func NewChatRepo(collection *mongo.Collection) (repo *ChatRepo)

NewChatRepo initialize chatrepo

func (*ChatRepo) GetByID

func (r *ChatRepo) GetByID(ctx context.Context, id int64) (chat chatrepo.Chat, err error)

GetByID implements chatrepo.ChatRepo

Jump to

Keyboard shortcuts

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