files

package
v1.0.10 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnvVar

func EnvVar(key string) string

func EnvVarInBash added in v1.0.9

func EnvVarInBash(key string) string

func EnvVarInDocker

func EnvVarInDocker(key string) string

func GetDockerfileTemplate

func GetDockerfileTemplate(d Dockerfile) string

Types

type ClientEnumsFile

type ClientEnumsFile struct {
	PackageName string
	Importer    *importer.PackageImporter
	// contains filtered or unexported fields
}

func NewClientEnumsFile

func NewClientEnumsFile(outputPath, serviceName string, a *api.Api) *ClientEnumsFile

func (*ClientEnumsFile) String

func (f *ClientEnumsFile) String() string

func (*ClientEnumsFile) WriteAll

func (f *ClientEnumsFile) WriteAll() string

func (*ClientEnumsFile) WriteImports

func (f *ClientEnumsFile) WriteImports(w io.Writer) (err error)

func (*ClientEnumsFile) WritePackage

func (f *ClientEnumsFile) WritePackage(w io.Writer) (err error)

type ClientFile

type ClientFile struct {
	ClientName  string
	PackageName string
	Name        string
	Importer    *importer.PackageImporter
	// contains filtered or unexported fields
}

func NewClientFile

func NewClientFile(name string, a *api.Api) *ClientFile

func (*ClientFile) String

func (c *ClientFile) String() string

func (*ClientFile) WriteAll

func (c *ClientFile) WriteAll() string

func (*ClientFile) WriteClientGeneral

func (c *ClientFile) WriteClientGeneral(w io.Writer) (err error)

func (*ClientFile) WriteImports

func (c *ClientFile) WriteImports(w io.Writer) (err error)

func (*ClientFile) WriteMethods

func (c *ClientFile) WriteMethods(w io.Writer) (err error)

func (*ClientFile) WritePackage

func (c *ClientFile) WritePackage(w io.Writer) (err error)

func (*ClientFile) WriteTypeInterface

func (c *ClientFile) WriteTypeInterface(w io.Writer) (err error)

type ConfigDefaultFile

type ConfigDefaultFile struct {
	EnvVars []envconfig.EnvVar
}

func NewConfigDefaultFile

func NewConfigDefaultFile(envVars []envconfig.EnvVar) *ConfigDefaultFile

func (*ConfigDefaultFile) String

func (f *ConfigDefaultFile) String() string

type Dockerfile

type Dockerfile struct {
	From       string            `docker:"FROM" yaml:"from,omitempty"`
	Image      string            `yaml:"image"`
	Label      map[string]string `docker:"LABEL,multi" yaml:"label,omitempty"`
	Run        string            `docker:"RUN,inline" yaml:"run,omitempty"`
	WorkDir    string            `docker:"WORKDIR" yaml:"workdir,omitempty"`
	Env        map[string]string `docker:"ENV,multi" yaml:"env,omitempty"`
	Add        map[string]string `docker:"ADD,join" yaml:"add,omitempty"`
	Expose     []string          `docker:"EXPOSE" yaml:"expose,omitempty"`
	Volume     []string          `docker:"VOLUME,array" yaml:"volume,omitempty"`
	Cmd        []string          `docker:"CMD,array" yaml:"cmd,omitempty"`
	EntryPoint []string          `docker:"ENTRYPOINT,array" yaml:"entrypoint,omitempty"`
}

func (Dockerfile) AddContent

func (d Dockerfile) AddContent(from string, to string) *Dockerfile

func (Dockerfile) AddEnv

func (d Dockerfile) AddEnv(key string, value string) *Dockerfile

func (Dockerfile) AddLabel

func (d Dockerfile) AddLabel(label string, content string) *Dockerfile

func (*Dockerfile) String

func (d *Dockerfile) String() string

func (Dockerfile) WithCmd

func (d Dockerfile) WithCmd(cmd ...string) *Dockerfile

func (Dockerfile) WithExpose

func (d Dockerfile) WithExpose(exposes ...string) *Dockerfile

func (Dockerfile) WithVolume

func (d Dockerfile) WithVolume(volumes ...string) *Dockerfile

func (Dockerfile) WithWorkDir

func (d Dockerfile) WithWorkDir(dir string) *Dockerfile

type Enum

type Enum struct {
	PackagePath string
	PackageName string
	Name        string
	Options     api.Enum
	Importer    *importer.PackageImporter
	HasOffset   bool
}

