dao

package
v0.96.0 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2023 License: Apache-2.0 Imports: 16 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              *mtproto.ImmutableChat `json:"chat_data"`
	ChatParticipantIdList []int64                `json:"chat_participant_id_list"`
	BotIdList             []int64                `json:"bot_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) GetExcludeParticipantsMutableChat added in v0.90.1

func (d *Dao) GetExcludeParticipantsMutableChat(ctx context.Context, chatId int64) (*mtproto.MutableChat, error)

func (*Dao) GetLinkInviteSize added in v0.90.1

func (d *Dao) GetLinkInviteSize(ctx context.Context, link string) int32

func (*Dao) GetMutableChat

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

func (*Dao) GetRequestedLinkInviteSize added in v0.90.1

func (d *Dao) GetRequestedLinkInviteSize(ctx context.Context, link string) int32

func (*Dao) MakeChatInviteExported added in v0.86.3

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

MakeChatInviteExported , requested bool

func (*Dao) MakeImmutableChatByDO

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

func (*Dao) MakeImmutableChatParticipant

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

func (*Dao) PutMutableChat added in v0.86.3

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

Jump to

Keyboard shortcuts

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