config

package
v2.0.10 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2022 License: MulanPSL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type Configuration

type Configuration struct {
	Active      string `yaml:"active"`
	Domain      string `yaml:"domain"`
	Port        string `yaml:"port"`
	Scheme      string `yaml:"scheme"`
	Sock        string `yaml:"sock"`
	Timezone    string `yaml:"timezone"`
	SwaggerPort string `yaml:"swagger.port"`
	Es          string `yaml:"es"`
	Mysql       string `yaml:"mysql"`
	Redis       string `yaml:"redis"`
}

func CovertConfiguration

func CovertConfiguration() *Configuration

CovertConfiguration struct tag 指定为属性值,方便操作

func (Configuration) GetActive

func (c Configuration) GetActive() string

func (Configuration) GetDomain

func (c Configuration) GetDomain() string

func (Configuration) GetEs

func (c Configuration) GetEs() []string

GetEs 获取es配置

func (Configuration) GetMysql

func (c Configuration) GetMysql() map[string]IMysql

func (Configuration) GetPort

func (c Configuration) GetPort() string

func (Configuration) GetRedis

func (c Configuration) GetRedis() IRedis

func (Configuration) GetScheme

func (c Configuration) GetScheme() string

func (Configuration) GetSock

func (c Configuration) GetSock() string

GetSock 获取socket文件地址

func (Configuration) GetSwaggerPort

func (c Configuration) GetSwaggerPort() string

func (Configuration) GetSwaggerUrl

func (c Configuration) GetSwaggerUrl() string

func (Configuration) GetTimezone

func (c Configuration) GetTimezone() string

func (Configuration) GetUrl

func (c Configuration) GetUrl() string

type ConfigurationReadOnly

type ConfigurationReadOnly interface {
	GetActive() string
	GetUrl() string
	GetSwaggerUrl() string
	GetDomain() string
	GetPort() string
	GetTimezone() string
	GetSock() string
	GetSwaggerPort() string
	GetScheme() string
	GetEs() []string
	GetMysql() map[string]IMysql
	GetRedis() IRedis
}

type IMinio

type IMinio interface {
	GetEndpoint() string
	GetAccessKeyID() string
	GetSecretAccessKey() string
	GetUseSSL() bool
}

func GetMinio

func GetMinio() IMinio

type IMysql

type IMysql interface {
	GetHost() string
	GetPort() int
	GetUser() string
	GetPassword() string
	GetDatabase() string
	GetCharset() string
}

type IRedis

type IRedis interface {
	GetHost() string
	GetPort() int
	GetUsername() string
	GetPassword() string
	GetDb() int
}

type IRedisCluster

type IRedisCluster interface {
	GetHosts() []string
	GetUsername() string
	GetPassword() string
}

func GetRedisCluster

func GetRedisCluster() IRedisCluster

type ISqlite

type ISqlite interface {
	GetTimezone() string
	GetStorageFile() string
}

func GetSqlite

func GetSqlite() ISqlite

Jump to

Keyboard shortcuts

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