rexMiddleware

package
v1.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 21, 2025 License: MIT Imports: 23 Imported by: 0

Documentation

Index

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 CommonErrResponse(w http.ResponseWriter, r *http.Request, Code int32, v ...any)

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

type RegionInterceptorMiddleware

type RegionInterceptorMiddleware struct {
	Region *ip2region.Ip2Region
}

func NewRegionInterceptorMiddleware

func NewRegionInterceptorMiddleware(region *ip2region.Ip2Region) *RegionInterceptorMiddleware

func (*RegionInterceptorMiddleware) Handle

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) Descriptor() ([]byte, []int)

Deprecated: Use Resp.ProtoReflect.Descriptor instead.

func (*Resp) GetCode

func (x *Resp) GetCode() int32

func (*Resp) GetMsg

func (x *Resp) GetMsg() string

func (*Resp) GetPath

func (x *Resp) GetPath() string

func (*Resp) GetRequestID

func (x *Resp) GetRequestID() string

func (*Resp) ProtoMessage

func (*Resp) ProtoMessage()

func (*Resp) ProtoReflect

func (x *Resp) ProtoReflect() protoreflect.Message

func (*Resp) Reset

func (x *Resp) Reset()

func (*Resp) String

func (x *Resp) String() string

type UaParserInterceptorMiddleware

type UaParserInterceptorMiddleware struct {
	Uaparser *uaparser.Parser
}

func NewUaParserInterceptorMiddleware

func NewUaParserInterceptorMiddleware(uaparser *uaparser.Parser) *UaParserInterceptorMiddleware

func (*UaParserInterceptorMiddleware) Handle

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL