auth

package
v0.0.0-...-a2f44c0 Latest Latest
Warning

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

Go to latest
Published: May 21, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SessionCtxName = "session"
)

Variables

View Source
var Tracer opentracing.Tracer

Functions

func Auth

func Auth(authClient auth_service.AuthServiceClient) func(handler http.Handler) http.Handler

func Directive

func Directive(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error)

Types

type CapturingResponseWriter

type CapturingResponseWriter struct {
	http.ResponseWriter
	CapturedBody []byte
	StatusCode   int
}

func (*CapturingResponseWriter) Write

func (c *CapturingResponseWriter) Write(b []byte) (int, error)

func (*CapturingResponseWriter) WriteHeader

func (c *CapturingResponseWriter) WriteHeader(statusCode int)

type GraphQLRequestBody

type GraphQLRequestBody struct {
	OperationName *string     `json:"operationName"`
	Query         *string     `json:"query"`
	Variables     interface{} `json:"variables"`
}

type Session

type Session struct {
	Username string
	ClientID string
}

func GetSession

func GetSession(ctx context.Context) Session

func GetSessionPtr

func GetSessionPtr(ctx context.Context) *Session

Jump to

Keyboard shortcuts

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