helper

package
v0.0.0-...-352c0ba Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthUserToGraphUser

func AuthUserToGraphUser(foundUser *authPb.SavedUser) *model.User

AuthUserToGraphUser parse user object from cyber into graphql user

func GetSession

func GetSession(ctx context.Context, name string) *sessions.Session

GetSession returns a cached session of the given name

func ReadUserToGraphUser

func ReadUserToGraphUser(foundUser *readPb.User) *model.User

ReadUserToGraphUser parse user object from cyber into graphql user

func SaveSession

func SaveSession(ctx context.Context, session *sessions.Session) error

SaveSession saves the session by writing it to the response

func WriteUserToGraphUser

func WriteUserToGraphUser(foundUser *writePb.NewUser) *model.User

WriteUserToGraphUser parse user object from cyber into graphql user

Types

type HTTP

type HTTP struct {
	W *http.ResponseWriter
	R *http.Request
}

HTTP is the struct used to inject the response writer and request http structs.

type HTTPKey

type HTTPKey string

HTTPKey is the key used to extract the Http struct.

Jump to

Keyboard shortcuts

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