config

package
v0.0.0-...-0133d04 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2022 License: BSD-3-Clause 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 {
	Port     string `env:"PORT,default=8080"`
	Telegram Telegram
	Raindrop Raindrop
}

Config holds configuration for the project.

func NewConfig

func NewConfig(env string) (*Config, error)

NewConfig creates an instance of Config. It needs the path of the env file to be used.

type Raindrop

type Raindrop struct {
	BaseURL string `env:"RAINDROP_BASE_URL,required"`
	Token   string `env:"RAINDROP_TOKEN,required"`
}

Raindrop holds configuration related to Raindrop API.

type Telegram

type Telegram struct {
	OwnerID    int64  `env:"TELEGRAM_OWNER_ID,required"`
	WebhookURL string `env:"TELEGRAM_WEBHOOK_URL,required"`
	Token      string `env:"TELEGRAM_TOKEN,required"`
}

Telegram holds configuration related to Telegram bot.

Jump to

Keyboard shortcuts

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