configs

package
v0.0.0-...-9e30f45 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init()

Init 初始化配置

Types

type CConfigs

type CConfigs struct {
	Server CServer `yaml:"server"` // 服务器相关的配置
	Sqlite CSqlite `yaml:"sqlite"` // sqlite 数据库相关的配置
	Files  CFileS  `yaml:"files"`  // 文件管理相关的配置
	Log    CLog    `yaml:"log"`    // 日志相关的配置
}

TConfigs config 配置

var Conf CConfigs

Conf 全局配置

type CFileS

type CFileS struct {
	CopyIn   bool   `yaml:"copy_in"`   // 是否将文件拷贝到程序目录下
	CopyPath string `yaml:"copy_path"` // 文件的根目录
	IsSync   bool   `yaml:"is_sync"`   // 是否同步到远程保存
	SyncTyps string `yaml:"sync_type"` // 同步的方式,百度云,阿里云
}

CFileS 文件保存相关的设置,默认保存位置,数据的分片,分区,跨分区

type CLog

type CLog struct {
	Level    string `yaml:"level"`
	FilePath string `yaml:"file_path"`
}

CLog Log 日志配置

type CServer

type CServer struct {
	Port string `yaml:"port"` // 服务运行的端口
	Name string `yaml:"name"` // 服务名
}

TServe 服务器配置

type CSqlite

type CSqlite struct {
	DBName string `yaml:"db_name"` // 数据库名字
	DBPath string `yaml:"db_path"` // 数据保存的位置
}

CSqlite sqlite 的配置

Jump to

Keyboard shortcuts

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