conf

package
v0.0.0-...-378a548 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Default = Config{
	Etcd: config.Etcd{
		Endpoints: []string{
			"127.0.0.1:2379",
		},
	},
	MySQL: config.MySQL{
		DSN:     "admin:admin123@tcp(127.0.0.1:3306)/king_account?charset=utf8mb4&parseTime=true&loc=Local",
		MinOpen: 3,
		MaxOpen: 10,
	},
	Log: config.Log{
		DisableTimestamp: false,
		Level:            "info",
		Format:           "json",
		MaxSize:          100,
		MaxDays:          180,
		MaxBackups:       90,
		Compress:         true,
	},
	Server: config.Server{
		Host: "0.0.0.0",
		Port: 5275,
	},
}

Functions

This section is empty.

Types

type Config

type Config struct {
	Etcd   config.Etcd   `json:"etcd" toml:"etcd"`
	Log    config.Log    `json:"log" toml:"log"`
	MySQL  config.MySQL  `json:"mysql" toml:"mysql"`
	Server config.Server `json:"server" toml:"server"`

	Global Global `json:"global" toml:"global"`
}

func (*Config) LoadFile

func (c *Config) LoadFile(path string) error

func (*Config) String

func (c *Config) String() string

type Global

type Global struct {
	TransferFeeRatio     string   `json:"transfer-fee-ratio" toml:"transfer-fee-ratio"`
	TransferFeePayMethod []string `json:"transfer-fee-pay-method" toml:"transfer-fee-pay-method"`

	CommissionRatio     string   `json:"commission-ratio" toml:"commission-ratio"`
	CommissionPayMethod []string `json:"commission-pay-method" toml:"commission-pay-method"`

	StampTaxRatio     string   `json:"stamp-tax-ratio" toml:"stamp-tax-ratio"`
	StampTaxPayMethod []string `json:"stamp-tax-pay-method" toml:"stamp-tax-pay-method"`
}

Jump to

Keyboard shortcuts

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