s3

package
v0.0.0-...-86de8eb Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BotConfig

type BotConfig struct {
	PhotoFileID string             `json:"photo_file_id"`
	AdminChatID int64              `json:"admin_chat_id"`
	GuestsInfo  map[TgID]GuestInfo `json:"guests_info"`
}

type GuestAnswers

type GuestAnswers struct {
	TgID         int64  `json:"tg_id"`
	FirstName    string `json:"first_name"`
	LastName     string `json:"last_name"`
	IsAccepted   *bool  `json:"is_accepted"`
	WithSomebody *bool  `json:"with_somebody"`
	SecondGuest  string `json:"second_guest"`
	NeedTransfer string `json:"need_transfer"`
	Wishes       string `json:"wishes"`
}

type GuestInfo

type GuestInfo struct {
	FirstName string `json:"first_name"`
	LastName  string `json:"last_name"`
}

type Repository

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

func NewRepository

func NewRepository() (*Repository, *logger.SlogError)

func (*Repository) GetAllAnswers

func (repo *Repository) GetAllAnswers() ([]GuestAnswers, *logger.SlogError)

func (*Repository) GetAnswers

func (repo *Repository) GetAnswers(tgID int64) (*GuestAnswers, *logger.SlogError)

func (*Repository) GetConfig

func (repo *Repository) GetConfig() (*BotConfig, *logger.SlogError)

func (*Repository) SaveAnswers

func (repo *Repository) SaveAnswers(anws GuestAnswers) *logger.SlogError

func (*Repository) SaveConfig

func (repo *Repository) SaveConfig(config BotConfig) *logger.SlogError

type TgID

type TgID int64

Jump to

Keyboard shortcuts

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