Help us shape the future of Go! Take the 2026 Go Developer Survey

config

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 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"`
	// 组织代码
	Organization string `mapstructure:"organization"`
	// 应用名称
	Appname string `mapstructure:"-"`
	// 服务代码
	ServiceCode string `mapstructure:"-"`
	// 服务包名
	ProtoPackage string `mapstructure:"-"`
	// 服务标题
	ServiceTitle string `mapstructure:"-"`
}

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

type TemplateConfig

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

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

type TemplateService

type TemplateService struct {
	// 服务接口
	APIVersion string `mapstructure:"api-version"`
	// 组织代码
	Organization string
}

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

Jump to

Keyboard shortcuts

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