configuration

package
v0.0.0-...-8681122 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Api

type Api struct {
	Version string `yaml:"version"`
}

Api version structure, Version string

type Configuration

type Configuration struct {
	Api
	DataBase
	Server
	Redis
	JWT
}

Configuration composed configuration structure: Api, Server, DataBase

func Load

func Load(fileName string) (*Configuration, error)

Load configuration from configuration.yml

type DataBase

type DataBase struct {
	Type     string `yaml:"type"`
	Host     string `yaml:"host"`
	Port     int    `yaml:"port"`
	User     string `yaml:"user"`
	Password string `yaml:"password"`
	Name     string `yaml:"name"`
}

DataBase configuration structure

type JWT

type JWT struct {
	Secret string `yaml:"secret"`
}

JWT access secret

type Redis

type Redis struct {
	Host string `yaml:"host"`
	Port int    `yaml:"port"`
}

Reddis configuration structure, Host string Port int

type Server

type Server struct {
	Port string `yaml:"port"`
}

Server configuration structure, Port string

Jump to

Keyboard shortcuts

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