config

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadWithPrefix

func LoadWithPrefix(prefix string, v interface{}) error

Types

type HTTPClient

type HTTPClient struct {
	Timeout time.Duration
}

type HTTPServer

type HTTPServer struct {
	Addr         string
	ReadTimeout  time.Duration
	WriteTimeout time.Duration
	IdleTimeout  time.Duration
}

func (*HTTPServer) NewServer added in v0.2.0

func (s *HTTPServer) NewServer(h http.Handler) *http.Server

CreateServer creates a new HTTP server from the given config.

type MySQL

type MySQL struct {
	Host     string
	Port     int
	Username string
	Password string
	Database string
	Location string
}

func (MySQL) DSN

func (m MySQL) DSN() string

DSN returns the MySQL DSN.

type Redis

type Redis struct {
	Addr     string
	Password string
}

Jump to

Keyboard shortcuts

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