sample

package
v1.10.1 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2021 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Package sample ...

Package sample ... generated version: devel

Package sample ...

Package sample ... generated version: devel

Package sample ...

Package sample ... generated version: devel

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bootstrap

func Bootstrap(p *props.ControllerProps, e *echo.Echo, middlewareList MiddlewareList, opts ...io.Writer)

Bootstrap ...

Types

type CreatedType

type CreatedType int

CreatedType ...

const (
	CreatedTypeOwner CreatedType = iota
	CreatedTypeMember
	CreatedTypeGuest
)

CreatedType Values

type Flag added in v1.4.0

type Flag int

Flag - type alias(int)

type GetController added in v1.4.5

type GetController struct {
	*props.ControllerProps
}

GetController ...

func NewGetController added in v1.4.5

func NewGetController(cp *props.ControllerProps) *GetController

NewGetController ...

func (*GetController) Get added in v1.4.5

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

Get ... @Summary WIP @Description WIP @Accept json @Produce json @Param Param query string WIP:${isRequire} WIP:${description} @Success 200 {object} GetResponse @Failure 400 {object} wrapper.APIError @Failure 500 {object} wrapper.APIError @Router / [GET]

type GetRequest added in v1.4.5

type GetRequest struct {
	Param string
}

GetRequest ...

type GetResponse added in v1.4.5

type GetResponse struct {
	Data string
}

GetResponse ...

type IGetController added in v1.4.5

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

IGetController ...

type IPostCreateTableController

type IPostCreateTableController interface {
	PostCreateTable(c echo.Context, req *PostCreateTableRequest) (res *PostCreateTableResponse, err error)
}

IPostCreateTableController ...

type IPostCreateUserController

type IPostCreateUserController interface {
	PostCreateUser(c echo.Context, req *PostCreateUserRequest) (res *PostCreateUserResponse, err error)
}

IPostCreateUserController ...

type MiddlewareList

type MiddlewareList []*MiddlewareSet

MiddlewareList ...

func (MiddlewareList) ToMap

func (m MiddlewareList) ToMap() MiddlewareMap

ToMap ...

type MiddlewareMap

type MiddlewareMap map[string][]echo.MiddlewareFunc

MiddlewareMap ...

type MiddlewareSet

type MiddlewareSet struct {
	Path           string
	MiddlewareFunc []echo.MiddlewareFunc
}

MiddlewareSet ...

type PostCreateTableController

type PostCreateTableController struct {
	*props.ControllerProps
}

PostCreateTableController ...

func NewPostCreateTableController

func NewPostCreateTableController(cp *props.ControllerProps) *PostCreateTableController

NewPostCreateTableController ...

func (*PostCreateTableController) PostCreateTable

func (p *PostCreateTableController) PostCreateTable(
	_ echo.Context, _ *PostCreateTableRequest,
) (res *PostCreateTableResponse, err error)

PostCreateTable ... @Summary WIP @Description WIP @Accept json @Produce json @Param ID body string WIP:${isRequire} WIP:${description} @Param Text body string WIP:${isRequire} WIP:${description} @Param Flag body Flag WIP:${isRequire} WIP:${description} @Param map body map[Flag]Flag WIP:${isRequire} WIP:${description} @Success 200 {object} PostCreateTableResponse @Failure 400 {object} wrapper.APIError @Failure 500 {object} wrapper.APIError @Router /create_table [POST]

type PostCreateTableRequest

type PostCreateTableRequest struct {
	ID   string
	Text string
	Flag Flag
	Map  map[Flag]Flag `json:"map"`
}

PostCreateTableRequest ...

type PostCreateTableResponse

type PostCreateTableResponse struct {
	ID          string
	Payload     table.Table
	RequestTime time.Time
}

PostCreateTableResponse ...

type PostCreateUserController

type PostCreateUserController struct {
	*props.ControllerProps
}

PostCreateUserController ...

func NewPostCreateUserController

func NewPostCreateUserController(cp *props.ControllerProps) *PostCreateUserController

NewPostCreateUserController ...

func (*PostCreateUserController) PostCreateUser

func (p *PostCreateUserController) PostCreateUser(
	_ echo.Context, req *PostCreateUserRequest,
) (res *PostCreateUserResponse, err error)

PostCreateUser ... @Summary WIP @Description WIP @Accept json @Produce json @Param ID body string WIP:${isRequire} WIP:${description} @Param Password body string WIP:${isRequire} WIP:${description} @Param Gender body integer WIP:${isRequire} WIP:${description} @Param Birthday body time.Time WIP:${isRequire} WIP:${description} @Param Roles body []*Role WIP:${isRequire} WIP:${description} @Success 200 {object} PostCreateUserResponse @Failure 400 {object} wrapper.APIError @Failure 500 {object} wrapper.APIError @Router /create_user [POST]

type PostCreateUserRequest

type PostCreateUserRequest struct {
	ID       string `param:"id"`
	Password string
	Gender   int
	Birthday time.Time
	Roles    []*Role
}

PostCreateUserRequest ...

type PostCreateUserResponse

type PostCreateUserResponse struct {
	Status      bool
	Message     string
	CreatedType CreatedType
	RequestedAt time.Time
}

PostCreateUserResponse ...

type Role added in v1.2.2

type Role struct {
	ID             int
	Name           string
	RecursionRoles []Role
}

Role ...

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) Get added in v1.4.5

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

Get ...

func (*Routes) PostCreateTable

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

PostCreateTable ...

func (*Routes) PostCreateUser

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

PostCreateUser ...

Directories

Path Synopsis
cmd
server
Package main is a server for sample
Package main is a server for sample
Package props is a scaffold file for props of controllers
Package props is a scaffold file for props of controllers
Package service ...
Package service ...
static_page
Package static ...
Package static ...
table
Package table ...
Package table ...
user
Package user ...
Package user ...
user2
Package user2 ...
Package user2 ...
user2/_userID
Package _userID ...
Package _userID ...
user2/_userID/_JobID
Package _JobID ...
Package _JobID ...
Code generated by server_generator.
Code generated by server_generator.

Jump to

Keyboard shortcuts

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