configgen

package
v0.0.0-...-4b6c348 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(filename string, prefix string) error

func Render

func Render(data Data) []byte

Types

type Data

type Data struct {
	PackageName   string
	Fields        []Field
	HasFieldTypes HasFieldTypes
}

func Parse

func Parse(filename string, prefix string) (Data, error)

type Field

type Field struct {
	Name        Name
	Type        string
	Description string
	IsSecret    bool
}

type HasFieldTypes

type HasFieldTypes struct {
	HasString   bool
	HasInt      bool
	HasBool     bool
	HasDuration bool
}

type Name

type Name struct {
	PascalCase         string
	KebabCase          string
	ScreamingSnakeCase string
}

Jump to

Keyboard shortcuts

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