Documentation
¶
Index ¶
- Constants
- 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 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 ¶
This section is empty.
Functions ¶
func CommonErrResponse ¶ added in v0.0.7
func StreamHeaderParseInterceptor ¶ added in v0.0.13
func StreamHeaderParseInterceptor() grpc.StreamServerInterceptor
func UnaryHeaderParseInterceptor ¶ added in v0.0.13
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 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.