api

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 api ... generated version: 1.6.1

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IPutUserController

type IPutUserController interface {
	PutUser(c echo.Context, req *PutUserRequest) (res *PutUserResponse, err error)
}

IPutUserController ...

type PutUserController

type PutUserController struct {
	*props.ControllerProps
}

PutUserController ...

func NewPutUserController

func NewPutUserController(cp *props.ControllerProps) *PutUserController

NewPutUserController ...

func (*PutUserController) PutUser

func (p *PutUserController) PutUser(
	c echo.Context, req *PutUserRequest,
) (res *PutUserResponse, err error)

PutUser user creation api controller @Summary CreateUserAPI @Description user creation api @Accept json @Produce json @Param name body string true "user name" @Param age body integer true "user age" @Param gender body model.Gender true "user gender" @Success 200 {object} PutUserResponse @Failure 400 {object} wrapper.APIError @Failure 500 {object} wrapper.APIError @Router /api/user [PUT]

type PutUserRequest

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

PutUserRequest - user creation request

type PutUserResponse

type PutUserResponse struct {
	Status int         `json:"status"`
	User   *model.User `json:"payload,omitempty"`
}

PutUserResponse - user creation 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) PutUser

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

PutUser ...

Directories

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

Jump to

Keyboard shortcuts

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