dao

package
v0.87.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	CachedTypeSize            = 0
	CachedTypePathSize        = 1
	CachedTypeStrippedSize    = 2
	CachedTypeCachedSize      = 3
	CachedTypeSizeProgressive = 4
)

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) GetDocumentById

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

func (*Dao) GetDocumentListByIdList added in v0.86.3

func (m *Dao) GetDocumentListByIdList(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) GetVideoSizeListList added in v0.86.3

func (m *Dao) GetVideoSizeListList(ctx context.Context, idList []int64) (sizes map[int64][]*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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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