config

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package config 用于配置项的各类定义

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB struct {
	// 表示数据库的类型
	//
	// 目前支持以下几种类型:
	//  - sqlite3
	//  - sqlite 纯 Go
	//  - mysql
	//  - mariadb
	//  - postgres
	Type string `yaml:"type" json:"type" xml:"type,attr"`

	// 连接数据库的参数
	DSN string `yaml:"dsn" json:"dsn" xml:"dsn"`
	// contains filtered or unexported fields
}

DB 数据库的配置文件格式

func (*DB) DB

func (conf *DB) DB() *orm.DB

func (*DB) SanitizeConfig

func (conf *DB) SanitizeConfig() *app.ConfigError

Jump to

Keyboard shortcuts

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