config

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2022 License: MulanPSL-2.0 Imports: 8 Imported by: 1

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"`
	RedisUse         string `yaml:"redis_use"`
	CryptAesToken    string `yaml:"crypt.aes.token"`
	CryptRsaPriv     string `yaml:"crypt.rsa.priv"`
	LogFile          string `yaml:"logfile"`
	IsSetupView      string `yaml:"is_setup_view"`
	CrosAllowOrigin  string `yaml:"cros.allow_origin"`
	CrosAllowHeaders string `yaml:"cros.allow_headers"`
	SignatureExclude string `yaml:"signature.exclude"`
}

func CovertConfiguration

func CovertConfiguration() *Configuration

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

func (Configuration) GetActive

func (c Configuration) GetActive() string

func (Configuration) GetCrosAllowHeaders

func (c Configuration) GetCrosAllowHeaders() string

func (Configuration) GetCrosAllowOrigin

func (c Configuration) GetCrosAllowOrigin() []string

func (Configuration) GetCryptAesToken

func (c Configuration) GetCryptAesToken() string

func (Configuration) GetCryptRsaPriv

func (c Configuration) GetCryptRsaPriv() string

func (Configuration) GetDomain

func (c Configuration) GetDomain() string

func (Configuration) GetEs

func (c Configuration) GetEs() []string

GetEs 获取es配置

func (Configuration) GetIsSetupView

func (c Configuration) GetIsSetupView() bool

func (Configuration) GetLogFile

func (c Configuration) GetLogFile() string

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) GetRedisUse

func (c Configuration) GetRedisUse() string

func (Configuration) GetScheme

func (c Configuration) GetScheme() string

func (Configuration) GetSignatureExclude

func (c Configuration) GetSignatureExclude() []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
	GetLogFile() string
	GetIsSetupView() bool
	GetRedisUse() string
	GetCryptAesToken() string
	GetCryptRsaPriv() string
	GetCrosAllowOrigin() []string
	GetSignatureExclude() []string
	GetCrosAllowHeaders() string
	GetEs() []string
	GetMysql() map[string]IMysql
	GetRedis() IRedis
}

ConfigurationReadOnly web 应用基础配置

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