controller

package
v0.0.0-...-1bd8ba5 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthenticationHandler

func AuthenticationHandler() gin.HandlerFunc

Response format

response.data{
	code: int
	data:{ json_object }
	msg: string
}

func GraphqlHandler

func GraphqlHandler() gin.HandlerFunc

POST graphql query endpoint

func PlaygroundHandler

func PlaygroundHandler() gin.HandlerFunc

simple query client -弃用

Types

type LoginRequest

type LoginRequest struct {
	UserName   string `json:"username"`
	PassWord   string `json:"password"`
	PlatformID string `json:"platform_id"`
	BotCode    string `json:"code"`
}

UserName: raw username, telphone or email address Password: md5+sal PlatformID: admin platform, user platform, ios platform or android platform BotCode: Verification Code

type Response

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

Response modle

func (*Response) MakeGinResponse

func (r *Response) MakeGinResponse() gin.H

MakeGinResponse return gin json response object

Jump to

Keyboard shortcuts

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