Documentation
¶
Index ¶
- Variables
- func BuildAnnotations(g *protogen.GeneratedFile, m *protogen.Method, config *SwagParams) (string, error)
- func ConvertGinToSwaggerPath(ginPath string) string
- func FindProtoField(message *protogen.Message, keypath []string) *protogen.Field
- func GinRoute(protoPath string) (string, error)
- func MethodCommend(m *protogen.Method) string
- func ProtoKeyPath2GoKeyPath(message *protogen.Message, keypath []string) []string
- func ProtoTypeToGoType(g *protogen.GeneratedFile, field *protogen.Field, usePtrForMessage bool) string
- type HeaderField
- type HttpRule
- type QueryFormField
- type SwagParams
- type URIParamsField
Constants ¶
This section is empty.
Variables ¶
View Source
var NoBodyMethods = map[string]struct{}{ http.MethodGet: {}, http.MethodHead: {}, http.MethodDelete: {}, http.MethodOptions: {}, }
Functions ¶
func BuildAnnotations ¶
func BuildAnnotations(g *protogen.GeneratedFile, m *protogen.Method, config *SwagParams) (string, error)
func ConvertGinToSwaggerPath ¶
func FindProtoField ¶
func MethodCommend ¶
func ProtoKeyPath2GoKeyPath ¶
func ProtoTypeToGoType ¶
Types ¶
type HeaderField ¶
func GinHeaderParams ¶
func GinHeaderParams(m *protogen.Method) ([]HeaderField, error)
type HttpRule ¶
func ParseHttpRule ¶
func ParseHttpRule(rule *annotations.HttpRule) *HttpRule
type QueryFormField ¶
func GinQueryForm ¶
func GinQueryForm(m *protogen.Method, method string, pathVars []URIParamsField) ([]QueryFormField, error)
type SwagParams ¶
type SwagParams struct {
Method string
Path string
Auth string
PathVars []URIParamsField
QueryVars []QueryFormField
HeaderVars []HeaderField
Body string
ResponseBody string
DataResponse string
ErrorResponse string
}
type URIParamsField ¶
func GinURIParams ¶
func GinURIParams(m *protogen.Method, route string) ([]URIParamsField, error)
Click to show internal directories.
Click to hide internal directories.