Documentation ¶
Index ¶
- Constants
- func EachFieldValue(val reflect.Value, walker func(value reflect.Value) bool)
- func Generate(generator Generator, inputPath, outputPath string)
- func GeneratedSuffix(filename string) string
- func GetServiceName(projectName string) string
- func IsGoFile(filename string) bool
- func IsGoTextFile(filename string) bool
- func PathExist(p string) bool
- func WriteFile(filename string, content string)
- type ClientGenerator
- type DockerGenerator
- type EntryPointPlugins
- type EnumGenerator
- type FilePlugins
- type Generator
- type K8sGenerator
- type OpenApiGenerator
- type Outputs
- type ProjectGenerator
- type ProjectOption
- type ServiceGenerator
- type ServiceOption
Constants ¶
View Source
const ( Image = "${PROFZONE_DOCKER_REGISTRY}/${PROJECT_GROUP}/${PROJECT_NAME}:${PROJECT_VERSION}" FromImage = "${PROFZONE_DOCKER_REGISTRY}/profzone/golang-runtime:1.14" )
Variables ¶
This section is empty.
Functions ¶
func GeneratedSuffix ¶
func GetServiceName ¶
func IsGoTextFile ¶
Types ¶
type ClientGenerator ¶
func NewClientGenerator ¶
func NewClientGenerator(pkgName string) *ClientGenerator
func (*ClientGenerator) Load ¶
func (c *ClientGenerator) Load(path string)
func (*ClientGenerator) Output ¶
func (c *ClientGenerator) Output(outputPath string) Outputs
func (*ClientGenerator) Pick ¶
func (c *ClientGenerator) Pick()
type DockerGenerator ¶
func NewDockerGenerator ¶
func NewDockerGenerator(serviceName string, envVars []envconfig.EnvVar) *DockerGenerator
func (*DockerGenerator) Load ¶
func (d *DockerGenerator) Load(path string)
func (*DockerGenerator) Output ¶
func (d *DockerGenerator) Output(outputPath string) Outputs
func (*DockerGenerator) Pick ¶
func (d *DockerGenerator) Pick()
type EntryPointPlugins ¶
type EntryPointPlugins interface {
GenerateEntryPoint(opt ServiceOption, cwd string) string
}
type EnumGenerator ¶
type EnumGenerator struct { TypeName string // contains filtered or unexported fields }
func NewEnumGenerator ¶
func NewEnumGenerator(typeName string) *EnumGenerator
func (*EnumGenerator) Load ¶
func (e *EnumGenerator) Load(cwd string)
func (*EnumGenerator) Output ¶
func (e *EnumGenerator) Output(outputPath string) Outputs
func (*EnumGenerator) Pick ¶
func (e *EnumGenerator) Pick()
type FilePlugins ¶
type FilePlugins interface {
GenerateFilePoint(opt ServiceOption, cwd string) []*files.GoFile
}
type K8sGenerator ¶
type K8sGenerator struct {
// contains filtered or unexported fields
}
func NewK8sGenerator ¶
func NewK8sGenerator(config []interface{}) *K8sGenerator
func (*K8sGenerator) Load ¶
func (d *K8sGenerator) Load(cwd string)
func (*K8sGenerator) Output ¶
func (d *K8sGenerator) Output(outputPath string) Outputs
func (*K8sGenerator) Pick ¶
func (d *K8sGenerator) Pick()
type OpenApiGenerator ¶
type OpenApiGenerator struct {
// contains filtered or unexported fields
}
func NewOpenApiGenerator ¶
func NewOpenApiGenerator() *OpenApiGenerator
func (*OpenApiGenerator) Load ¶
func (a *OpenApiGenerator) Load(cwd string)
func (*OpenApiGenerator) OperationByOperatorTypes ¶
func (a *OpenApiGenerator) OperationByOperatorTypes(method string, operatorTypes ...*scanner.OperatorWithTypeName) *oas.Operation
func (*OpenApiGenerator) Output ¶
func (a *OpenApiGenerator) Output(outputPath string) Outputs
func (*OpenApiGenerator) Pick ¶
func (a *OpenApiGenerator) Pick()
type Outputs ¶
func (Outputs) WriteFiles ¶
func (outputs Outputs) WriteFiles()
type ProjectGenerator ¶
type ProjectGenerator struct {
// contains filtered or unexported fields
}
func NewProjectGenerator ¶
func NewProjectGenerator(opt ProjectOption) *ProjectGenerator
func (*ProjectGenerator) Load ¶
func (p *ProjectGenerator) Load(path string)
func (*ProjectGenerator) Output ¶
func (p *ProjectGenerator) Output(outputPath string) Outputs
func (*ProjectGenerator) Pick ¶
func (p *ProjectGenerator) Pick()
type ProjectOption ¶
type ServiceGenerator ¶
type ServiceGenerator struct {
// contains filtered or unexported fields
}
func NewServiceGenerator ¶
func NewServiceGenerator(opt ServiceOption) *ServiceGenerator
func (*ServiceGenerator) Load ¶
func (s *ServiceGenerator) Load(path string)
func (*ServiceGenerator) Output ¶
func (s *ServiceGenerator) Output(outputPath string) Outputs
func (*ServiceGenerator) Pick ¶
func (s *ServiceGenerator) Pick()
type ServiceOption ¶
type ServiceOption struct { FrameworkVersion string `survey:"framework_version"` Name string PackageName string `survey:"package_name"` DatabaseSupport expressBool `survey:"database_support"` ApolloSupport expressBool `survey:"apollo_support"` Group string Owner string Desc string Version string ProgramLanguage string `survey:"project_language"` Workflow string }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.