config

package
v0.0.0-...-625d9dc Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package config implements common config method and variable for plantbook project

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	HTTPD       HTTPD
	DB          DB
	Log         Log
	TokenSecret string `env:"PLANTBOOK_TOKEN_SECRET" default:"secret_password_for_token_sign"`
}

type DB

type DB struct {
	Provider string `env:"PLANTBOOK_DB_PROVIDER" default:"postgres"`
	URL      string `env:"PLANTBOOK_DB_URL" default:"postgres://plantbook_admin:mypassword@postgresql:5432/plantbook_admin?sslmode=disable"` // nolint
}

type HTTPD

type HTTPD struct {
	Host       string `env:"PLANTBOOK_HTTPD_HOST"`
	Port       string `env:"PLANTBOOK_HTTPD_PORT" default:"8081"`
	MetricPort string `env:"PLANTBOOK_HTTPD_METRICPORT" default:"8082"`
}

type Log

type Log struct {
	Debug  bool   `env:"PLANTBOOK_LOG_DEBUG"`
	Format string `env:"PLANTBOOK_LOG_FORMAT" default:"console"`
}

Jump to

Keyboard shortcuts

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