microtypes

package
v1.24.2 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FieldMap

type FieldMap struct {
	Readonly     bool
	Required     bool
	Repeated     bool
	Type         string
	DefaultValue string
	Description  string
	FieldId      int32
}

field string will be converted to this type this type will be converted to fieldmap

func NewFieldMap

func NewFieldMap() FieldMap

func (*FieldMap) ParseFieldString

func (m *FieldMap) ParseFieldString(s string)

type MicroType

type MicroType struct {
	Type       string                 `yaml:"type"`
	Fields     *orderedmap.OrderedMap `yaml:"fields,omitempty"`
	Target     string                 `yaml:"target,omitempty"`
	SourceFile string                 `yaml:"_,omitempty"`
}

holds a single type from microspec

func (MicroType) ToMicroTypeAst

func (mt MicroType) ToMicroTypeAst() *MicroTypeAst

type MicroTypeAst

type MicroTypeAst 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"`
	Fields       *orderedmap.OrderedMap `yaml:"fields,omitempty"`
	Target       string                 `yaml:"target,omitempty"`
	MakeEntity   bool

	SourceFile string
	// contains filtered or unexported fields
}

func (MicroTypeAst) Save added in v1.7.0

func (mAst MicroTypeAst) Save()

func (MicroTypeAst) UpdateTypeAst

func (mAst MicroTypeAst) UpdateTypeAst(ast typeAst.TypeAst)

updates a type ast

type MicroTypelist

type MicroTypelist struct {
	MicroTypesByName    map[string]*MicroType
	MicroTypesASTByName map[string]*MicroTypeAst
	MicroTypes          []*MicroType `yaml:"types"`
}

func (*MicroTypelist) Unmarshal

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

unmarshal yaml/json to microtype list

func (*MicroTypelist) UpateTypelist

func (l *MicroTypelist) UpateTypelist(typelist *typeAst.Typelist, deleteSpecs bool, overwriteSpecOptions bool)

Jump to

Keyboard shortcuts

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