impl

package
v0.0.0-...-113f0ac Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2018 License: LGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ContractTemplate string = `` /* 692-byte string literal not displayed */
View Source
var ServerTemplate string = `` /* 2731-byte string literal not displayed */

Functions

This section is empty.

Types

type Contract

type Contract struct {
	Package    string
	PBPackage  string
	Name       string
	Methods    Methods
	StructName string
	Sources    Sources
}

func NewContract

func NewContract(pack, pbPack, name string, sources Sources) Contract

func (*Contract) IsServerInterface

func (c *Contract) IsServerInterface(name string) bool

func (*Contract) Write

func (c *Contract) Write(filepath, filename string)

type Method

type Method struct {
	StructName string
	Name       string
	InputType  string
	OutputType string
	PBPackage  string

	ContractMethod *parser.GoStructMethod
	Request        *parser.GoStruct
	Response       *parser.GoStruct
}

func NewMethod

func NewMethod(pbPackage string, m *parser.GoMethod, requestStruct *parser.GoStruct, responseStruct *parser.GoStruct, goFile *parser.GoFile, structName string) *Method

func (Method) String

func (m Method) String() string

type Methods

type Methods []*Method

func (Methods) Len

func (m Methods) Len() int

Len is part of sort.Interface.

func (Methods) Less

func (m Methods) Less(i, j int) bool

Less is part of sort.Interface.

func (Methods) Swap

func (m Methods) Swap(i, j int)

Swap is part of sort.Interface.

type Server

type Server struct {
	ContractName   string
	ProjectPackage string
}

func (*Server) Write

func (s *Server) Write(filepath, filename string)

type Sources

type Sources []string

func (Sources) Len

func (s Sources) Len() int

Len is part of sort.Interface.

func (Sources) Less

func (s Sources) Less(i, j int) bool

Less is part of sort.Interface.

func (Sources) Swap

func (s Sources) Swap(i, j int)

Swap is part of sort.Interface.

type TypeMap

type TypeMap struct {
	Input    string
	Template string
}

func NewTypeMap

func NewTypeMap(in, inType, outType string) *TypeMap

func (*TypeMap) String

func (t *TypeMap) String() string

Jump to

Keyboard shortcuts

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