Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Argument ¶
type Argument struct { Name string Type QualifiedGoIdent }
Argument is the identifier of a function argument, consisting of a name and type. The type is the qualified Go identifier. For example: `ctx context.Context` => Argument{Name: "ctx", Type: "context.Context"}.
type Method ¶
type Method struct { *protogen.Method Receiver Receiver Arguments []*Argument Return []QualifiedGoIdent }
A Method describes a method in a service. It extends the protogen's Method with the additional fields.
func (*Method) AddArgument ¶
AddArgument adds an argument to the method.
type QualifiedGoIdent ¶
type QualifiedGoIdent string
A QualifiedGoIdent is the qualified Go identifier of a type. For example: `context.Context` or `string`.
If the identifier is from a different Go package it will be qualified (package.name) and an import statement for the identifier's package is expected be included in the file. The identifier may also be a builtin or pointer type.
func (QualifiedGoIdent) IsPointer ¶
func (ident QualifiedGoIdent) IsPointer() bool
IsPointer indicated if the go identifier is a pointer.
func (QualifiedGoIdent) IsVariadic ¶
func (ident QualifiedGoIdent) IsVariadic() bool
IsVariadic indicates if the go identifier is variadic.