dao

package
v0.85.1 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2022 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dao

type Dao struct {
	*Mysql
	sqlc.CachedConn
	dfs_client.DfsClient
}

func New

func New(c config.Config) *Dao

func (*Dao) GetDocument

func (m *Dao) GetDocument(ctx context.Context, id, accessHash int64, version int32) *mtproto.Document

???

func (*Dao) GetDocumentById

func (m *Dao) GetDocumentById(ctx context.Context, id int64) *mtproto.Document

func (*Dao) GetDocumentList

func (m *Dao) GetDocumentList(ctx context.Context, idList []int64) []*mtproto.Document

func (*Dao) GetEncryptedFile

func (m *Dao) GetEncryptedFile(ctx context.Context, id, accessHash int64) (*mtproto.EncryptedFile, error)

func (*Dao) GetPhotoSizeListList

func (m *Dao) GetPhotoSizeListList(ctx context.Context, idList []int64) (sizes map[int64][]*mtproto.PhotoSize)

func (*Dao) GetPhotoSizeListV2

func (m *Dao) GetPhotoSizeListV2(ctx context.Context, sizeId int64) (sizes []*mtproto.PhotoSize)

func (*Dao) GetPhotoV2

func (m *Dao) GetPhotoV2(ctx context.Context, photoId int64) (*mtproto.Photo, error)

func (*Dao) GetVideoSizeList

func (m *Dao) GetVideoSizeList(ctx context.Context, sizeId int64) (sizes []*mtproto.VideoSize)

func (*Dao) SaveDocumentV2

func (m *Dao) SaveDocumentV2(ctx context.Context, fileName string, document *mtproto.Document)

func (*Dao) SaveEncryptedFileV2

func (m *Dao) SaveEncryptedFileV2(ctx context.Context, eF *mtproto.EncryptedFile) error

func (*Dao) SavePhotoSizeV2

func (m *Dao) SavePhotoSizeV2(ctx context.Context, szId int64, szList []*mtproto.PhotoSize) error

func (*Dao) SavePhotoV2

func (m *Dao) SavePhotoV2(ctx context.Context, id, accessHash int64, hasStickers, hasVideo bool, fileName string) error

func (*Dao) SaveVideoSizeV2

func (m *Dao) SaveVideoSizeV2(ctx context.Context, szId int64, szList []*mtproto.VideoSize) error

type Mysql

func (*Mysql) Close

func (d *Mysql) Close() error

func (*Mysql) Ping

func (d *Mysql) Ping(ctx context.Context) (err error)

Jump to

Keyboard shortcuts

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