config

package
v0.0.0-...-ab5ebe4 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2022 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 Config

type Config struct {
	DatabaseConfig    `mapstructure:",squash"`
	TelegramBotConfig `mapstructure:",squash"`
	Messages
}

func NewConfig

func NewConfig(envFolderPath, configFolder string) *Config

type DatabaseConfig

type DatabaseConfig struct {
	Scheme   string `mapstructure:"MONGODB_SCHEME"`
	Host     string `mapstructure:"MONGODB_HOST"`
	Username string `mapstructure:"MONGODB_USER"`
	Password string `mapstructure:"MONGODB_PASSWORD"`
}

type Messages

type Messages struct {
	NotAuthorized string
	AuthSuccess   string

	PleaseTypeNameOfCategory       string
	PleaseTypeNewNameOfTheCategory string
	CategoryExists                 string
	CategoryNotFound               string
	CategoryCreated                string
	CategoryRemoved                string
	CategoryRenamed                string
	CategoryToBeRenamedNotFound    string
	SelectCategoriesToRemove       string
	SelectCategoriesToRename       string
	ListCategories                 string
	NoCategories                   string
	InvalidCategoryName            string
	InvalidNoteContent             string

	SelectCategoryForNote       string
	SelectCategoryToRemoveNotes string
	SelectCategoryToListNotes   string
	NoteCreated                 string
	NoteRemoved                 string
	SelectNotes                 string
	ListNotesInCategory         string
	NoNotesInCategory           string
}

type TelegramBotConfig

type TelegramBotConfig struct {
	APIKey string `mapstructure:"BOT_API_KEY"`
}

Jump to

Keyboard shortcuts

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