Versions in this module Expand all Collapse all v1 v1.0.8 Jul 8, 2022 Changes in this version + func GRPCHandlerFunc(g *grpc.Server, h http.Handler) http.Handler + func GetClientIP(ctx context.Context) (string, error) + func GetTLSConfig(pemPath, keyPath string) *tls.Config + func StreamServerInterceptor(opts ...RecoveryOption) grpc.StreamServerInterceptor + func UnaryServerInterceptor(opts ...RecoveryOption) grpc.UnaryServerInterceptor + type BaseServer struct + DisableAutoRecovery bool + DisableAutoZap bool + EnableHTTPServer bool + Host string + IgnoreZapLogMethod []string + Name string + OnShutdown []func() + Port int + SSLCrtFile string + SSLKeyFile string + SSLName string + ServerOptions []grpc.ServerOption + Services []Register + StreamServerInterceptors []grpc.StreamServerInterceptor + UnaryServerInterceptors []grpc.UnaryServerInterceptor + func (s *BaseServer) Start(opts ...Option) + type Option func(options *Options) + type Options struct + CORSAllowedHeaders []string + CORSAllowedMethods []string + CORSAllowedOrigins []string + DiscardUnknown bool + EmitUnpopulated bool + UseEnumNumbers bool + UseProtoNames bool + type Pagination interface + GetOrder func() string + GetOrderBy func() string + GetPage func() int32 + GetSize func() int32 + type PaginationParam struct + Order string + OrderBy string + Page int + Size int + func BindPagination(r Pagination) *PaginationParam + type RecoveryHandlerFunc func(p interface{}) (err error) + type RecoveryHandlerFuncContext func(ctx context.Context, p interface{}) (err error) + type RecoveryOption func(*options) + func WithRecoveryHandler(f RecoveryHandlerFunc) RecoveryOption + func WithRecoveryHandlerContext(f RecoveryHandlerFuncContext) RecoveryOption + type Register interface + RegisterGRPC func(g *grpc.Server) + RegisterHTTP func(c context.Context, gwmux *runtime.ServeMux, endpoint string, ...) error