config

package
v0.0.0-...-eec7a18 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Version = "0000000 [ 2020/10/31 09:46:00 ]"

Version 版本号 用于 ORM 模块判断是否需要进行数据库结构自动迁移 用于输入版本信息到响应头 设置为距离当前时间较为久远的项目创始时间,避免每次调试时都需要自动同步数据库 可以通过编译的方式指定版本号:go build -ldflags "-X main.VERSION=x.x.x"

Functions

func Get

func Get() structs.SystemConfig

Get 获取配置 供系统内部调用 , 获取当前配置, 不对外直接暴露配置变量

func Init

func Init(orm *gorm.DB) error

Init 初始化配置

func Update

func Update(orm *gorm.DB, newConfig structs.SystemConfig)

Update 修改配置 供系统内部调用 , 更新当前配置, 不对外直接暴露配置变量

Types

This section is empty.

Jump to

Keyboard shortcuts

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