models

package
v0.0.0-...-a44e13a Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2020 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArrayType

type ArrayType struct {
	Len  int // -1 for slices, >= 0 for arrays
	Type Type
}

ArrayType is an array or slice type.

func (*ArrayType) String

func (at *ArrayType) String(pm map[string]string, currentPackage string) string

type ChanDir

type ChanDir int
const (
	RecvDir ChanDir = 1
	SendDir ChanDir = 2
)

type ChanType

type ChanType struct {
	Dir  ChanDir // 0, 1 or 2
	Type Type
}

ChanType is a channel type.

func (*ChanType) String

func (ct *ChanType) String(pm map[string]string, currentPackage string) string

type Field

type Field struct {
	Name string
	Type Type
}

type FileInfo

type FileInfo struct {
	ImportPath  string
	PackageName string
	Name        string
	Structs     []*Struct
	DotImports  []string
}

func (*FileInfo) Imports

func (file *FileInfo) Imports() map[string]bool

Imports returns the imports needed by the ImportPath as a set of import paths.

type MapType

type MapType struct {
	Key, Value Type
}

MapType is a map type.

func (*MapType) String

func (mt *MapType) String(pm map[string]string, currentPackage string) string

type NamedType

type NamedType struct {
	ImportPath string // may be empty
	Type       string // TODO: should this be typed Type?
}

NamedType is an exported type in a package.

func (*NamedType) String

func (nt *NamedType) String(pm map[string]string, currentPackage string) string

type PointerType

type PointerType struct {
	Type Type
}

PointerType is a pointer to another type.

func (*PointerType) String

func (pt *PointerType) String(pm map[string]string, currentPackage string) string

type PredeclaredType

type PredeclaredType string

PredeclaredType is a predeclared type such as "int".

func (PredeclaredType) String

func (pt PredeclaredType) String(pm map[string]string, currentPackage string) string

type Struct

type Struct struct {
	Name   string
	Fields []*Field
}

type Type

type Type interface {
	String(pm map[string]string, currentPackage string) string
	// contains filtered or unexported methods
}

Jump to

Keyboard shortcuts

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