Documentation
¶
Index ¶
- Constants
- Variables
- func CommonErrResponse(w http.ResponseWriter, r *http.Request, Code int32, v ...any)
- func StreamHeaderParseInterceptor() grpc.StreamServerInterceptor
- func UnaryHeaderParseInterceptor() grpc.UnaryServerInterceptor
- type PathHttpInterceptorMiddleware
- type RegionInterceptorMiddleware
- type Resp
- func (*Resp) Descriptor() ([]byte, []int)deprecated
- func (x *Resp) GetCode() int32
- func (x *Resp) GetMsg() string
- func (x *Resp) GetPath() string
- func (x *Resp) GetRequestID() string
- func (*Resp) ProtoMessage()
- func (x *Resp) ProtoReflect() protoreflect.Message
- func (x *Resp) Reset()
- func (x *Resp) String() string
- type UaParserInterceptorMiddleware
Constants ¶
View Source
const ( RestRbacInterceptorMiddlewareObjectPath = "path" RestRbacInterceptorMiddlewareObjectRequestURI = "requestURI" )
Variables ¶
View Source
var File_result_proto protoreflect.FileDescriptor
Functions ¶
func CommonErrResponse ¶
func StreamHeaderParseInterceptor ¶
func StreamHeaderParseInterceptor() grpc.StreamServerInterceptor
func UnaryHeaderParseInterceptor ¶
func UnaryHeaderParseInterceptor() grpc.UnaryServerInterceptor
Types ¶
type PathHttpInterceptorMiddleware ¶
type PathHttpInterceptorMiddleware struct {
}
func NewPathHttpInterceptorMiddleware ¶
func NewPathHttpInterceptorMiddleware() *PathHttpInterceptorMiddleware
func (*PathHttpInterceptorMiddleware) Handle ¶
func (m *PathHttpInterceptorMiddleware) Handle(next http.HandlerFunc) http.HandlerFunc
type RegionInterceptorMiddleware ¶
func NewRegionInterceptorMiddleware ¶
func NewRegionInterceptorMiddleware(region *ip2region.Ip2Region) *RegionInterceptorMiddleware
func (*RegionInterceptorMiddleware) Handle ¶
func (m *RegionInterceptorMiddleware) Handle(next http.HandlerFunc) http.HandlerFunc
type Resp ¶
type Resp struct {
Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`
RequestID string `protobuf:"bytes,3,opt,name=requestID,proto3" json:"requestID,omitempty"`
Path string `protobuf:"bytes,4,opt,name=path,proto3" json:"path,omitempty"`
// contains filtered or unexported fields
}
func (*Resp) Descriptor
deprecated
func (*Resp) GetRequestID ¶
func (*Resp) ProtoMessage ¶
func (*Resp) ProtoMessage()
func (*Resp) ProtoReflect ¶
func (x *Resp) ProtoReflect() protoreflect.Message
type UaParserInterceptorMiddleware ¶
func NewUaParserInterceptorMiddleware ¶
func NewUaParserInterceptorMiddleware(uaparser *uaparser.Parser) *UaParserInterceptorMiddleware
func (*UaParserInterceptorMiddleware) Handle ¶
func (m *UaParserInterceptorMiddleware) Handle(next http.HandlerFunc) http.HandlerFunc
Click to show internal directories.
Click to hide internal directories.