Documentation ¶
Index ¶
- func AuthenticationMiddleware(next http.Handler) http.Handler
- func AuthzByPolicyMiddleware(next http.Handler) http.Handler
- func CurrentUserFromContext(ctx context.Context) (*modelgen.User, error)
- func LoggingMiddleware(next http.Handler) http.Handler
- func NewSchema(client *modelgen.Client, tr trace.Tracer) graphql.ExecutableSchema
- type Resolver
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthenticationMiddleware ¶
AuthenticationMiddleware is a middleware that extracts the JWT Token from the Authorization header and stores it in the context for the directiveAuthorization.
func AuthzByPolicyMiddleware ¶
AuthzByPolicyMiddleware is a middleware that checks the request IP and stores it in the context for the directiveAuthzByPolicy. It is used by the directiveAuthzByPolicy.
func CurrentUserFromContext ¶
CurrentUserFromContext will retrieve the current user from the context.
func LoggingMiddleware ¶
LoggingMiddleware logs the incoming HTTP request & its duration.
Types ¶
type Resolver ¶
type Resolver struct {
// contains filtered or unexported fields
}
func (*Resolver) Mutation ¶
func (r *Resolver) Mutation() apigen.MutationResolver
Mutation returns apigen.MutationResolver implementation.
func (*Resolver) Query ¶
func (r *Resolver) Query() apigen.QueryResolver
Query returns apigen.QueryResolver implementation.
func (*Resolver) User ¶
func (r *Resolver) User() apigen.UserResolver
User returns apigen.UserResolver implementation.
Click to show internal directories.
Click to hide internal directories.