func NewEnum

func NewEnum(packagePath, packageName, name string, options api.Enum, hasOffset bool) *Enum

func (*Enum) ConstKey

func (e *Enum) ConstKey(key interface{}) string

func (*Enum) ConstOffset

func (e *Enum) ConstOffset() string

func (*Enum) ConstPrefix

func (e *Enum) ConstPrefix() string

func (*Enum) ConstUnknown

func (e *Enum) ConstUnknown() string

func (*Enum) InvalidErrorString

func (e *Enum) InvalidErrorString() string

func (*Enum) String

func (e *Enum) String() string

func (*Enum) WriteAll

func (e *Enum) WriteAll() string

func (*Enum) WriteEnumDefinition

func (e *Enum) WriteEnumDefinition(w io.Writer) (err error)

func (*Enum) WriteEnumDescriptor

func (e *Enum) WriteEnumDescriptor(w io.Writer) (err error)

func (*Enum) WriteImports

func (e *Enum) WriteImports(w io.Writer) (err error)

func (*Enum) WriteInitFunc

func (e *Enum) WriteInitFunc(w io.Writer) (err error)

func (*Enum) WriteLabeler

func (e *Enum) WriteLabeler(w io.Writer) (err error)

func (*Enum) WritePackage

func (e *Enum) WritePackage(w io.Writer) (err error)

func (*Enum) WriteParseFromLabelStringFunc

func (e *Enum) WriteParseFromLabelStringFunc(w io.Writer) (err error)

func (*Enum) WriteParseFromStringFunc

func (e *Enum) WriteParseFromStringFunc(w io.Writer) (err error)

func (*Enum) WriteScannerAndValuer

func (e *Enum) WriteScannerAndValuer(w io.Writer) (err error)

func (*Enum) WriteStringer

func (e *Enum) WriteStringer(w io.Writer) (err error)

func (*Enum) WriteTextMarshalerAndUnmarshaler

func (e *Enum) WriteTextMarshalerAndUnmarshaler(w io.Writer) (err error)

func (*Enum) WriteVars

func (e *Enum) WriteVars(w io.Writer) (err error)

type GoFile added in v1.0.9

type GoFile struct {
	PackageName string
	*importer.PackageImporter
	// contains filtered or unexported fields
}

func NewGoFile added in v1.0.9

func NewGoFile(pkgName string) *GoFile

func (*GoFile) String added in v1.0.9

func (f *GoFile) String() string

func (*GoFile) WithBlock added in v1.0.9

func (f *GoFile) WithBlock(tpl string) *GoFile

type ModFile added in v1.0.9

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

func NewModFile added in v1.0.9

func NewModFile(name, version string) *ModFile

func (*ModFile) AddReplace added in v1.0.9

func (m *ModFile) AddReplace(fromPkg, fromVer, toPkg, toVer string) *ModFile

func (*ModFile) AddRequired added in v1.0.9

func (m *ModFile) AddRequired(pkg, ver string) *ModFile

func (*ModFile) String added in v1.0.9

func (m *ModFile) String() string

type ModReplace added in v1.0.9

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

func NewModReplace added in v1.0.9

func NewModReplace(fromPkg, fromVer, toPkg, toVer string) ModReplace

func (ModReplace) String added in v1.0.9

func (r ModReplace) String() string

type ModRequired added in v1.0.9

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

func NewModRequired added in v1.0.9

func NewModRequired(pkg, ver string) ModRequired

func (ModRequired) String added in v1.0.9

func (r ModRequired) String() string

type TypesFile

type TypesFile struct {
	PackageName string
	Importer    *importer.PackageImporter
	// contains filtered or unexported fields
}

func NewTypesFile

func NewTypesFile(serviceName string, a *api.Api) *TypesFile

func (*TypesFile) String

func (f *TypesFile) String() string

func (*TypesFile) WriteAll

func (f *TypesFile) WriteAll() string

func (*TypesFile) WriteDefinition

func (f *TypesFile) WriteDefinition(w io.Writer) (err error)

func (*TypesFile) WriteImports

func (f *TypesFile) WriteImports(w io.Writer) (err error)

func (*TypesFile) WritePackage

func (f *TypesFile) WritePackage(w io.Writer) (err error)

Jump to

Keyboard shortcuts

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