config

package
v0.0.0-...-e55934f Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Setup

func Setup(path ...string)

Setup 载入配置文件

Types

type Application

type Application struct {
	Port          string `mapstructure:"port" json:"port" yaml:"port"`
	KeyExpiration int    `mapstructure:"key_expiration" json:"key_expiration" yaml:"key_expiration"`
}

Application Application

type Configs

type Configs struct {
	Application Application `mapstructure:"application" json:"application" yaml:"application"`

	Nsq Nsq `mapstructure:"nsq" json:"nsq" yaml:"nsq"`

	Redis Redis `mapstructure:"redis" json:"redis" yaml:"redis"`
}

Configs Configs

var (
	Case Configs
)

Case 全局Setup config

type Nsq

type Nsq struct {
	Addr string `mapstructure:"addr" json:"addr" yaml:"addr"`
}

Nsq Nsq配置参数

type Redis

type Redis struct {
	Addr     string `mapstructure:"addr" json:"addr" yaml:"addr"`
	Password string `mapstructure:"password" json:"password" yaml:"password"`
	DB       int    `mapstructure:"db" json:"db" yaml:"db"`
}

Redis Redis配置参数

Jump to

Keyboard shortcuts

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