router

package
v0.0.0-...-fce603d Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandlerUserCreate

func HandlerUserCreate(w http.ResponseWriter, r *http.Request) (interface{}, *api.Error)

func HandlerUserDelete

func HandlerUserDelete(w http.ResponseWriter, r *http.Request) (interface{}, *api.Error)

func HandlerUserDetail

func HandlerUserDetail(w http.ResponseWriter, r *http.Request) (interface{}, *api.Error)

func HandlerUserList

func HandlerUserList(w http.ResponseWriter, r *http.Request) (interface{}, *api.Error)

func HandlerUserLogin

func HandlerUserLogin(w http.ResponseWriter, r *http.Request) (interface{}, *api.Error)

func HandlerUserRegister

func HandlerUserRegister(w http.ResponseWriter, r *http.Request) (interface{}, *api.Error)

func HandlerUserUpdate

func HandlerUserUpdate(w http.ResponseWriter, r *http.Request) (interface{}, *api.Error)

func Init

func Init(lg *logging.Logger, db *sql.DB, cache *redis.Pool, opt InitOption)

func InitSchema

func InitSchema() (graphql.Schema, error)

func ParseBodyData

func ParseBodyData(ctx context.Context, r *http.Request, data interface{}) error

ParseBodyData parse json-formatted request body into given struct.

Types

type HandlerFunc

type HandlerFunc func(http.ResponseWriter, *http.Request) (interface{}, *api.Error)

func (HandlerFunc) ServeHTTP

func (fn HandlerFunc) ServeHTTP(w http.ResponseWriter, r *http.Request)

type InitOption

type InitOption struct{}

Jump to

Keyboard shortcuts

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