handlers

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2023 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Docs added in v0.0.2

func Docs(ctx *middlewares.PurrfectContext)

func HandlePostLogin

func HandlePostLogin(ctx flamego.Context, sess session.Session, user gqtypes.User)

func HandlePostLoginWithGQLResult added in v0.0.2

func HandlePostLoginWithGQLResult(ctx flamego.Context, sess session.Session, result *graphql.Result)

func Home added in v0.0.2

func Home(ctx *middlewares.PurrfectContext)

func Login added in v0.0.2

func Login(ctx *middlewares.PurrfectContext)

func LoginPost added in v0.0.2

func LoginPost(ctx *middlewares.PurrfectContext, sess session.Session, svc *all.Services, loginParams gqtypes.LoginParams)

func Logout added in v0.0.2

func Logout(ctx *middlewares.PurrfectContext, sess session.Session)

func Profile added in v0.0.2

func Profile(ctx *middlewares.PurrfectContext)

func Register added in v0.0.2

func Register(ctx *middlewares.PurrfectContext)

func RegisterPost added in v0.0.2

func RegisterPost(ctx *middlewares.PurrfectContext, sess session.Session, svc *all.Services, registerParams gqtypes.RegisterParams)

func ServeGraphQL

func ServeGraphQL(ctx *middlewares.PurrfectContext, sess session.Session, opts RequestOptions, svc *all.Services)

func ServeJson

func ServeJson(w http.ResponseWriter, status int, data interface{})

Types

type RequestOptions

type RequestOptions struct {
	Query         string                 `json:"query" url:"query" schema:"query"`
	Variables     map[string]interface{} `json:"variables" url:"variables" schema:"variables"`
	OperationName string                 `json:"operationName" url:"operationName" schema:"operationName"`
}

func (RequestOptions) IsLoginMutation

func (opts RequestOptions) IsLoginMutation() bool

Jump to

Keyboard shortcuts

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