Documentation ¶
Index ¶
- Variables
- func NewGrpcPluginStream(s grpc.ServerStream, fullName string, ctx context.Context, plugin *pluginImpl) *grpcPluginStream
- func NewPluginImpl(lb lb.LoadBalance, name string, timeout time.Duration) *pluginImpl
- type Http
- func (h *Http) Name() string
- func (h *Http) Priority() int
- func (h *Http) SetPriority(priority int)
- func (h *Http) StreamInterceptor(srv interface{}, ss grpc.ServerStream, info *grpc.StreamServerInfo, ...) error
- func (h *Http) UnaryInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, ...) (interface{}, error)
- type HttpStream
- type ParamsValidator
- type ParamsValidatorImpl
- func (p *ParamsValidatorImpl) FiltersFields(v interface{}, parent string) []string
- func (p *ParamsValidatorImpl) Name() string
- func (p *ParamsValidatorImpl) Priority() int
- func (p *ParamsValidatorImpl) SetPriority(priority int)
- func (p *ParamsValidatorImpl) StreamInterceptor(srv interface{}, ss grpc.ServerStream, info *grpc.StreamServerInfo, ...) error
- func (p *ParamsValidatorImpl) UnaryInterceptor(ctx context.Context, req any, info *grpc.UnaryServerInfo, ...) (resp any, err error)
- func (p *ParamsValidatorImpl) ValidateParams(v interface{}) error
- type PluginsApply
- type RPCPluginCaller
Constants ¶
This section is empty.
Variables ¶
View Source
var ProviderSet = wire.NewSet(New, auth.NewAccessKeyAuth)
var Plugins = map[string]gosdk.GrpcPlugin{ "jwt": &auth.JWTAuth{}, }
Functions ¶
func NewGrpcPluginStream ¶
func NewGrpcPluginStream(s grpc.ServerStream, fullName string, ctx context.Context, plugin *pluginImpl) *grpcPluginStream
func NewPluginImpl ¶
func NewPluginImpl(lb lb.LoadBalance, name string, timeout time.Duration) *pluginImpl
Types ¶
type Http ¶
type Http struct {
// contains filtered or unexported fields
}
func (*Http) SetPriority ¶
func (*Http) StreamInterceptor ¶
func (h *Http) StreamInterceptor(srv interface{}, ss grpc.ServerStream, info *grpc.StreamServerInfo, handler grpc.StreamHandler) error
func (*Http) UnaryInterceptor ¶
func (h *Http) UnaryInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error)
type HttpStream ¶
type HttpStream struct { grpc.ServerStream FullMethod string }
w.Header().Set("Content-Type", "application/json") return nil }
func (*HttpStream) SendMsg ¶
func (s *HttpStream) SendMsg(m interface{}) error
type ParamsValidator ¶
type ParamsValidator interface { gosdk.LocalPlugin ValidateParams(v interface{}) error }
func NewParamsValidator ¶
func NewParamsValidator() ParamsValidator
type ParamsValidatorImpl ¶
type ParamsValidatorImpl struct {
// contains filtered or unexported fields
}
func (*ParamsValidatorImpl) FiltersFields ¶
func (p *ParamsValidatorImpl) FiltersFields(v interface{}, parent string) []string
FiltersFields 从FieldMask中获取过滤字段,获取待验证字段
func (*ParamsValidatorImpl) Name ¶
func (p *ParamsValidatorImpl) Name() string
func (*ParamsValidatorImpl) Priority ¶
func (p *ParamsValidatorImpl) Priority() int
func (*ParamsValidatorImpl) SetPriority ¶
func (p *ParamsValidatorImpl) SetPriority(priority int)
func (*ParamsValidatorImpl) StreamInterceptor ¶
func (p *ParamsValidatorImpl) StreamInterceptor(srv interface{}, ss grpc.ServerStream, info *grpc.StreamServerInfo, handler grpc.StreamHandler) error
func (*ParamsValidatorImpl) UnaryInterceptor ¶
func (p *ParamsValidatorImpl) UnaryInterceptor(ctx context.Context, req any, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp any, err error)
func (*ParamsValidatorImpl) ValidateParams ¶
func (p *ParamsValidatorImpl) ValidateParams(v interface{}) error
type PluginsApply ¶
func New ¶
func New(config *config.Config, rdb *tiga.RedisDao, user *biz.AuthzUsecase, log logger.Logger, authz *biz.AccessKeyAuth, ) *PluginsApply
func NewPluginsApply ¶
func NewPluginsApply() *PluginsApply
func (*PluginsApply) Register ¶
func (p *PluginsApply) Register(plugin gosdk.LocalPlugin, priority int)
func (*PluginsApply) StreamInterceptorChains ¶
func (p *PluginsApply) StreamInterceptorChains() []grpc.StreamServerInterceptor
func (*PluginsApply) UnaryInterceptorChains ¶
func (p *PluginsApply) UnaryInterceptorChains() []grpc.UnaryServerInterceptor
type RPCPluginCaller ¶
type RPCPluginCaller interface{}
Click to show internal directories.
Click to hide internal directories.