Documentation ¶
Index ¶
- func ClaimsFromContext(ctx context.Context) (*jws.ClaimSet, bool)
- func HandleSwagger(mux *http.ServeMux)
- func MakeAuthStreamingInterceptor(kf keysFunc) ...
- func MakeAuthUnaryInterceptor(kf keysFunc) ...
- func Register(ctx context.Context, srv *http.Server, grpcServer *grpc.Server, ...) error
- func RegisterStats()
- func WithCheckClaims(check bool) serverOpt
- func WithGrafanaBasicAuth(user, pass string) serverOpt
- func WithIndex(index *indexer.Indexer) serverOpt
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClaimsFromContext ¶
ClaimsFromContext retrieves the set of claims stored in a request context
func HandleSwagger ¶
HandleSwagger adds the swagger-ui to the provided mux
func MakeAuthStreamingInterceptor ¶
func MakeAuthStreamingInterceptor(kf keysFunc) func(srv interface{}, stream grpc.ServerStream, info *grpc.StreamServerInfo, handler grpc.StreamHandler) error
MakeAuthStreamingInterceptor is gRPC stream interceptor that checks for the required claims in JWT in the authorization header.
func MakeAuthUnaryInterceptor ¶
func MakeAuthUnaryInterceptor(kf keysFunc) func(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error)
MakeAuthUnaryInterceptor is gRPC unary interceptor that checks for the required claims in JWT in the authorization header.
func Register ¶
func Register(ctx context.Context, srv *http.Server, grpcServer *grpc.Server, dopts []grpc.DialOption, opts ...serverOpt) error
Register sets up the log server on the provided http and grpc servers. THe dial options will be used for all outbound gRPC reuqests.
func RegisterStats ¶
func RegisterStats()
RegisterStats explicitly register the prometheus metrics, this prevents them showing up in the client
func WithCheckClaims ¶
func WithCheckClaims(check bool) serverOpt
func WithGrafanaBasicAuth ¶
func WithGrafanaBasicAuth(user, pass string) serverOpt
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.