config

package
v0.0.0-...-bbb9de1 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	YamlStorage  = "yaml"
	VaultStorage = "vault"
)

Variables

This section is empty.

Functions

func InitConfig

func InitConfig(path string)

Types

type ConfidentialS

type ConfidentialS struct {
	Storage string `json:"storage" yaml:"storage"`
	Vault   VaultS `json:"vault" yaml:"vault"`
	Yaml    Mysql  `json:"yaml" yaml:"yaml"`
}

type Config

type Config struct {
	Server       ServerS       `json:"server" yaml:"server"`
	Confidential ConfidentialS `json:"confidential" yaml:"confidential"`
	FakeIdentity FakeIdentityS `json:"fakeIdentity" yaml:"fakeIdentity"`
}
var DefaultConfig *Config

func Get

func Get() *Config

type FakeIdentityS

type FakeIdentityS struct {
	Username string `json:"username" yaml:"username"`
	Password string `json:"password" yaml:"password"`
}

type Mysql

type Mysql struct {
	Host     string `json:"host" yaml:"host"`
	Port     int    `json:"port" yaml:"port"`
	Username string `json:"username" yaml:"username"`
	Password string `json:"password" yaml:"password"`
	DBName   string `json:"dbname" yaml:"dbname"`
}

func GetRemoteMysql

func GetRemoteMysql() *Mysql

type ServerS

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

type VaultS

type VaultS struct {
	Addr     string `json:"addr" yaml:"addr"`
	Token    string `json:"token" yaml:"token"`
	DataPath string `json:"dataPath" yaml:"dataPath"`
}

Jump to

Keyboard shortcuts

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