config

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConfigFile

func GetConfigFile() string

func SetConfigFile

func SetConfigFile(file string)

func SetDecoder

func SetDecoder(d func(in []byte, out interface{}) (err error))

Types

type CommandConfig

type CommandConfig struct {
	Upload UploadConfig `yaml:"Upload" json:"upload"`
	Hexo   HexoConfig   `yaml:"Hexo" json:"hexo"`
}

func GetCommandConfig

func GetCommandConfig(ctx context.Context) (*CommandConfig, error)

type HexoConfig

type HexoConfig struct {
	Ignore  []string `yaml:"Ignore,omitempty" json:"ignore"`
	KeyWord []string `yaml:"KeyWord,omitempty" json:"key_word"`
}

type OSSConfig

type OSSConfig struct {
	AccessKeyId     string `yaml:"AccessKeyId" json:"access_key_id"`
	AccessKeySecret string `yaml:"AccessKeySecret" json:"access_key_secret"`
	Endpoint        string `yaml:"Endpoint" json:"endpoint"`
	UrlEndpoint     string `yaml:"UrlEndpoint" json:"url_endpoint"`
	Bucket          string `yaml:"Bucket" json:"bucket"`
	PathPrefix      string `yaml:"PathPrefix" json:"path_prefix"`
}

type UploadConfig

type UploadConfig struct {
	Bucket map[string]OSSConfig `yaml:"Bucket" json:"bucket"`
}

Jump to

Keyboard shortcuts

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