db

package
v3.1.3 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2023 License: GPL-3.0 Imports: 6 Imported by: 32

Documentation

Index

Constants

View Source
const ENV = "IOT_MASTER_DATABASE_"

Variables

View Source
var Engine *xorm.Engine

Functions

func Close

func Close() error

func Load added in v3.1.0

func Load() error

func Open

func Open() error

func SetOptions added in v3.1.0

func SetOptions(opts Options)

func Store added in v3.1.0

func Store() error

Types

type Options

type Options struct {
	Type     string `json:"type"`
	URL      string `json:"url"`
	Debug    bool   `json:"debug,omitempty"`
	LogLevel int    `json:"log_level"`
}

Options 参数

func Default

func Default() Options

func GetOptions added in v3.1.0

func GetOptions() Options

func (*Options) FromEnv added in v3.1.0

func (options *Options) FromEnv()

func (*Options) ToEnv added in v3.1.0

func (options *Options) ToEnv() []string

Jump to

Keyboard shortcuts

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