conf

package
v0.0.0-...-ec1e856 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

* * Copyright (C) 2021-2022 * All rights reserved, Designed By www.github.com/xiatian0716 * 注意:本软件为www.github.com/xiatian0716开发研制

* * Copyright (C) 2021-2022 * All rights reserved, Designed By www.github.com/xiatian0716 * 注意:本软件为www.github.com/xiatian0716开发研制

Index

Constants

This section is empty.

Variables

View Source
var Conf = new(Config)

Conf 全局变量,用来保存程序的所有配置信息

Functions

func Setup

func Setup(configPath string) (err error)

Types

type App

type App struct {
	Name     string `mapstructure:"name"`
	Mode     string `mapstructure:"mode"`
	Version  string `mapstructure:"version"`
	Port     int    `mapstructure:"port"`
	PageSize int    `mapstructure:"page-size"`
}

type Config

type Config struct {
	App       App                  `mapstructure:"app"`
	Snowflake snowflakex.Snowflake `mapstructure:"snowflake"`
	MySQL     mysqlx.MySQL         `mapstructure:"mysql"`
	Redis     redisxx.Redis        `mapstructure:"redis"`
	Log       zapx.Log             `mapstructure:"log"`
}

Jump to

Keyboard shortcuts

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