models

package
v0.0.2-301223-e6c85bf Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Models

type Models interface {
	GetUserByID(ctx context.Context, id int64) (*User, error)

	// TODO: rm after transition period
	SetUserID(ctx context.Context, username string, id int64) error

	UpsertUser(ctx context.Context, user *User) error

	GetWhitelisted(ctx context.Context, userID int64) (bool, error)
	SetWhitelisted(ctx context.Context, userID int64, whitelisted bool) error
}

type User

type User struct {
	ID       int64
	Username string
}

func FromTG

func FromTG(tu *tgbotapi.User) *User

func (User) String

func (u User) String() string

Jump to

Keyboard shortcuts

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