config

package
v0.0.0-...-33ac5cc Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package config implements getting params from env/flags/config file

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Initialize

func Initialize()

func SetFlags

func SetFlags()

Types

type AppParams

type AppParams struct {
	Address              *string `env:"ADDRESS" json:"address"`              //server address to listen
	StoreInterval        *int    `env:"STORE_INTERVAL" json:"restore"`       //store interval
	FileStoragePath      *string `env:"FILE_STORAGE_PATH" json:"store_file"` //file storage path
	Restore              *bool   `env:"RESTORE"`                             //restore or not data on start
	DatabaseDsn          *string `env:"DATABASE_DSN" json:"database_dsn"`    //db connection dsn
	SecretKey            *string `env:"KEY"`                                 //secret key for signature check
	ProfileServerAddress *string `env:"PROFILE_SERVER_ADDRESS"`              //profile serveraddress to listen
	CryptoKey            *string `env:"CRYPTO_KEY" json:"crypto_key"`        //Full filepath to RSA private key
	Config               *string `env:"CONFIG" json:"-"`                     //filepath to config file
}
var Params *AppParams = &AppParams{}

Jump to

Keyboard shortcuts

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