generator

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2020 License: Apache-2.0 Imports: 40 Imported by: 0

Documentation

Index

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 EachFieldValue added in v1.0.8

func EachFieldValue(val reflect.Value, walker func(value reflect.Value) bool)

func Generate

func Generate(generator Generator, inputPath, outputPath string)

func GeneratedSuffix

func GeneratedSuffix(filename string) string

func IsGoFile

func IsGoFile(filename string) bool

func IsGoTextFile

func IsGoTextFile(filename string) bool

func WriteFile

func WriteFile(filename string, content string)

Types

type ClientGenerator

type ClientGenerator struct {
	Api api.Api
	// contains filtered or unexported fields
}

func NewClientGenerator added in v1.0.2

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

type DockerGenerator struct {
	ServiceName string
	EnvVars     []envconfig.EnvVar
}

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 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 Generator

type Generator interface {
	Load(path string)
	Pick()
	Output(outputPath string) Outputs
}

type K8sGenerator added in v1.0.8

type K8sGenerator struct {
	// contains filtered or unexported fields
}

func NewK8sGenerator added in v1.0.8

func NewK8sGenerator(config []interface{}) *K8sGenerator

func (*K8sGenerator) Load added in v1.0.8

func (d *K8sGenerator) Load(cwd string)

func (*K8sGenerator) Output added in v1.0.8

func (d *K8sGenerator) Output(outputPath string) Outputs

func (*K8sGenerator) Pick added in v1.0.8

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

type Outputs map[string]string

func (Outputs) Add

func (outputs Outputs) Add(filename string, content string)

func (Outputs) WriteFile

func (outputs Outputs) WriteFile(filename string, content string)

func (Outputs) WriteFiles

func (outputs Outputs) WriteFiles()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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