config

package
v0.0.0-...-4343b11 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2022 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Parse

func Parse(path string) error

Parse 解析配置文件,支持本地文件系统和网络链接

func ReadFile

func ReadFile(path string) ([]byte, error)

从本地文件或者http链接读取配置文件内容

Types

type ConfigOptions

type ConfigOptions struct {
	Domain      string   `json:"domain" yaml:"domain"`
	DatabaseUrl string   `json:"database_url" yaml:"database_url"`
	CFEmail     string   `json:"cf_email" yaml:"cf_email"`
	CFKey       string   `json:"cf_key" yaml:"cf_key"`
	SourceFiles []string `json:"source-files" yaml:"source-files"`
}
var Config ConfigOptions

Config 配置

type Source

type Source struct {
	Type    string       `json:"type" yaml:"type"`
	Options tool.Options `json:"options" yaml:"options"`
}

Jump to

Keyboard shortcuts

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