internal

package
v1.16.0 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2021 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FlatStruct

func FlatStruct(s *types.Struct) *types.Struct

Types

type Method

type Method struct {
	API    string
	Func   types.Object
	Input  types.Object
	Output types.Object
	Name   string
}

func ParseAPI

func ParseAPI(prefix string, api *types.Named) ([]*Method, error)

func (*Method) SetSignature

func (m *Method) SetSignature(sig *types.Signature) error

type ModelType

type ModelType struct {
	Name string
	Type types.Type
}

type Models

type Models struct {
	// contains filtered or unexported fields
}

func NewModels

func NewModels() *Models

func (*Models) AddImport

func (m *Models) AddImport(pkg *types.Package)

func (*Models) AddMethods

func (m *Models) AddMethods(methods ...*Method) error

func (*Models) AddType

func (m *Models) AddType(name string, typ types.Type) error

func (*Models) Imports

func (m *Models) Imports() (imports []*types.Package)

func (*Models) Types

func (m *Models) Types() (modelTypes []ModelType)

func (*Models) Write

func (m *Models) Write(buf *bytes.Buffer, pkg *types.Package)

Jump to

Keyboard shortcuts

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