config

package
v0.0.0-...-a470c86 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AliyunConfig

type AliyunConfig struct {
	RdsDBInstanceID string `yaml:"rds_db_instance_id"`
	AccessKeyID     string `yaml:"access_key_id"`
	AccessKeySecret string `yaml:"access_key_secret"`
	Region          string `yaml:"region"`
}

AliyunConfig aliyun config

type Config

type Config struct {
	Version              string
	BaseDir              string `yaml:"base_dir"`
	Stage                string
	MainDomain           string `yaml:"main_domain"`
	PostgresqlConnString string `yaml:"postgresql_conn_string"`
	Logger               LoggerConfig
	Postgresql           PostgresqlConfig
	Redis                RedisConfig
	RocketMQ             RocketMQConfig
	Kafka                KafkaConfig
	MongoDB              MongodbConfig
	InternalServer       InternalServer `yaml:"internal_server"`
	TracingEndpoint      string         `yaml:"tracing_endpoint"`
	JwtSecret            string         `yaml:"jwt_secret"`
	MigrationPath        string         `yaml:"migration_path"`
}

Config is the type used for storing configurations

func Load

func Load(stage string) (Config, error)

Load returns an application config from the file given the current env

type InternalServer

type InternalServer struct {
	Product string
}

type JenkinsConfig

type JenkinsConfig struct {
	Endpoint string
	Token    string
	User     string
	Password string
}

JenkinsConfig jenkins config

type KafkaConfig

type KafkaConfig struct {
	Host string
	Port string
}

type LoggerConfig

type LoggerConfig struct {
	Endpoint        string `yaml:"endpoint"`
	AccessKeyID     string `yaml:"access_key_id"`
	AccessKeySecret string `yaml:"access_key_secret"`
	Project         string `yaml:"project"`
	Logstore        string `yaml:"logstore"`
}

type MongodbConfig

type MongodbConfig struct {
	Name     string
	Host     string
	Port     string
	User     string
	Password string
}

type OSSConfig

type OSSConfig struct {
	AccessKeyID     string `yaml:"access_key_id"`
	AccessKeySecret string `yaml:"access_key_secret"`
	BucketName      string `yaml:"bucket_name"`
	EndPoint        string `yaml:"endpoint"`
	BaseURL         string `yaml:"base_url"`
}

OSSConfig is oss configuration

type PostgresqlConfig

type PostgresqlConfig struct {
	User     string
	Password string
	Name     string
	Host     string
	Port     string
	SSLMode  string
}

type RedisConfig

type RedisConfig struct {
	Host     string
	Password string
	Port     string
}

RedisConfig redis config

type RocketMQConfig

type RocketMQConfig struct {
	Host           string `yaml:"host"`
	NameServerPort string `yaml:"name_server_port"`
	BrokerPort     string `yaml:"broker_port"`
}

Jump to

Keyboard shortcuts

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