configs

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init()

Types

type Common

type Common struct {
	Cache             string        `ini:"cache" json:"cache" yaml:"cache"`
	HeartBeat         time.Duration `ini:"heart_beat" json:"heart_beat" yaml:"heart_beat"`                               // 心跳检测走起
	SshTimeout        time.Duration `ini:"ssh_timeout" json:"ssh_timeout" yaml:"ssh_timeout"`                            // ssh连接超时
	EnablePass        bool          `ini:"enable_pass" json:"enable_pass" yaml:"enable_pass"`                            // 启用系统登录
	EnableAliEcs      bool          `ini:"enable_ali_ecs" json:"enable_ali_ecs" yaml:"enable_ali_ecs"`                   // 开启阿里ECS
	RingBufferLogSize int           `ini:"log_ring_buffer_size" yaml:"log_ring_buffer_size" json:"log_ring_buffer_size"` // 环形缓冲区 日志 大小
}

type Config

type Config struct {
	Common                `json:"common" yaml:"common"`
	httpServer.HttpServer `json:"http_server" yaml:"http_server"`
	Router                `json:"router" yaml:"router"`
	session.Options       `yaml:"session" json:"session"`
	Db                    db.Dbbase `yaml:"db"`
	SessionConfig         `yaml:"session_config" json:"session_config"`
}

func Get

func Get() *Config

type Router

type Router struct {
	router.Router    `json:"router" yaml:"router"`
	router.LoginInfo `json:"login_info" yaml:"login_info"`
}

type SessionConfig

type SessionConfig struct {
	SessionEngine   cachemgr.Driver `ini:"session_engine" yaml:"session_engine" json:"session_engine"`          // session引擎 memory file redis db
	SessionFilePath string          `ini:"session_file_path" yaml:"session_file_path" json:"session_file_path"` // session文件路径
}

Jump to

Keyboard shortcuts

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