config

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2025 License: Apache-2.0 Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Config   *Configuration
	Version  = "v0.4.0"
	URL      = URLProd
	URLProd  = "https://anssl.cn/deploy"
	URLLocal = "http://localhost:9000/deploy"
)

Functions

func Init

func Init(configFile string) error

Init 初始化配置

Types

type Configuration

type Configuration struct {
	Server   *ServerConfig `yaml:"server"`
	SSL      *SSLConfig    `yaml:"ssl"`
	Update   *UpdateConfig `yaml:"update"`
	Provider []*Provider   `yaml:"provider"`
}

Configuration 应用配置结构

func GetConfig

func GetConfig() *Configuration

GetConfig 获取配置

type Provider

type Provider struct {
	Name   string `yaml:"name"`
	Remark string `yaml:"remark"`
	// 阿里云
	AccessKeyId     string `yaml:"accessKeyId"`
	AccessKeySecret string `yaml:"accessKeySecret"`
	// 腾讯云
	SecretId  string `yaml:"secretId"`
	SecretKey string `yaml:"secretKey"`
	// 七牛云
	AccessKey    string `yaml:"accessKey"`
	AccessSecret string `yaml:"accessSecret"`
}

func GetProvider

func GetProvider(name string) *Provider

GetProvider 获取提供商配置

type SSLConfig

type SSLConfig struct {
	Path string `yaml:"path"`
}

type ServerConfig

type ServerConfig struct {
	AccessKey string `yaml:"accessKey"`
	Env       string `yaml:"env"`
}

type UpdateConfig

type UpdateConfig struct {
	// 镜像源类型: github(默认), ghproxy, fastgit, custom
	Mirror string `yaml:"mirror"`
	// 自定义镜像地址(当 mirror=custom 时使用)
	CustomURL string `yaml:"customUrl"`
	// HTTP 代理地址
	Proxy string `yaml:"proxy"`
}

Jump to

Keyboard shortcuts

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