storage

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action struct {
	ChatID    int64
	MessageID int
	Type      string
	UserID    int
}

type InstanceObj

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

func NewStorage added in v1.2.1

func NewStorage(c *cnf.Cnf, log *zap.SugaredLogger) (*InstanceObj, error)

func (*InstanceObj) AddNewbieMessages

func (o *InstanceObj) AddNewbieMessages(chatID int64, userID int) error

func (*InstanceObj) AddToActionPool

func (o *InstanceObj) AddToActionPool(act Action, delay time.Duration) error

func (*InstanceObj) DelKicked

func (o *InstanceObj) DelKicked(chatID int64, userID int) error

func (*InstanceObj) GetFromActionPool

func (o *InstanceObj) GetFromActionPool() ([]Action, error)

func (*InstanceObj) GetNewbieMessages

func (o *InstanceObj) GetNewbieMessages(chatID int64, userID int) (int, error)

func (*InstanceObj) IsKicked

func (o *InstanceObj) IsKicked(chatID int64, userID int) (bool, error)

func (*InstanceObj) SetKicked

func (o *InstanceObj) SetKicked(chatID int64, userID int, ttl time.Duration) error

func (*InstanceObj) Stop added in v1.2.1

func (o *InstanceObj) Stop() error

Jump to

Keyboard shortcuts

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