postgres

package
v0.0.0-...-ad16d9f Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2021 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close()

Close close db connection

func Connect

func Connect()

Connect connect to db.

func GetMaxMsgIDInChat

func GetMaxMsgIDInChat(chatID int64) (int64, error)

GetMaxMsgIDInChat get max message id in chat

func GetMessageByMessageID

func GetMessageByMessageID(m *entity.Message, MessageID, ChatID int64) error

GetMessageByMessageID get message by message id and chat id

func GetTGPhotoByFileID

func GetTGPhotoByFileID(fileID int32) (*entity.Photo, error)

GetTGPhotoByFileID get file ID by file id

func GetTGVideoByFileID

func GetTGVideoByFileID(fileID int32) (*entity.Video, error)

GetTGVideoByFileID get file ID by file id

func IfFileExists

func IfFileExists(f *tdlib.File) (bool, error)

IfFileExists check if file exists in db

func InsertChat

func InsertChat(c *entity.Chat) error

InsertChat insert new chat to db

func InsertMessage

func InsertMessage(m *entity.Message) error

InsertMessage insert new message to db

func InsertTGPhoto

func InsertTGPhoto(p *entity.Photo) error

InsertTGPhoto insert TG photo to db

func InsertTGVideo

func InsertTGVideo(v *entity.Video) error

InsertTGVideo insert TG video to db.

func UpdateMessageUploadStatus

func UpdateMessageUploadStatus(m *entity.Message, uploaded bool) error

UpdateMessageUploadStatus update message upload status

func UpdateTGPhoto

func UpdateTGPhoto(f *tdlib.File, path string) error

UpdateTGPhoto update TG photo

func UpdateTGVideo

func UpdateTGVideo(f *tdlib.File, path string) error

UpdateTGVideo update TG video

Types

This section is empty.

Jump to

Keyboard shortcuts

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