config

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

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

Go to latest
Published: Jan 26, 2024 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 CommandsText

type CommandsText struct {
	Description            string `yaml:"description"`
	AnyTagText             string `yaml:"any_tag_text"`
	SuccessfulSearchByTags string `yaml:"successful_search_by_tags"`
	HelpInfoText           string `yaml:"help_info_text"`
	LoginUrl               string `yaml:"login_url"`

	StartCommand struct {
		InlineKeyboard struct {
			KeyboardRow1 struct {
				FindPinViaTagButton string `yaml:"find_pin_via_tag_button"`
			} `yaml:"keyboard_row_1"`

			KeyboardRow11 struct {
				FindPinByUsername string `yaml:"find_pin_by_username"`
			} `yaml:"keyboard_row_11"`

			KeyboardRow2 struct {
				BoardsButton string `yaml:"boards_button"`
			} `yaml:"keyboard_row_2"`

			KeyboardRow3 struct {
				SettingsButton string `yaml:"settings_button"`
			} `yaml:"keyboard_row_3"`

			KeyboardRow4 struct {
				HelpButton string `yaml:"help_button"`
			} `yaml:"keyboard_row_4"`

			KeyboardRow5 struct {
				ProjectButton string `yaml:"project_button"`
			} `yaml:"keyboard_row_5"`
		} `yaml:"inline_keyboard"`
	} `yaml:"start_command"`

	BoardsCommand struct {
		InlineKeyboard struct {
			KeyboardRow1 struct {
				SpecificUsersBoardsButton string `yaml:"specific_users_boards_btn"`
			} `yaml:"keyboard_row_1"`

			KeyboardRow2 struct {
				BoardsByTitleButton string `yaml:"boards_by_title_btn"`
			} `yaml:"keyboard_row_2"`

			KeyboardRow3 struct {
				HistoryOfBoardsButton string `yaml:"history_of_boards_btn"`
			} `yaml:"keyboard_row_3"`

			KeyboardRow4 struct {
				HelpButton string `yaml:"help_button"`
			} `yaml:"keyboard_row_4"`

			KeyboardRow5 struct {
				BackToStartButton string `yaml:"back_to_start_btn"`
			} `yaml:"keyboard_row_5"`
		} `yaml:"inline_keyboard"`
	} `yaml:"boards_command"`

	TagsCommand struct {
		Phrase string `yaml:"phrase"`

		InlineKeyboard struct {
			KeyboardRow1 struct {
				NextButton   string `yaml:"next_button"`
				CancelButton string `yaml:"cancel_button"`
			} `yaml:"keyboard_row_1"`
		} `yaml:"inline_keyboard"`
	} `yaml:"tags_command"`
}

func InitCommandsText

func InitCommandsText(path string) (CommandsText, error)

type Config

type Config struct {
	TgEnabled     bool
	TgToken       string `required:"true"   envconfig:"TELEGRAM_TOKEN"`
	AppID         int    `required:"false"  envconfig:"APP_ID"`
	ApiHash       string `required:"false"  envconfig:"API_HASH"`
	PAccessToken  string `required:"false"  envconfig:"PINTEREST_ACCESS_TOKEN"`
	PClientId     string `required:"false"  envconfig:"PINTEREST_CLIENT_ID"`
	PClientSecret string `required:"false"  envconfig:"PINTEREST_CLIENT_SECRET"`
	DatabaseURL   string `required:"false"  envconfig:"DATABASE_URL"`
	CType         gotgproto.ClientType
	CmdText       CommandsText
}

func NewConfig

func NewConfig() (*Config, error)

Jump to

Keyboard shortcuts

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