config

package
v0.0.0-...-85aee89 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Name string `yaml:"name"`
}

App struct

type Config

type Config struct {
	App      App               `yaml:"app"`
	Server   config.HTTPConfig `yaml:"server"`
	Log      log.Config        `yaml:"log"`
	Gorm     Gorm              `yaml:"gorm"`
	MySQL    MySQL             `yaml:"mysql"`
	Redis    Redis             `yaml:"redis"`
	Security Security          `yaml:"security"`
}

Config struct

type Gorm

type Gorm struct {
	Debug             bool   `yaml:"debug"`
	DBType            string `yaml:"dbType"`
	MaxLifetime       int    `yaml:"maxLifetime"`
	MaxOpenConns      int    `yaml:"maxOpenConns"`
	MaxIdleConns      int    `yaml:"maxIdleConns"`
	EnableAutoMigrate bool   `yaml:"enableAutoMigrate"`
}

Gorm config

type MySQL

type MySQL struct {
	Host                      string `yaml:"host"`
	Port                      int    `yaml:"port"`
	User                      string `yaml:"user"`
	Password                  string `yaml:"password"`
	DBName                    string `yaml:"dbName"`
	Parameters                string `yaml:"parameters"`
	DefaultStringSize         uint   `yaml:"defaultStringSize"`
	DisableDatetimePrecision  bool   `yaml:"disableDatetimePrecision"`
	DontSupportRenameIndex    bool   `yaml:"dontSupportRenameIndex"`
	DontSupportRenameColumn   bool   `yaml:"dontSupportRenameColumn"`
	SkipInitializeWithVersion bool   `yaml:"skipInitializeWithVersion"`
}

MySQL config

type Options

type Options struct {
	ConfigFile      string
	CasbinModelFile string
}

Options 配置

type Redis

type Redis struct {
	Address   string `yaml:"address"`
	DB        int    `yaml:"db"`
	Password  string `yaml:"password"`
	KeyPrefix string `yaml:"keyPrefix"`
	SSL       bool   `yaml:"ssl"`
}

Redis config

type Security

type Security struct {
	PermitURLs []string            `yaml:"permitUrls"`
	OAuth2     oauth2Config.OAuth2 `yaml:"oauth2"`
}

Security config

Jump to

Keyboard shortcuts

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