config

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2021 License: MIT Imports: 6 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 {
	Vars     map[string]string `yaml:"vars,omitempty"`
	Port     string            `yaml:"port"`
	Services []Service         `yaml:"services"`
	// contains filtered or unexported fields
}

Config is the rout Config struct

func InitConfig

func InitConfig(path string) *Config

func LoadConfig

func LoadConfig(path string) *Config

LoadConfig load configuration yaml file content from the specified path

func (Config) Save

func (c Config) Save() error

func (*Config) SetPort

func (c *Config) SetPort(port string) *Config

type Service

type Service struct {
	Port              string                               `yaml:"port,omitempty"`
	Name              string                               `yaml:"name,omitempty"`
	Type              string                               `yaml:"type,omitempty"`
	HTTPConfig        httpService.ServerConfig             `yaml:"http_config,omitempty"`
	JSONDBConfig      jsonServerService.JSONDBConfig       `yaml:"json_server_config,omitempty"`
	FilesServerConfig filesServerService.FilesServerConfig `yaml:"static_server_config,omitempty"`
}

Service is the Service level configuration struct

Jump to

Keyboard shortcuts

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