configs

package
v0.3.6 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2021 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Secret = ""

Functions

func ResetAPIConfig added in v0.1.0

func ResetAPIConfig() error

ResetAPIConfig 重置配置

func WritePlusConfig added in v0.2.8

func WritePlusConfig(config *PlusConfig) error

Types

type APIConfig

type APIConfig struct {
	RPC struct {
		Endpoints []string `yaml:"endpoints"`
	} `yaml:"rpc"`
	NodeId string `yaml:"nodeId"`
	Secret string `yaml:"secret"`
}

APIConfig API配置

func LoadAPIConfig

func LoadAPIConfig() (*APIConfig, error)

LoadAPIConfig 加载API配置

func (*APIConfig) WriteFile

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

WriteFile 写入API配置

type PlusConfig added in v0.2.8

type PlusConfig struct {
	IsPlus bool `json:"isPlus"`
}

func ReadPlusConfig added in v0.2.8

func ReadPlusConfig() *PlusConfig

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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