conf

package
v0.0.0-...-d16b773 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2021 License: MIT, MIT Imports: 7 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 {
	Server *Server
	Data   *Data
	// contains filtered or unexported fields
}

func New

func New(opts ...Option) *Config

func (*Config) Load

func (c *Config) Load() error

type Data

type Data struct {
	//Logger   *zaplog.Config
	Database *orm.Config
	Redis    *redis.Config
}

type HTTP

type HTTP struct {
	Addr         string
	ReadTimeout  time.Duration
	WriteTimeout time.Duration
}

type Option

type Option func(*Config)

func WithFilePath

func WithFilePath(filePath string) Option

WithFilePath from file path load config file

type Server

type Server struct {
	HTTP *HTTP
}

Jump to

Keyboard shortcuts

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