vkbot

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StateStart int = iota
	StateRegister
	StateWeekSelection
	StateDaySelection
)

Variables

This section is empty.

Functions

func New

func New(storage Storage) error

Types

type Storage

type Storage interface {
	GetSchedule(institute string, peerId int) (string, error)
	AddUser(institute string, course string, groupNumber string, peerId int) error
	CheckSchedule(institute string, course string, groupNumber string) (bool, error)
	CheckUser(peerId int) (bool, error)
	UserCheckWeek(peerId int) (bool, error)
	UserAddWeek(week string, peerId int) error
	DeleteUser(peerId int) error
}

type User

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

func NewUserState added in v0.0.5

func NewUserState() *User

func (*User) GetState added in v0.0.5

func (us *User) GetState(peerId int) (int, bool)

func (*User) SetState added in v0.0.5

func (us *User) SetState(peerId int, state int)

type VkBot

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

Jump to

Keyboard shortcuts

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