configs

package
v1.3.9 Latest Latest
Warning

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

Go to latest
Published: May 20, 2024 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadDBConfig added in v1.3.9

func LoadDBConfig() (*dbs.Config, error)

func ResetAPIConfig added in v0.5.6

func ResetAPIConfig() error

ResetAPIConfig 重置配置

Types

type APIConfig

type APIConfig struct {
	NodeId string `yaml:"nodeId" json:"nodeId"`
	Secret string `yaml:"secret" json:"secret"`
	// contains filtered or unexported fields
}

APIConfig API节点配置

func SharedAPIConfig

func SharedAPIConfig() (*APIConfig, error)

SharedAPIConfig 获取共享配置

func (*APIConfig) NumberId

func (this *APIConfig) NumberId() int64

NumberId 获取数字ID

func (*APIConfig) SetNumberId

func (this *APIConfig) SetNumberId(numberId int64)

SetNumberId 设置数字ID

func (*APIConfig) WriteFile

func (this *APIConfig) WriteFile(path string) error

WriteFile 保存到文件

type SimpleDBConfig added in v1.3.9

type SimpleDBConfig struct {
	User       string   `yaml:"user"`
	Password   string   `yaml:"password"`
	Database   string   `yaml:"database"`
	Host       string   `yaml:"host"`
	BoolFields []string `yaml:"boolFields,omitempty"`
}

func ParseSimpleDBConfig added in v1.3.9

func ParseSimpleDBConfig(data []byte) (*SimpleDBConfig, error)

func (*SimpleDBConfig) GenerateOldConfig added in v1.3.9

func (this *SimpleDBConfig) GenerateOldConfig() error

Jump to

Keyboard shortcuts

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