user

package
v0.0.0-...-657a6a2 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2021 License: MIT Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package user ... generated version: 1.6.1

Package user ... generated version: 1.6.1

Package user ... generated version: 1.6.1

Package user ... generated version: 1.6.1

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeleteController

type DeleteController struct {
	*props.ControllerProps
}

DeleteController ...

func NewDeleteController

func NewDeleteController(cp *props.ControllerProps) *DeleteController

NewDeleteController ...

func (*DeleteController) Delete

func (d *DeleteController) Delete(
	c echo.Context, req *DeleteRequest,
) (res *DeleteResponse, err error)

Delete user deletion controller @Summary DeleteUserAPI @Description user deletion api @Accept json @Produce json @Param userID path string true "user id" @Success 200 {object} DeleteResponse @Failure 400 {object} wrapper.APIError @Failure 500 {object} wrapper.APIError @Router /api/user/{userID} [DELETE]

type DeleteRequest

type DeleteRequest struct {
	ID string `json:"userID" param:"userID" validate:"required"`
}

DeleteRequest - user deletion request

type DeleteResponse

type DeleteResponse struct {
	Status   int                   `json:"status"`
	Messages []werror.FailedReason `json:"messages"`
}

DeleteResponse - user deletion response

type GetController

type GetController struct {
	*props.ControllerProps
}

GetController ...

func NewGetController

func NewGetController(cp *props.ControllerProps) *GetController

NewGetController ...

func (*GetController) Get

func (g *GetController) Get(
	c echo.Context, req *GetRequest,
) (res *GetResponse, err error)

Get user acquisition api controller @Summary GetUserAPI @Description user acquisition api @Accept json @Produce json @Param userID path string true "user id" @Success 200 {object} GetResponse @Failure 400 {object} wrapper.APIError @Failure 500 {object} wrapper.APIError @Router /api/user/{userID} [GET]

type GetRequest

type GetRequest struct {
	ID string `json:"userID" param:"userID" validate:"required"`
}

GetRequest - user acquisition request

type GetResponse

type GetResponse struct {
	Status   int                   `json:"status"`
	User     *model.User           `json:"payload,omitempty"`
	Messages []werror.FailedReason `json:"messages"`
}

GetResponse- user acquisition response

type GetSearchController

type GetSearchController struct {
	*props.ControllerProps
}

GetSearchController ...

func NewGetSearchController

func NewGetSearchController(cp *props.ControllerProps) *GetSearchController

NewGetSearchController ...

func (*GetSearchController) GetSearch

func (g *GetSearchController) GetSearch(
	c echo.Context, req *GetSearchRequest,
) (res *GetSearchResponse, err error)

GetSearch user search api controller @Summary SearchUserAPI @Description user search api @Accept json @Produce json @Param name query string false "user name" @Param age query integer false "user age" @Param gender query model.Gender false "user gender" @Success 200 {object} GetSearchResponse @Failure 400 {object} wrapper.APIError @Failure 500 {object} wrapper.APIError @Router /api/user/search [GET]

type GetSearchRequest

type GetSearchRequest struct {
	Name   string       `json:"name" query:"name"`
	Age    int          `json:"age" query:"age"`
	Gender model.Gender `json:"gender" query:"gender"`
}

GetSearchRequest - user search request

type GetSearchResponse

type GetSearchResponse struct {
	Status   int                   `json:"status"`
	User     []*model.User         `json:"payload,omitempty"`
	Messages []werror.FailedReason `json:"messages"`
}

GetSearchResponse - user search response

type IDeleteController

type IDeleteController interface {
	Delete(c echo.Context, req *DeleteRequest) (res *DeleteResponse, err error)
}

IDeleteController ...

type IGetController

type IGetController interface {
	Get(c echo.Context, req *GetRequest) (res *GetResponse, err error)
}

IGetController ...

type IGetSearchController

type IGetSearchController interface {
	GetSearch(c echo.Context, req *GetSearchRequest) (res *GetSearchResponse, err error)
}

IGetSearchController ...

type IPatchController

type IPatchController interface {
	Patch(c echo.Context, req *PatchRequest) (res *PatchResponse, err error)
}

IPatchController ...

type PatchController

type PatchController struct {
	*props.ControllerProps
}

PatchController ...

func NewPatchController

func NewPatchController(cp *props.ControllerProps) *PatchController

NewPatchController ...

func (*PatchController) Patch

func (p *PatchController) Patch(
	c echo.Context, req *PatchRequest,
) (res *PatchResponse, err error)

Patch user editing api controller @Summary EditUserAPI @Description user editing api @Accept json @Produce json @Param userID path string true "user id" @Param name body string false "user name" @Param age body integer false "user age" @Param gender body model.Gender false "user gender" @Success 200 {object} PatchResponse @Failure 400 {object} wrapper.APIError @Failure 500 {object} wrapper.APIError @Router /api/user/{userID} [PATCH]

type PatchRequest

type PatchRequest struct {
	ID     string       `json:"userID" param:"userID" validate:"required"`
	Name   string       `json:"name,omitempty" validate:"min=5,max=10,excludesall=!()#@{}"`
	Age    int          `json:"age,omitempty" validate:"gt=0,lte=150"`
	Gender model.Gender `json:"gender,omitempty" validate:"oneof=0 1 2 3"`
}

PatchRequest - user editing request

type PatchResponse

type PatchResponse struct {
	Status   int                   `json:"status"`
	User     *model.User           `json:"payload,omitempty"`
	Messages []werror.FailedReason `json:"messages"`
}

PatchResponse - user editing response

type Routes

type Routes struct {
	// contains filtered or unexported fields
}

Routes ...

func NewRoutes

func NewRoutes(p *props.ControllerProps, router *echo.Group, opts ...io.Writer) *Routes

NewRoutes ...

func (*Routes) Delete

Delete ...

func (*Routes) Get

Get ...

func (*Routes) GetSearch

func (r *Routes) GetSearch(p *props.ControllerProps) echo.HandlerFunc

GetSearch ...

func (*Routes) Patch

Patch ...

Directories

Path Synopsis
Package _userID ...
Package _userID ...

Jump to

Keyboard shortcuts

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