api

package
v0.20.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 11, 2022 License: MIT Imports: 32 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthenticationMiddleware

func AuthenticationMiddleware(next http.Handler) http.Handler

AuthenticationMiddleware is a middleware that extracts the JWT Token from the Authorization header and stores it in the context for the directiveAuthorization.

func AuthzByPolicyMiddleware

func AuthzByPolicyMiddleware(next http.Handler) http.Handler

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

func CurrentUserFromContext(ctx context.Context) (*modelgen.User, error)

CurrentUserFromContext will retrieve the current user from the context.

func LoggingMiddleware

func LoggingMiddleware(next http.Handler) http.Handler

LoggingMiddleware logs the incoming HTTP request & its duration.

func NewSchema

func NewSchema(client *modelgen.Client, tr trace.Tracer) graphql.ExecutableSchema

NewSchema creates a graphql executable schema.

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.

Source Files

  • account_callbacks.go
  • api.resolvers.go
  • authentication.go
  • authz_by_policy.go
  • logging.go
  • resolver.go

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL