config

package
v0.0.0-...-f5a2786 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Aliyun

type Aliyun struct {
	Path             string `mapstructure:"path" json:"path" yaml:"path"`
	Bucket           string `mapstructure:"bucket" json:"bucket" yaml:"bucket"`
	AclType          string `mapstructure:"acl-type" json:"aclType" yaml:"acl-type"`
	Endpoint         string `mapstructure:"endpoint" json:"endpoint" yaml:"endpoint"`
	AccessKeyID      string `mapstructure:"access-key-id" json:"accessKeyId" yaml:"access-key-id"`
	SecretAccessKey  string `mapstructure:"secret-access-key" json:"secretAccessKey" yaml:"secret-access-key"`
	StorageClassType string `mapstructure:"storage-class-type" json:"storageClassType" yaml:"storage-class-type"`
}

type Captcha

type Captcha struct {
	KeyLong        int  `mapstructure:"key-long" json:"keyLong" yaml:"key-long"`
	ImageWidth     int  `mapstructure:"image-width" json:"imageWidth" yaml:"image-width"`
	ImageHeight    int  `mapstructure:"image-height" json:"imageHeight" yaml:"image-height"`
	CaptchaInRedis bool `mapstructure:"captcha-in-redis" json:"captcha_in_redis" yaml:"captcha-in-redis"`
}

type Casbin

type Casbin struct {
	ModelPath string `mapstructure:"model-path" json:"modelPath" yaml:"model-path"`
}

type Config

type Config struct {
	Jwt     Jwt     `mapstructure:"jwt" json:"jwt" yaml:"jwt"`
	Redis   Redis   `mapstructure:"redis" json:"redis" yaml:"redis"`
	Email   Email   `mapstructure:"email" json:"email" yaml:"email"`
	Casbin  Casbin  `mapstructure:"casbin" json:"casbin" yaml:"casbin"`
	System  System  `mapstructure:"system" json:"system" yaml:"system"`
	Captcha Captcha `mapstructure:"captcha" json:"captcha" yaml:"captcha"`

	Mysql Mysql `mapstructure:"mysql" json:"mysql" yaml:"mysql"`

	// Oss
	Local  Local  `mapstructure:"local" json:"local" yaml:"local"`
	Qiniu  Qiniu  `mapstructure:"qiniu" json:"qiniu" yaml:"qiniu"`
	Minio  Minio  `mapstructure:"minio" json:"minio" yaml:"minio"`
	Aliyun Aliyun `mapstructure:"aliyun" json:"aliyun" yaml:"aliyun"`
}

type Email

type Email struct {
	To       string `mapstructure:"to" json:"to" yaml:"to"`
	Port     int    `mapstructure:"port" json:"port" yaml:"port"`
	From     string `mapstructure:"from" json:"from" yaml:"from"`
	Host     string `mapstructure:"host" json:"host" yaml:"host"`
	IsSsl    bool   `mapstructure:"is-ssl" json:"isSsl" yaml:"is-ssl"`
	Secret   string `mapstructure:"secret" json:"secret" yaml:"secret"`
	Nickname string `mapstructure:"nickname" json:"nickname" yaml:"nickname"`
}

func (*Email) GetFrom

func (e *Email) GetFrom() string

type Jwt

type Jwt struct {
	ExpiresAt  int    `mapstructure:"expires-at" json:"expiresAt" yaml:"expires-at"`
	RefreshAt  int    `mapstructure:"refresh-at" json:"refreshAt" yaml:"refresh-at"`
	SigningKey string `mapstructure:"signing-key" json:"signingKey" yaml:"signing-key"`
}

type Local

type Local struct {
	Path string `mapstructure:"path" json:"path" yaml:"path"`
}

type Minio

type Minio struct {
	Id       string `mapstructure:"id" json:"id" yaml:"id"`
	Path     string `mapstructure:"path" json:"path" yaml:"path"`
	Token    string `mapstructure:"token" json:"token" yaml:"token"`
	Bucket   string `mapstructure:"bucket" json:"bucket" yaml:"bucket"`
	UseSsl   bool   `mapstructure:"use-ssl" json:"useSsl" yaml:"use-ssl"`
	Secret   string `mapstructure:"secret" json:"secret" yaml:"secret"`
	Endpoint string `mapstructure:"endpoint" json:"endpoint" yaml:"endpoint"`
}

type Mysql

type Mysql struct {
	Path          string `mapstructure:"path" json:"path" yaml:"path"`
	Config        string `mapstructure:"config" json:"config" yaml:"config"`
	Dbname        string `mapstructure:"db-name" json:"dbname" yaml:"db-name"`
	Username      string `mapstructure:"username" json:"username" yaml:"username"`
	Password      string `mapstructure:"password" json:"password" yaml:"password"`
	MaxIdleConnes int    `mapstructure:"max-idle-connes" json:"maxIdleConnes" yaml:"max-idle-connes"`
	MaxOpenConnes int    `mapstructure:"max-open-connes" json:"maxOpenConnes" yaml:"max-open-connes"`
	LogMode       bool   `mapstructure:"log-mode" json:"logMode" yaml:"log-mode"`
	LogZap        string `mapstructure:"log-zap" json:"logZap" yaml:"log-zap"`
}

func (*Mysql) Dsn

func (m *Mysql) Dsn() string

func (*Mysql) GetMaxIdleConnes

func (m *Mysql) GetMaxIdleConnes() int

func (*Mysql) GetMaxOpenConnes

func (m *Mysql) GetMaxOpenConnes() int

type Qiniu

type Qiniu struct {
	Zone          string `mapstructure:"zone" json:"zone" yaml:"zone"`
	Bucket        string `mapstructure:"bucket" json:"bucket" yaml:"bucket"`
	ImgPath       string `mapstructure:"img-path" json:"imgPath" yaml:"img-path"`
	UseHTTPS      bool   `mapstructure:"use-https" json:"useHttps" yaml:"use-https"`
	AccessKey     string `mapstructure:"access-key" json:"accessKey" yaml:"access-key"`
	SecretKey     string `mapstructure:"secret-key" json:"secretKey" yaml:"secret-key"`
	UseCdnDomains bool   `mapstructure:"use-cdn-domains" json:"useCdnDomains" yaml:"use-cdn-domains"`
}

type Redis

type Redis struct {
	DB       int    `mapstructure:"db" json:"db" yaml:"db"`
	Address  string `mapstructure:"address" json:"address" yaml:"address"`
	Password string `mapstructure:"password" json:"password" yaml:"password"`
}

type System

type System struct {
	Env           string `mapstructure:"env" json:"env" yaml:"env"`
	DbType        string `mapstructure:"db-type" json:"dbType" yaml:"db-type"`
	OrmType       string `mapstructure:"orm-type" json:"ormType" yaml:"orm-type"`
	OssType       string `mapstructure:"oss-type" json:"ossType" yaml:"oss-type"`
	ErrorToEmail  bool   `mapstructure:"error-to-email" json:"errorToEmail" yaml:"error-to-email"`
	UseMultipoint bool   `mapstructure:"use-multipoint" json:"UseMultipoint" yaml:"use-multipoint"`
}

Jump to

Keyboard shortcuts

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