conf

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2024 License: GPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Name    string `yaml:"name" json:"name"`
	Version string `yaml:"version" json:"version"`
	Node    int64  `yaml:"node" json:"node"`
}

type Auth

type Auth struct {
	JWT struct {
		AccessSecret string `yaml:"access_secret" json:"access_secret"`
		AccessExpire int64  `yaml:"access_expire" json:"access_expire"`
	} `yaml:"jwt" json:"jwt"`
}

type Components

type Components struct {
	MySQL  MySQL  `yaml:"mysql" json:"mysql"`
	Redis  Redis  `yaml:"redis" json:"redis"`
	Consul Consul `yaml:"consul" json:"consul"`
}

type Config

type Config struct {
	App        App        `yaml:"app" json:"app"`
	Server     Server     `yaml:"server" json:"server"`
	Auth       Auth       `yaml:"auth" json:"auth"`
	Components Components `yaml:"components" json:"components"`
}

type Consul

type Consul struct {
	Default struct {
		Address string `yaml:"address" json:"address"`
	}
}

type MySQL

type MySQL struct {
	Default struct {
		Host     string `yaml:"host" json:"host"`
		Port     int    `yaml:"port" json:"port"`
		DBName   string `yaml:"db_name" json:"db_name"`
		User     string `yaml:"user" json:"user"`
		Password string `yaml:"password" json:"password"`
	} `yaml:"default" json:"default"`
}

type Redis

type Redis struct {
	Default struct {
		DSN      string `yaml:"dsn" json:"dsn"`
		Password string `yaml:"password" json:"password"`
	} `yaml:"default" json:"default"`
}

type Server

type Server struct {
	Grpc struct {
		Addr string `yaml:"addr" json:"addr"`
	} `yaml:"grpc" json:"grpc"`
}

Jump to

Keyboard shortcuts

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