Documentation ¶
Index ¶
- func AddSocket(socket model.Socket) (err error)
- func ClearSessionValues(user uint64)
- func Close()
- func GetAllSockets() ([]model.Socket, error)
- func GetSessionValue(user uint64, key string) string
- func GetSessionValueFloat64(user uint64, key string) float64
- func GetSessionValueInt64(user uint64, key string) int64
- func GetSessionValueJson(user uint64, key string, v interface{}) bool
- func GetSessionValueUint64(user uint64, key string) uint64
- func GetSocketPhotoStrings(socketId uint64) ([]string, error)
- func GetSocketPhotoUrls(socketId uint64) ([]string, error)
- func GetUserState(id uint64) (string, error)
- func SetPhotoUrl(photoId uint64, photoUrl string) error
- func SetSessionValue(user uint64, key string, value interface{})
- func SetUserState(id uint64, state string)
- func UpdateUserInfo(user tg.User) error
- type PhotosRow
- type SessionDataRow
- type SocketsRow
- type UsersRow
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClearSessionValues ¶
func ClearSessionValues(user uint64)
func GetAllSockets ¶
func GetSessionValue ¶
func GetSessionValueFloat64 ¶
func GetSessionValueInt64 ¶
func GetSessionValueJson ¶
func GetSessionValueUint64 ¶
func GetSocketPhotoStrings ¶
func GetSocketPhotoUrls ¶
func GetUserState ¶
func SetPhotoUrl ¶
func SetSessionValue ¶
func SetUserState ¶
func UpdateUserInfo ¶
Update user info Is called every message to check if user updated it's name and other fields
Types ¶
type PhotosRow ¶
type PhotosRow struct { Id uint64 `db:"id"` Socket uint64 `db:"socket"` User uint64 `db:"user"` Added int64 `db:"added"` Url string `db:"url"` MediaId string `db:"media_id"` Downloaded int `db:"downloaded"` }
func GetAllPhotoRows ¶
type SessionDataRow ¶
type SocketsRow ¶
Click to show internal directories.
Click to hide internal directories.