params

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

type Builder interface {
	Build(path string, resName string, methodNames []string) (*Params, error)
}

func NewBuilder

func NewBuilder(rootDir cli.RootDir, protoDir, protoOutDir, serverDir string, pkgName string) Builder

type GoParams

type GoParams struct {
	Package     string
	Imports     []string
	TestImports []string
	ServerName  string
	StructName  string
}

type MethodHTTPParams

type MethodHTTPParams struct {
	Method string
	Path   string
	Body   string
}

type MethodMessage

type MethodMessage struct {
	Name   string
	Fields []MethodMessageField
}

type MethodMessageField

type MethodMessageField struct {
	Name     string
	Type     string
	Repeated bool
	Tag      uint
}

type MethodParams

type MethodParams struct {
	Method string
	HTTP   MethodHTTPParams
	// contains filtered or unexported fields
}

func (*MethodParams) RequestGo

func (p *MethodParams) RequestGo(pkg string) string

func (*MethodParams) RequestProto

func (p *MethodParams) RequestProto() string

func (*MethodParams) ResponseGo

func (p *MethodParams) ResponseGo(pkg string) string

func (*MethodParams) ResponseProto

func (p *MethodParams) ResponseProto() string

type MethodsParams

type MethodsParams struct {
	Methods      []MethodParams
	ProtoImports []string
	GoImports    []string
	Messages     []MethodMessage
}

type Params

type Params struct {
	ProtoDir    string
	ProtoOutDir string
	ServerDir   string
	Path        string
	ServiceName string
	Methods     []MethodParams
	Proto       ProtoParams
	PbGo        PbGoParams
	Go          GoParams
}

type PbGoParams

type PbGoParams struct {
	PackageName string
	PackagePath string
}

type ProtoParams

type ProtoParams struct {
	Package  string
	Imports  []string
	Messages []MethodMessage
}

Jump to

Keyboard shortcuts

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