demoapi

package
v0.0.0-...-ce547d9 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckUser

func CheckUser(ctx context.Context, c *app.RequestContext)

CheckUser . @router /v1/user/login [POST]

func CreateNote

func CreateNote(ctx context.Context, c *app.RequestContext)

CreateNote . @router /v1/note [POST]

func CreateUser

func CreateUser(ctx context.Context, c *app.RequestContext)

CreateUser . @router /v1/user/register [POST]

func DeleteNote

func DeleteNote(ctx context.Context, c *app.RequestContext)

DeleteNote . @router /v1/note/:note_id [DELETE]

func QueryNote

func QueryNote(ctx context.Context, c *app.RequestContext)

QueryNote . @router /v1/note/query [GET]

func SendResponse

func SendResponse(c *app.RequestContext, err error, data interface{})

SendResponse pack response

func UpdateNote

func UpdateNote(ctx context.Context, c *app.RequestContext)

UpdateNote . @router /v1/note/:note_id [PUT]

Types

type Response

type Response struct {
	Code    int64       `json:"code"`
	Message string      `json:"message"`
	Data    interface{} `json:"data"`
}

Jump to

Keyboard shortcuts

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