Documentation ¶
Index ¶
- Constants
- Variables
- type CachePhotoData
- type Dao
- func (m *Dao) GetCachePhotoData(ctx context.Context, photoId int64) (*CachePhotoData, error)
- func (m *Dao) GetDocumentById(ctx context.Context, id int64) *mtproto.Document
- func (m *Dao) GetDocumentListByIdList(ctx context.Context, idList []int64) []*mtproto.Document
- func (m *Dao) GetPhotoSizeListList(ctx context.Context, idList []int64) (sizes map[int64][]*mtproto.PhotoSize)
- func (m *Dao) GetPhotoSizeListV2(ctx context.Context, sizeId int64) (sizes []*mtproto.PhotoSize)
- func (m *Dao) GetPhotoV2(ctx context.Context, photoId int64) (*mtproto.Photo, error)
- func (m *Dao) GetVideoSizeList(ctx context.Context, sizeId int64) (sizes []*mtproto.VideoSize)
- func (m *Dao) GetVideoSizeListList(ctx context.Context, idList []int64) (sizes map[int64][]*mtproto.VideoSize)
- func (m *Dao) MakeDocumentByDO(ctx context.Context, document *mtproto.Document, id int64, ...)
- func (m *Dao) SaveDocumentV2(ctx context.Context, fileName string, document *mtproto.Document)
- func (m *Dao) SavePhotoSizeV2(ctx context.Context, szId int64, szList []*mtproto.PhotoSize) error
- func (m *Dao) SavePhotoV2(ctx context.Context, id, accessHash int64, hasStickers, hasVideo bool, ...) error
- func (m *Dao) SaveVideoSizeV2(ctx context.Context, szId int64, szList []*mtproto.VideoSize) error
- type Mysql
Constants ¶
View Source
const ( CachedTypeSize = 0 CachedTypePathSize = 1 CachedTypeStrippedSize = 2 CachedTypeCachedSize = 3 CachedTypeSizeProgressive = 4 )
Variables ¶
View Source
var ( GenCacheDocumentKey = genCacheDocumentKey ParseCacheDocumentKey = parseCacheDocumentKey )
View Source
var (
GetPhotoSize = getPhotoSize
)
Functions ¶
This section is empty.
Types ¶
type CachePhotoData ¶ added in v0.90.1
type CachePhotoData struct { Id int64 `json:"id"` Photo *dataobject.PhotosDO `json:"photo"` SizeList []*dataobject.PhotoSizesDO `json:"size_list"` VideoSizeList []*dataobject.VideoSizesDO `json:"video_size_list"` }
func (*CachePhotoData) ToPhoto ¶ added in v0.90.1
func (c *CachePhotoData) ToPhoto() *mtproto.Photo
func (*CachePhotoData) ToPhotoSizeList ¶ added in v0.90.1
func (c *CachePhotoData) ToPhotoSizeList() *media.PhotoSizeList
func (*CachePhotoData) ToSizes ¶ added in v0.90.1
func (c *CachePhotoData) ToSizes() []*mtproto.PhotoSize
func (*CachePhotoData) ToVideoSizeList ¶ added in v0.90.1
func (c *CachePhotoData) ToVideoSizeList() *media.VideoSizeList
func (*CachePhotoData) ToVideoSizes ¶ added in v0.90.1
func (c *CachePhotoData) ToVideoSizes() []*mtproto.VideoSize
type Dao ¶
type Dao struct { *Mysql sqlc.CachedConn dfs_client.DfsClient }
func (*Dao) GetCachePhotoData ¶ added in v0.90.1
func (*Dao) GetDocumentById ¶
func (*Dao) GetDocumentListByIdList ¶ added in v0.86.3
func (*Dao) GetPhotoSizeListList ¶
func (*Dao) GetPhotoSizeListV2 ¶
func (*Dao) GetPhotoV2 ¶
func (*Dao) GetVideoSizeList ¶
func (*Dao) GetVideoSizeListList ¶ added in v0.86.3
func (*Dao) MakeDocumentByDO ¶ added in v0.90.1
func (m *Dao) MakeDocumentByDO( ctx context.Context, document *mtproto.Document, id int64, do *dataobject.DocumentsDO, thumbs []*mtproto.PhotoSize, videoThumbs []*mtproto.VideoSize)
MakeDocumentByDO
document#1e87342b flags:#
id:long access_hash:long file_reference:bytes date:int mime_type:string size:int thumbs:flags.0?Vector<PhotoSize> video_thumbs:flags.1?Vector<VideoSize> dc_id:int attributes:Vector<DocumentAttribute> = Document;
func (*Dao) SaveDocumentV2 ¶
func (*Dao) SavePhotoSizeV2 ¶
func (*Dao) SavePhotoV2 ¶
type Mysql ¶
type Mysql struct { *sqlx.DB *mysql_dao.DocumentsDAO *mysql_dao.PhotosDAO *mysql_dao.PhotoSizesDAO *mysql_dao.VideoSizesDAO *sqlx.CommonDAO }
Click to show internal directories.
Click to hide internal directories.