Documentation
¶
Index ¶
- Constants
- func GetHTTPStatusCode(code codes.Code) int
- func GetRPCRequest(body []byte, requestDesc protoreflect.MessageDescriptor, params []Variable, ...) (*dynamicpb.Message, error)
- func GetRPCRequestContext(request *http.Request) context.Context
- func GetRPCResponse(responseDesc protoreflect.MessageDescriptor) *dynamicpb.Message
- func SetRESTHeaders(protoMajor int, headers http.Header, gRPCheader metadata.MD, ...)
- func ValidateFieldPath(desc protoreflect.MessageDescriptor, fieldPath []string) error
- type BodyRuleType
- type HTTPBodyRule
- type Variable
Constants ¶
View Source
const (
InvalidGrpcMethodName = jErrors.ConstError("gRPC method name is invalid")
)
Variables ¶
This section is empty.
Functions ¶
func GetHTTPStatusCode ¶
func GetRPCRequest ¶
func GetRPCRequest( body []byte, requestDesc protoreflect.MessageDescriptor, params []Variable, httpBodyRule HTTPBodyRule, ) (*dynamicpb.Message, error)
func GetRPCResponse ¶
func GetRPCResponse(responseDesc protoreflect.MessageDescriptor) *dynamicpb.Message
func SetRESTHeaders ¶
func ValidateFieldPath ¶
func ValidateFieldPath(desc protoreflect.MessageDescriptor, fieldPath []string) error
Types ¶
type BodyRuleType ¶
type BodyRuleType int
const ( NoBodyRule BodyRuleType = iota MapRootRule FieldPathRule )
type HTTPBodyRule ¶
type HTTPBodyRule struct {
RuleType BodyRuleType
FieldPath []string
}
func GetHTTPBodyRule ¶
func GetHTTPBodyRule(rule string) HTTPBodyRule
Click to show internal directories.
Click to hide internal directories.