config

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2023 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Global   GlobalConfig   `mapstructure:"global"`
	Template TemplateConfig `mapstructure:"template"`
}

Config 用于表示配置文件的根结构

type GlobalConfig

type GlobalConfig struct {
	// 创建模版的类型
	Type string `mapstructure:"-"`
	// 接口网关地址
	APIEndpoint string `mapstructure:"api_endpoint"`
	// GIT代码仓库的域名
	GitDomain string `mapstructure:"git_domain"`
	// 服务所在的产品代号
	ProductCode string `mapstructure:"product_code"`
	// 服务的名称
	ShortName string
	// cli的版本
	ReleaseVersion string `mapstructure:"release_version"`
	// 代码仓库地址
	Repository string `mapstructure:"repository"`
}

GlobalConfig 用于表示全局通用配置结构

type TemplateConfig

type TemplateConfig struct {
	Service TemplateService `mapstructure:"service"`
}

TemplateConfig 用于表示各代码类型的模版配置结构

type TemplateService

type TemplateService struct {
	// 服务的接口版本
	APIVersion string `mapstructure:"api-version"`
}

TemplateService 用于表示微服务类型模版的配置结构

Jump to

Keyboard shortcuts

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