Documentation ¶
Index ¶
- func AuthForwarder() grpc.UnaryClientInterceptor
- func CSRF(logger *logrus.Entry, secret []byte, opts ...csrf.Option) func(h http.Handler) http.Handler
- func ChainHTTPMiddleware(usr *mux.Router, logger *logrus.Entry, mw ...func(http.Handler) http.Handler)
- func ContentType(logger *logrus.Entry, typeDefault string) func(http.Handler) http.Handler
- func GetIP(r *http.Request) string
- func Gzip(handler http.Handler) http.Handler
- func Logger(logger *logrus.Entry) func(h http.Handler) http.Handler
- func New(env string, logger *logrus.Entry, c Config, ...) grpc.UnaryServerInterceptor
- type Config
- type PublicEndpoint
- type RequestMeta
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthForwarder ¶
func AuthForwarder() grpc.UnaryClientInterceptor
func ChainHTTPMiddleware ¶
func ContentType ¶
func New ¶
func New(env string, logger *logrus.Entry, c Config, ints ...grpc.UnaryServerInterceptor) grpc.UnaryServerInterceptor
New creates a gRPC middleware chain.
Types ¶
type Config ¶
type Config struct {
LogOpts []grpc_logrus.Option
}
type PublicEndpoint ¶
type RequestMeta ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewMetadata ¶
func NewMetadata(logger logrus.FieldLogger, metaLoaders ...RequestMeta) (*Service, error)
func (*Service) UnaryServerInterceptor ¶
func (s *Service) UnaryServerInterceptor() grpc.UnaryServerInterceptor
Click to show internal directories.
Click to hide internal directories.