config

package
v0.0.0-...-9b6346a Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2023 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 Configuration

type Configuration struct {
	Server       ServerConfig
	MongoDB      MongoDBConfig
	Logger       LoggerConfig
	TokenSecret  string
	RootAdmin    string
	RootPassword string
	RootEmail    string
	RootGroup    string
	Cert         string
	Key          string
	ENV          string
}

Configuration is a struct designed to hold the applications variable configuration settings

func GetConfigurations

func GetConfigurations() (*Configuration, error)

GetConfigurations is a function that reads a json configuration file and outputs a Configuration struct

func GetDevConfigurations

func GetDevConfigurations() (*Configuration, error)

GetDevConfigurations returns a Configuration struct for running in Docker

func (*Configuration) InitializeEnvironmentalVars

func (c *Configuration) InitializeEnvironmentalVars()

InitializeEnvironmentalVars initializes the environmental variables for the application

type LoggerConfig

type LoggerConfig struct {
	DisableCaller     bool
	DisableStacktrace bool
	Encoding          string
	Level             string
}

LoggerConfig holds config settings for server logger

type MongoDBConfig

type MongoDBConfig struct {
	URI string
	DB  string
}

MongoDBConfig holds config settings for Mongo connection

type ServerConfig

type ServerConfig struct {
	Port              string
	Registration      string
	SSL               string
	Timeout           time.Duration
	ReadTimeout       time.Duration
	WriteTimeout      time.Duration
	MaxConnectionIdle time.Duration
	MaxConnectionAge  time.Duration
}

ServerConfig holds config settings for Server connection

Jump to

Keyboard shortcuts

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