dao

package
v0.87.1 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChatCacheData added in v0.86.3

type ChatCacheData struct {
	ChatData              *chatpb.ImmutableChat `json:"chat_data"`
	ChatParticipantIdList []int64               `json:"chat_participant_id_list"`
}

type Dao

Dao dao.

func New

func New(c config.Config, plugin plugin.ChatPlugin) (dao *Dao)

New new a dao and return.

func (*Dao) GetChatCacheKey added in v0.86.3

func (d *Dao) GetChatCacheKey(chatId int64) string

func (*Dao) GetChatParticipantCacheKey added in v0.86.3

func (d *Dao) GetChatParticipantCacheKey(chatId, chatParticipantId int64) string

func (*Dao) GetMutableChat

func (d *Dao) GetMutableChat(ctx context.Context, chatId int64, id ...int64) (*chatpb.MutableChat, error)

func (*Dao) MakeChatInviteExported added in v0.86.3

func (d *Dao) MakeChatInviteExported(ctx context.Context, chatInviteDO *dataobject.ChatInvitesDO) *mtproto.ExportedChatInvite

func (*Dao) MakeImmutableChatByDO

func (d *Dao) MakeImmutableChatByDO(chatsDO *dataobject.ChatsDO) (chat *chatpb.ImmutableChat)

func (*Dao) MakeImmutableChatParticipant

func (d *Dao) MakeImmutableChatParticipant(chatParticipantsDO *dataobject.ChatParticipantsDO) (participant *chatpb.ImmutableChatParticipant)

func (*Dao) PutMutableChat added in v0.86.3

func (d *Dao) PutMutableChat(ctx context.Context, chat *chatpb.MutableChat) error

Jump to

Keyboard shortcuts

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