controllers

package
v0.0.0-...-359db49 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

generated code - do not edit

generated code - do not edit

generated code - do not edit

generated code - do not edit

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(r *gin.Engine)

Types

type AID

type AID struct {
	// The ID of the order
	//
	// in: path
	// required: true
	ID int64
}

An AID parameter model.

This is used for operations that want the ID of an order in the path swagger:parameters getA updateA deleteA

type AInput

type AInput struct {
	// The A to submit or modify
	// in: body
	A *orm.AAPI
}

AInput is a schema that can validate the user’s input to prevent us from getting invalid data swagger:parameters postA updateA

type BID

type BID struct {
	// The ID of the order
	//
	// in: path
	// required: true
	ID int64
}

An BID parameter model.

This is used for operations that want the ID of an order in the path swagger:parameters getB updateB deleteB

type BInput

type BInput struct {
	// The B to submit or modify
	// in: body
	B *orm.BAPI
}

BInput is a schema that can validate the user’s input to prevent us from getting invalid data swagger:parameters postB updateB

type Controller

type Controller struct {

	// Map_BackRepos is the map to the backRepo instance according to the stack instance path
	Map_BackRepos map[string]*test2_orm.BackRepoStruct
}

A Controller is the handler of all API REST calls matching the stack model It forwards API requests to the stack instance identified by the GONG_StackPath parameters in the request the stack instance is the BackRepo instance

func GetController

func GetController() *Controller

func (*Controller) AddBackRepo

func (controller *Controller) AddBackRepo(backRepo *test2_orm.BackRepoStruct, stackPath string)

func (*Controller) DeleteA

func (controller *Controller) DeleteA(c *gin.Context)

DeleteA

swagger:route DELETE /as/{ID} as deleteA

Delete a a

default: genericError

200: aDBResponse

func (*Controller) DeleteB

func (controller *Controller) DeleteB(c *gin.Context)

DeleteB

swagger:route DELETE /bs/{ID} bs deleteB

Delete a b

default: genericError

200: bDBResponse

func (*Controller) GetA

func (controller *Controller) GetA(c *gin.Context)

GetA

swagger:route GET /as/{ID} as getA

Gets the details for a a.

Responses: default: genericError

200: aDBResponse

func (*Controller) GetAs

func (controller *Controller) GetAs(c *gin.Context)

GetAs

swagger:route GET /as as getAs

Get all as

Responses: default: genericError

200: aDBResponse

func (*Controller) GetB

func (controller *Controller) GetB(c *gin.Context)

GetB

swagger:route GET /bs/{ID} bs getB

Gets the details for a b.

Responses: default: genericError

200: bDBResponse

func (*Controller) GetBs

func (controller *Controller) GetBs(c *gin.Context)

GetBs

swagger:route GET /bs bs getBs

Get all bs

Responses: default: genericError

200: bDBResponse

func (*Controller) GetLastCommitFromBackNb

func (controller *Controller) GetLastCommitFromBackNb(c *gin.Context)

swagger:route GET /commitfrombacknb backrepo GetLastCommitFromBackNb

func (*Controller) GetLastPushFromFrontNb

func (controller *Controller) GetLastPushFromFrontNb(c *gin.Context)

swagger:route GET /pushfromfrontnb backrepo GetLastPushFromFrontNb

func (*Controller) PostA

func (controller *Controller) PostA(c *gin.Context)

PostA

swagger:route POST /as as postA

Creates a a

Consumes:
- application/json

Produces:
- application/json

Responses:
  200: nodeDBResponse

func (*Controller) PostB

func (controller *Controller) PostB(c *gin.Context)

PostB

swagger:route POST /bs bs postB

Creates a b

Consumes:
- application/json

Produces:
- application/json

Responses:
  200: nodeDBResponse

func (*Controller) UpdateA

func (controller *Controller) UpdateA(c *gin.Context)

UpdateA

swagger:route PATCH /as/{ID} as updateA

Update a a

Responses: default: genericError

200: aDBResponse

func (*Controller) UpdateB

func (controller *Controller) UpdateB(c *gin.Context)

UpdateB

swagger:route PATCH /bs/{ID} bs updateB

Update a b

Responses: default: genericError

200: bDBResponse

type GenericError

type GenericError struct {
	// in: body
	Body struct {
		Code    int32  `json:"code"`
		Message string `json:"message"`
	} `json:"body"`
}

A GenericError is the default error message that is generated. For certain status codes there are more appropriate error structures.

swagger:response genericError

type ValidationError

type ValidationError struct {
	// in: body
	Body struct {
		Code    int32  `json:"code"`
		Message string `json:"message"`
		Field   string `json:"field"`
	} `json:"body"`
}

A ValidationError is an that is generated for validation failures. It has the same fields as a generic error but adds a Field property.

swagger:response validationError

Jump to

Keyboard shortcuts

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