setting

package
v0.0.0-...-7bb2ca5 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Conf = new(AppConfig)

Functions

func Init

func Init(filePath string)

Types

type AppConfig

type AppConfig struct {
	Name         string `mapstructure:"name"`
	Mode         string `mapstructure:"mode"`
	Version      string `mapstructure:"version"`
	StartTime    string `mapstructure:"start_time"`
	Port         int    `mapstructure:"port"`
	Host         string `mapstructure:"host"`
	IsDocker     bool
	*TokenConfig `mapstructure:"token"`
	*LogConfig   `mapstructure:"log"`
	*Datasource  `mapstructure:"datasource"`
	*UploadFile  `mapstructure:"upload_file"`
}

type BerbixConfig

type BerbixConfig struct {
	SecretId    string `mapstructure:"secret_id"`
	TemplateKey string `mapstructure:"template_key"`
}

type Datasource

type Datasource struct {
	Master   *Master   `mapstructure:"master"`
	Slave    *Slave    `mapstructure:"slave"`
	Redis    *Redis    `mapstructure:"redis"`
	RabbitMQ *RabbitMQ `mapstructure:"rabbit_mq"`
}

type Eos

type Eos struct {
	AccessKeyId     string `mapstructure:"access_key_id"`
	SecretAccessKey string `mapstructure:"Secret_access_key"`
	Url             string `mapstructure:"url"`
	BucketName      string `mapstructure:"bucket_name"`
}

type Localhost

type Localhost struct {
	PublicResourcePrefix  string `mapstructure:"public_resource_prefix"`
	PrivateResourcePrefix string `mapstructure:"private_resource_prefix"`
}

type LogConfig

type LogConfig struct {
	Level      string `mapstructure:"level"`
	Filename   string `mapstructure:"filename"`
	MaxSize    int    `mapstructure:"max_size"`
	MaxAge     int    `mapstructure:"max_age"`
	MaxBackups int    `mapstructure:"max_backups"`
}

type Master

type Master struct {
	DriverName   string `mapstructure:"driver_name"`
	Host         string `mapstructure:"host"`
	User         string `mapstructure:"user"`
	Password     string `mapstructure:"password"`
	DB           string `mapstructure:"dbname"`
	Port         int    `mapstructure:"port"`
	MaxOpenConns int    `mapstructure:"max_open_conns"`
	MaxIdleConns int    `mapstructure:"max_idle_conns"`
}

type PlaidConfig

type PlaidConfig struct {
	PlaidClientId string `mapstructure:"plaid_client_id"`
	PlaidSecret   string `mapstructure:"plaid_secret"`
	PlaidEnv      string `mapstructure:"plaid_env"`
}

type RabbitMQ

type RabbitMQ struct {
	Host     string `mapstructure:"host"`
	Port     int    `mapstructure:"port"`
	User     string `mapstructure:"user"`
	Password string `mapstructure:"password"`
}

type Redis

type Redis struct {
	Host         string `mapstructure:"host"`
	Password     string `mapstructure:"password"`
	Port         int    `mapstructure:"port"`
	DB           int    `mapstructure:"db"`
	PoolSize     int    `mapstructure:"pool_size"`
	MinIdleConns int    `mapstructure:"min_idle_conns"`
}

type S3

type S3 struct {
	AccessKeyId     string `mapstructure:"access_key_id"`
	SecretAccessKey string `mapstructure:"Secret_access_key"`
	Region          string `mapstructure:"region"`
	BucketName      string `mapstructure:"bucket_name"`
}

type Slave

type Slave struct {
	Count        int      `mapstructure:"count"`
	DriverName   string   `mapstructure:"driver_name"`
	Hosts        []string `mapstructure:"hosts"`
	Users        []string `mapstructure:"users"`
	Passwords    []string `mapstructure:"passwords"`
	DBs          []string `mapstructure:"dbnames"`
	Ports        []int    `mapstructure:"ports"`
	MaxOpenConns int      `mapstructure:"max_open_conns"`
	MaxIdleConns int      `mapstructure:"max_idle_conns"`
}

type TokenConfig

type TokenConfig struct {
	ExpireTime int64  `mapstructure:"expire_time"`
	Secret     string `mapstructure:"secret"`
	Issuer     string `mapstructure:"issuer"`
}

type UploadFile

type UploadFile struct {
	Type       string `mapstructure:"type"`
	DomainName string `mapstructure:"domain_name"`
	*S3        `mapstructure:"s3"`
	*Eos       `mapstructure:"eos"`
	*Localhost `mapstructure:"localhost"`
}

Jump to

Keyboard shortcuts

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