handler

package
v0.0.0-...-9a7bc8d Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2020 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SUCCESS = "SUCCESS"
	FAIL    = "FAIL"
	LOGOUT  = "LOGOUT"
)

msg of Response

Variables

View Source
var (

	// DefaultGraphQL POST /graphql <Need Login>
	DefaultGraphQL = (&GraphQL{
		Schema: graphql.MustParseSchema(schema.String(),
			rootResolver),
		LoadersInitialize: loader.Initialize,
	}).Handler
)

GraphQL

Functions

func AccessToken

func AccessToken(c sola.Context) error

AccessToken POST /access_token

func Authorize

func Authorize(c sola.Context) error

Authorize GET /authorize

func AuthorizeConfirm

func AuthorizeConfirm(c sola.Context) error

AuthorizeConfirm GET /authorize_confirm

func HomePage

func HomePage(c sola.Context) error

HomePage GET / -> /plat

func InjectTempService

func InjectTempService(r *router.Router)

InjectTempService in /tmp

func InjectTempService2

func InjectTempService2(r *router.Router)

InjectTempService2 in /tmp2 <need login>

func Login

func Login(c sola.Context) error

Login POST /login

func NotifyPostAuthCode

func NotifyPostAuthCode(c sola.Context) error

NotifyPostAuthCode Handler

func Register

func Register(c sola.Context) error

Register POST /register

func Status

func Status(c sola.Context) error

Status ALL /status <Need Login>

Types

type GraphQL

type GraphQL struct {
	Schema            *graphql.Schema
	LoadersInitialize func(*client.MicroClient) loader.Collection
}

GraphQL handler

func (*GraphQL) Handler

func (h *GraphQL) Handler(c sola.Context) error

Handler of GraphQL

type Response

type Response struct {
	Code int         `json:"code"`
	Data interface{} `json:"data,omitempty"`
	Msg  string      `json:"msg"`
}

Response of Restful API

Jump to

Keyboard shortcuts

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