microenums

package
v1.33.0 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MicroEnum

type MicroEnum struct {
	Enum       string                 `yaml:"enum"`
	Values     *orderedmap.OrderedMap `yaml:"values,omitempty"`
	Target     string                 `yaml:"target,omitempty"`
	SourceFile string                 `yaml:"_,omitempty"`
	AllowAlias bool                   `yaml:"alias,omitempty"`
}

holds a single type from microspec

func (MicroEnum) ToMicroEnumAst

func (mt MicroEnum) ToMicroEnumAst() *MicroEnumAst

type MicroEnumAst

type MicroEnumAst struct {
	Type         string                 `yaml:"type"`
	ProtoImports []string               `yaml:"imports"`
	Package      string                 `yaml:"package,omitempty"`
	TargetPath   string                 // to find out the file to write
	Description  string                 `yaml:"description"`
	Values       *orderedmap.OrderedMap `yaml:"values,omitempty"`
	Target       string                 `yaml:"target,omitempty"`
	AllowAlias   bool                   `yaml:"alias,omitempty"`
	SourceFile   string
}

func (MicroEnumAst) Save

func (mAst MicroEnumAst) Save()

func (MicroEnumAst) UpdateEnumAst

func (mAst MicroEnumAst) UpdateEnumAst(ast enumAst.EnumAst)

updates a type ast

type MicroEnumlist

type MicroEnumlist struct {
	MicroEnumsByName    map[string]*MicroEnum
	MicroEnumsASTByName map[string]*MicroEnumAst
	MicroEnums          []*MicroEnum `yaml:"enums"`
}

func (*MicroEnumlist) Unmarshal

func (l *MicroEnumlist) Unmarshal(data []byte)

unmarshal yaml/json to microEnum list

func (*MicroEnumlist) UpateTypelist

func (l *MicroEnumlist) UpateTypelist(typelist *enumAst.Enumlist, deleteSpecs bool, overwriteSpecOptions bool)

Jump to

Keyboard shortcuts

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