configs

package
v1.3.8 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const ConfigFileName = "api_admin.yaml"

Variables

View Source
var Secret = ""

Functions

func IsNewInstalled added in v1.2.7

func IsNewInstalled() bool

func ResetAPIConfig added in v0.1.0

func ResetAPIConfig() error

ResetAPIConfig 重置配置

Types

type APIConfig

type APIConfig struct {
	OldRPC struct {
		Endpoints     []string `yaml:"endpoints"`
		DisableUpdate bool     `yaml:"disableUpdate"`
	} `yaml:"rpc,omitempty"`

	RPCEndpoints     []string `yaml:"rpc.endpoints,flow" json:"rpc.endpoints"`
	RPCDisableUpdate bool     `yaml:"rpc.disableUpdate" json:"rpc.disableUpdate"`

	NodeId string `yaml:"nodeId"`
	Secret string `yaml:"secret"`
}

APIConfig API配置

func LoadAPIConfig

func LoadAPIConfig() (*APIConfig, error)

LoadAPIConfig 加载API配置

func (*APIConfig) Clone added in v0.6.4

func (this *APIConfig) Clone() *APIConfig

Clone 克隆当前配置

func (*APIConfig) Init added in v1.2.7

func (this *APIConfig) Init() error

func (*APIConfig) WriteFile

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

WriteFile 写入API配置

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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