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" )
View Source
const ( CtxSiteDomain = "SiteDomain" CtxStartTime = "StartTime" CtxClientIp = "ClientIp" CtxClientPort = "ClientPort" CtxFullMethod = "FullMethod" CtxRequestURI = "RequestURI" CtxRequestID = "RequestID" CtxTenantId = "TenantId" CtxTenants = "Tenants" CtxDomainId = "DomainId" CtxUserId = "UserId" CtxRole = "Role" CtxClaimsAudience = "Audience" CtxClaimsExpiresAt = "ExpiresAt" CtxClaimsId = "Id" CtxClaimsIssuedAt = "IssuedAt" CtxClaimsIssuer = "Issuer" CtxClaimsNotBefore = "NotBefore" CtxClaimsSubject = "Subject" CtxUserAgent = "User-Agent" CtxXAccessKeyFor = "X-AccessKey-For" CtxSessionIDFor = "X-SessionId-For" CtxXAuthMethodFor = "X-AuthMethod-For" CtxXAccountFor = "X-Account-For" CtxCityId = "CityId" CtxCountry = "Country" CtxRegion = "Region" CtxProvince = "Province" CtxCity = "City" CtxISP = "ISP" CtxUserAgentFamily = "UserAgent.Family" CtxUserAgentMajor = "UserAgent.Major" CtxUserAgentMinor = "UserAgent.Minor" CtxUserAgentPatch = "UserAgent.Patch" CtxOsFamily = "Os.Family" CtxOsMajor = "Os.Major" CtxOsMinor = "Os.Minor" CtxOsPatch = "Os.Patch" CtxOsPatchMinor = "Os.PatchMinor" CtxDeviceFamily = "Device.Family" CtxDeviceBrand = "Device.Brand" CtxDeviceModel = "Device.Model" )
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.