enumAst

package
v1.36.0 Latest Latest
Warning

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

Go to latest
Published: May 17, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Format = "json"

Functions

This section is empty.

Types

type EnumAst

type EnumAst struct {
	SpecDir  string // the base path, like specDir or dependencies/x.y.com/specDir
	Path     string // relative path of spec file to SpecDir
	FileName string
	EnumSpec specSpec.Enum
}

func (*EnumAst) GetProtoTarget

func (a *EnumAst) GetProtoTarget() (proto string)

func (*EnumAst) Save

func (a *EnumAst) Save(specDir string)

Stores the spec to disc

func (*EnumAst) ToJson

func (a *EnumAst) ToJson() (d []byte, err error)

func (*EnumAst) ToJsonFlat

func (a *EnumAst) ToJsonFlat() (d []byte, err error)

returns unindented json

func (*EnumAst) ToYaml

func (a *EnumAst) ToYaml() (d []byte, err error)

type Enumlist

type Enumlist struct {
	EnumsByName          map[string]*EnumAst
	InstalledEnumsByName map[string]*EnumAst
	AllAvailabeEnums     map[string]*EnumAst // installed and project enums together
	SpecDir              string
}

func (*Enumlist) DeleteType

func (l *Enumlist) DeleteType(typename string)

Deletes the spec from disk and removes the element from List

func (*Enumlist) LoadEnumSpecsFromDir

func (l *Enumlist) LoadEnumSpecsFromDir(specDir string)

loads a spec directory and installed specs to the typelist

func (*Enumlist) LoadInstalledEnumSpecsFromDir

func (l *Enumlist) LoadInstalledEnumSpecsFromDir(specDir ...string)

loads a spec directory and installed specs to the typelist

func (Enumlist) ResolveFullQualifiedTypeName

func (l Enumlist) ResolveFullQualifiedTypeName(typename string, pkg string) string

full name from c++ style name

func (*Enumlist) ResolveProtoImportForType

func (l *Enumlist) ResolveProtoImportForType(typeName string, pkg string) (imp string, typeFound bool)

func (*Enumlist) SaveAllEnumSpecsToDir

func (l *Enumlist) SaveAllEnumSpecsToDir(specDir string)

stores the typelist to the spec directory

Jump to

Keyboard shortcuts

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