generator

package
v0.0.0-...-709f770 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

Types

type APIContext

type APIContext struct {
	Enums    []*Enum
	Models   []*Model
	Services []*Service
	Imports  []Import
	// contains filtered or unexported fields
}

func NewAPIContext

func NewAPIContext() APIContext

func (*APIContext) AddEnum

func (ctx *APIContext) AddEnum(e *Enum)

func (*APIContext) AddModel

func (ctx *APIContext) AddModel(m *Model)

func (*APIContext) ApplyImports

func (ctx *APIContext) ApplyImports(d *descriptor.FileDescriptorProto)

func (*APIContext) ApplyMarshalFlags

func (ctx *APIContext) ApplyMarshalFlags()

type Enum

type Enum struct {
	Name              string
	Values            []EnumValue
	ParentMessageName string
}

type EnumValue

type EnumValue struct {
	EnumName          string
	Name              string
	Value             int32
	ParentMessageName string
}

type Import

type Import struct {
	Path string
}

type Model

type Model struct {
	Name         string
	Primitive    bool
	Fields       []ModelField
	CanMarshal   bool
	CanUnmarshal bool
}

type ModelField

type ModelField struct {
	Name          string
	Type          string
	InternalType  string
	JSONNameTo    string
	JSONType      string
	IsMessage     bool
	IsRepeated    bool
	IsMap         bool
	MapKeyField   *ModelField
	MapValueField *ModelField
	IsEnum        bool
	JSONNameFrom  string
}

type Service

type Service struct {
	Name    string
	Package string
	Methods []ServiceMethod
}

type ServiceMethod

type ServiceMethod struct {
	Name       string
	Path       string
	InputArg   string
	InputType  string
	OutputType string
}

Jump to

Keyboard shortcuts

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