Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Node ¶
type Node struct {
NodeBll controllers.INode
}
Node - Sample program
func (*Node) Create ¶
Create - Create data @Tags Node @Summary Create data @Param Authorization header string false "Bearer User Token" @Param body body schema.Node true "Create data" @Success 200 {object} schema.Node @Failure 400 {object} schema.HTTPError "{error:{code:0,message: Invalid request parameter}}" @Failure 401 {object} schema.HTTPError "{error:{code:0,message: Unauthorized}}" @Failure 500 {object} schema.HTTPError "{error:{code:0,message: Server Error}}" @Router /api/v1/node [post]
func (*Node) Delete ¶
Delete - Delete data @Tags Node @Summary Delete data @Param Authorization header string false "Bearer User Token" @Param id path string true "Record ID" @Success 200 {object} schema.HTTPStatus "{status:OK}" @Failure 401 {object} schema.HTTPError "{error:{code:0,message: Unauthorized}}" @Failure 500 {object} schema.HTTPError "{error:{code:0,message: Server Error}}" @Router /api/v1/node/{id} [delete]
func (*Node) Get ¶
Get - Query specified data @Tags Node @Summary Query specified data @Param Authorization header string false "Bearer User Token" @Param id path string true "Record ID" @Success 200 {object} schema.Node @Failure 401 {object} schema.HTTPError "{error:{code:0,message: Unauthorized}}" @Failure 404 {object} schema.HTTPError "{error:{code:0,message: Resource does not exist.}}" @Failure 500 {object} schema.HTTPError "{error:{code:0,message: Server Error}}" @Router /api/v1/node/{id} [get]
func (*Node) Query ¶
Query - Query data @Tags Node @Summary Query data @Param Authorization header string false "Bearer User Token" @Param current query int true "Page Index" default(1) @Param pageSize query int true "Paging Size" default(10) @Param code query string false "Numbering" @Param name query string false "Name" @Param status query int false "Status (1: Enable 2: Disable)" @Success 200 {array} schema.Node "Search result: {list:List data,pagination:{current:Page index, pageSize: Page size, total: The total number}}" @Failure 401 {object} schema.HTTPError "{error:{code:0,message: Unauthorized}}" @Failure 500 {object} schema.HTTPError "{error:{code:0,message: Server Error}}" @Router /api/v1/node [get]
func (*Node) Update ¶
Update - Update data @Tags Node @Summary Update data @Param Authorization header string false "Bearer User Token" @Param id path string true "Record ID" @Param body body schema.Node true "Update data" @Success 200 {object} schema.Node @Failure 400 {object} schema.HTTPError "{error:{code:0,message: Invalid request parameter}}" @Failure 401 {object} schema.HTTPError "{error:{code:0,message: Unauthorized}}" @Failure 500 {object} schema.HTTPError "{error:{code:0,message: Server Error}}" @Router /api/v1/node/{id} [put]
type Primitive ¶
type Primitive struct {
PrimitiveBll controllers.IPrimitive
}
Primitive - Sample program
func NewPrimitive ¶
func NewPrimitive(bPrimitive controllers.IPrimitive) *Primitive
NewPrimitive - Create a primitive controller
func (*Primitive) Create ¶
Create - Create data @Tags Primitive @Summary Create data @Param Authorization header string false "Bearer User Token" @Param body body schema.Primitive true "Create data" @Success 200 {object} schema.Primitive @Failure 400 {object} schema.HTTPError "{error:{code:0,message: Invalid request parameter}}" @Failure 401 {object} schema.HTTPError "{error:{code:0,message: Unauthorized}}" @Failure 500 {object} schema.HTTPError "{error:{code:0,message: Server Error}}" @Router /api/v1/primitives [post]
func (*Primitive) Delete ¶
Delete - Delete data @Tags Primitive @Summary Delete data @Param Authorization header string false "Bearer User Token" @Param id path string true "Record ID" @Success 200 {object} schema.HTTPStatus "{status:OK}" @Failure 401 {object} schema.HTTPError "{error:{code:0,message: Unauthorized}}" @Failure 500 {object} schema.HTTPError "{error:{code:0,message: Server Error}}" @Router /api/v1/primitives/{id} [delete]
func (*Primitive) Get ¶
Get - Query specified data @Tags Primitive @Summary Query specified data @Param Authorization header string false "Bearer User Token" @Param id path string true "Record ID" @Success 200 {object} schema.Primitive @Failure 401 {object} schema.HTTPError "{error:{code:0,message: Unauthorized}}" @Failure 404 {object} schema.HTTPError "{error:{code:0,message: Resource does not exist.}}" @Failure 500 {object} schema.HTTPError "{error:{code:0,message: Server Error}}" @Router /api/v1/primitives/{id} [get]
func (*Primitive) Query ¶
Query - Query data @Tags Primitive @Summary Query data @Param Authorization header string false "Bearer User Token" @Param current query int true "Page Index" default(1) @Param pageSize query int true "Paging Size" default(10) @Param code query string false "Numbering" @Param name query string false "Name" @Param status query int false "Status (1: Enable 2: Disable)" @Success 200 {array} schema.Primitive "Search result: {list:List data,pagination:{current:Page index, pageSize: Page size, total: The total number}}" @Failure 401 {object} schema.HTTPError "{error:{code:0,message: Unauthorized}}" @Failure 500 {object} schema.HTTPError "{error:{code:0,message: Server Error}}" @Router /api/v1/primitives [get]
func (*Primitive) Update ¶
Update - Update data @Tags Primitive @Summary Update data @Param Authorization header string false "Bearer User Token" @Param id path string true "Record ID" @Param body body schema.Primitive true "Update data" @Success 200 {object} schema.Primitive @Failure 400 {object} schema.HTTPError "{error:{code:0,message: Invalid request parameter}}" @Failure 401 {object} schema.HTTPError "{error:{code:0,message: Unauthorized}}" @Failure 500 {object} schema.HTTPError "{error:{code:0,message: Server Error}}" @Router /api/v1/primitives/{id} [put]