controller

package
v0.0.0-...-39c8326 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateUser

func CreateUser(c echo.Context) error

CreateUser

@Summary		create user api (should be admin now)
@Description	create a user account, who can log in by username and password
@Tags			user
@Accept			json
@Produce		json
@Param			input	body		model.UserCreateRequest	true	"body"
@Success		200		{object}	model.StringResponse	"data is uid (user id in this system)"
@Router			/create [post]

func GetUser

func GetUser(c echo.Context) error

GetUser

@Summary		get user api
@Description	get user information by uid
@Tags			user
@Accept			json
@Produce		json
@Param			uid	query		string	true	"uid"
@Success		200	{object}	model.UserInfoResponse
@Router			/get [get]

func Login

func Login(c echo.Context) error

Login

@Summary		login api
@Description	login by JWT token
@Tags			user
@Accept			json
@Produce		json
@Param			Authorization	header		string						true	"format:[Bearer JWT_Token]"
@Param			input			body		model.UserCoreInformation	true	"body"
@Success		200				{object}	model.StringResponse		"success"
@Router			/login [post]

func SyncEventMessage

func SyncEventMessage(c echo.Context) error

SyncEventMessage 同步 event

@Summary		同步 event
@Description	同步 event, 由 infra handle 傳入 cloud run, 若非 200 回傳, 會觸發重試
@Tags			event
@Accept			json
@Produce		json
@Param			input	body		service.PubSubMessage	true	"body"
@Success		200		{object}	string					"success"
@Router			/sync/:event [post]

func UpdateUser

func UpdateUser(c echo.Context) error

UpdateUser

@Summary		update user api
@Description	update user information by uid
@Tags			user
@Accept			json
@Produce		json
@Param			input	body		model.UserGeneralUpdateRequest	true	"body"
@Success		200		{object}	model.StringResponse			"data is uid (user id in this system)"
@Router			/update [post]

Types

This section is empty.

Jump to

Keyboard shortcuts

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