storage

package
v0.0.0-...-8f6d374 Latest Latest
Warning

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

Go to latest
Published: May 22, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

type Storage struct {
	// contains filtered or unexported fields
}

func New

func New(dir string) (*Storage, error)

func (Storage) GetOrSetUserFirstSeen

func (s Storage) GetOrSetUserFirstSeen(userID int64, firstSeen time.Time) (time.Time, error)

func (Storage) GetUserChatMessageCount

func (s Storage) GetUserChatMessageCount(userID int64, chatID int64) (int64, error)

func (Storage) GetVotes

func (s Storage) GetVotes(chatID int64, messageID int) (int, int, error)

func (Storage) IncUserChatMessageCount

func (s Storage) IncUserChatMessageCount(userID int64, chatID int64, add int64) (int64, error)

func (Storage) IsUserAdmin

func (s Storage) IsUserAdmin(userID int64) bool

func (Storage) IsUserTrusted

func (s Storage) IsUserTrusted(userID int64) (bool, error)

func (Storage) TrustUser

func (s Storage) TrustUser(userID int64) error

func (Storage) VoteSpam

func (s Storage) VoteSpam(userID int64, chatID int64, messageID int, spam bool) error

Jump to

Keyboard shortcuts

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