codegen

package
v1.22.0 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2021 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DebugJSON

func DebugJSON(v interface{}) string

func Render

func Render(wr io.Writer, s string) error

Types

type EnumValue added in v1.17.0

type EnumValue struct {
	Name  string `json:"name"`
	Value string `json:"value"`
	Help  string `json:"help"`
}

func (EnumValue) DartName added in v1.17.0

func (e EnumValue) DartName() string

func (EnumValue) DartValue added in v1.17.0

func (e EnumValue) DartValue() string

type Field

type Field struct {
	Name         string `json:"name"`
	JSName       string `json:"js_name"`
	Help         string `json:"help"`
	Json         string `json:"json"`
	Type         string `json:"type"`
	Readonly     bool   `json:"readonly"`
	Null         bool   `json:"null,omitempty"`
	List         bool   `json:"list,omitempty"`
	InternalType bool   `json:"internal_type,omitempty"`
	Omitempty    bool   `json:"omitempty,omitempty"`
	TSType       string `json:"ts_type"`
	DartType     string `json:"dart_type"`
	TSDefault    string `json:"ts_default"`
}

func (Field) DartName added in v1.17.1

func (f Field) DartName() string

func (Field) DartRequired added in v1.17.0

func (f Field) DartRequired() bool

type Struct

type Struct struct {
	Name       string      `json:"name"`
	Help       string      `json:"help"`
	Fields     []*Field    `json:"fields"`
	Readonly   bool        `json:"readonly,omitempty"`
	EnumValues []EnumValue `json:"enum_values,omitempty"`
}

func Parse

func Parse() (structs []*Struct, err error)

func (Struct) IsEnum added in v1.17.0

func (s Struct) IsEnum() bool

func (Struct) SnakeName

func (s Struct) SnakeName() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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