Documentation ¶
Index ¶
- func GetPackageName(plugin *protogen.Plugin) (string, error)
- func GetProtoFile(plugin *protogen.Plugin) (*protogen.File, error)
- func GetProtoFilePath(plugin *protogen.Plugin) (string, error)
- type FieldAttribute
- type Method
- func (m *Method) BodyArgumentName() string
- func (m *Method) BodyArgumentType() string
- func (m *Method) HasAuthentication() bool
- func (m *Method) HasBody() bool
- func (m *Method) HttpMethod() string
- func (m *Method) IsHttp() bool
- func (m *Method) NeedsInitializeInput() bool
- func (m *Method) PathParameters() []*Parameter
- func (m *Method) QueryParameters() []*Parameter
- func (m *Method) RocketEndpoint() string
- type MethodMessage
- type Parameter
- type ParameterLocation
- type Spec
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FieldAttribute ¶
func GetFieldAttributes ¶
func GetFieldAttributes(plugin *protogen.Plugin) []*FieldAttribute
type Method ¶
type Method struct { Name string Input *MethodMessage Output *MethodMessage // contains filtered or unexported fields }
func (*Method) BodyArgumentName ¶
BodyArgumentName gives the variable name of the body.
func (*Method) BodyArgumentType ¶
BodyArgumentType gives the variable type of the body.
func (*Method) HasAuthentication ¶
HasAuthentication returns true or false if the current Method has authentication enabled or not.
func (*Method) HasBody ¶
HasBody returns true or false if the current Method needs to parse the request body or not.
func (*Method) HttpMethod ¶
func (*Method) NeedsInitializeInput ¶
NeedsInitializeInput returns true or false if the method input struct must be built using path and body parameters.
func (*Method) PathParameters ¶
PathParameters gives a slice of parameters that must be read from the the request URL path.
func (*Method) QueryParameters ¶
QueryParameters gives a slice of parameters that must be read from the the request URL as query parameters.
func (*Method) RocketEndpoint ¶
RocketEndpoint converts the method endpoint to the rocket syntax.
type MethodMessage ¶
type Parameter ¶
type Parameter struct { GoName string ProtoName string Location ParameterLocation // contains filtered or unexported fields }
func (*Parameter) BodyInitCall ¶
type ParameterLocation ¶
type ParameterLocation int32
const ( ParameterLocation_Header ParameterLocation = iota ParameterLocation_Path ParameterLocation_Query ParameterLocation_Body )
func (ParameterLocation) String ¶
func (p ParameterLocation) String() string