controllers

package
v0.0.0-...-cc7149c Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2025 License: MIT Imports: 17 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

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 ChapterID

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

An ChapterID parameter model.

This is used for operations that want the ID of an order in the path swagger:parameters getChapter updateChapter deleteChapter

type ChapterInput

type ChapterInput struct {
	// The Chapter to submit or modify
	// in: body
	Chapter *orm.ChapterAPI
}

ChapterInput is a schema that can validate the user’s input to prevent us from getting invalid data swagger:parameters postChapter updateChapter

type ContentID

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

An ContentID parameter model.

This is used for operations that want the ID of an order in the path swagger:parameters getContent updateContent deleteContent

type ContentInput

type ContentInput struct {
	// The Content to submit or modify
	// in: body
	Content *orm.ContentAPI
}

ContentInput is a schema that can validate the user’s input to prevent us from getting invalid data swagger:parameters postContent updateContent

type Controller

type Controller struct {

	// Map_BackRepos is the map to the backRepo instance according to the stack instance path
	Map_BackRepos map[string]*ssg_orm.BackRepoStruct
	// contains filtered or unexported fields
}

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 Name parameters in the request the stack instance is the BackRepo instance

func GetController

func GetController() *Controller

func (*Controller) AddBackRepo

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

func (*Controller) DeleteChapter

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

DeleteChapter

swagger:route DELETE /chapters/{ID} chapters deleteChapter

Delete a chapter

default: genericError

200: chapterDBResponse

func (*Controller) DeleteContent

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

DeleteContent

swagger:route DELETE /contents/{ID} contents deleteContent

Delete a content

default: genericError

200: contentDBResponse

func (*Controller) DeletePage

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

DeletePage

swagger:route DELETE /pages/{ID} pages deletePage

Delete a page

default: genericError

200: pageDBResponse

func (*Controller) GetChapter

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

GetChapter

swagger:route GET /chapters/{ID} chapters getChapter

Gets the details for a chapter.

Responses: default: genericError

200: chapterDBResponse

func (*Controller) GetChapters

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

GetChapters

swagger:route GET /chapters chapters getChapters

Get all chapters

Responses: default: genericError

200: chapterDBResponse

func (*Controller) GetContent

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

GetContent

swagger:route GET /contents/{ID} contents getContent

Gets the details for a content.

Responses: default: genericError

200: contentDBResponse

func (*Controller) GetContents

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

GetContents

swagger:route GET /contents contents getContents

Get all contents

Responses: default: genericError

200: contentDBResponse

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) GetPage

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

GetPage

swagger:route GET /pages/{ID} pages getPage

Gets the details for a page.

Responses: default: genericError

200: pageDBResponse

func (*Controller) GetPages

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

GetPages

swagger:route GET /pages pages getPages

Get all pages

Responses: default: genericError

200: pageDBResponse

func (*Controller) PostChapter

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

PostChapter

swagger:route POST /chapters chapters postChapter

Creates a chapter

Consumes:
- application/json

Produces:
- application/json

Responses:
  200: nodeDBResponse

func (*Controller) PostContent

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

PostContent

swagger:route POST /contents contents postContent

Creates a content

Consumes:
- application/json

Produces:
- application/json

Responses:
  200: nodeDBResponse

func (*Controller) PostPage

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

PostPage

swagger:route POST /pages pages postPage

Creates a page

Consumes:
- application/json

Produces:
- application/json

Responses:
  200: nodeDBResponse

func (*Controller) UpdateChapter

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

UpdateChapter

swagger:route PATCH /chapters/{ID} chapters updateChapter

Update a chapter

Responses: default: genericError

200: chapterDBResponse

func (*Controller) UpdateContent

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

UpdateContent

swagger:route PATCH /contents/{ID} contents updateContent

Update a content

Responses: default: genericError

200: contentDBResponse

func (*Controller) UpdatePage

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

UpdatePage

swagger:route PATCH /pages/{ID} pages updatePage

Update a page

Responses: default: genericError

200: pageDBResponse

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 PageID

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

An PageID parameter model.

This is used for operations that want the ID of an order in the path swagger:parameters getPage updatePage deletePage

type PageInput

type PageInput struct {
	// The Page to submit or modify
	// in: body
	Page *orm.PageAPI
}

PageInput is a schema that can validate the user’s input to prevent us from getting invalid data swagger:parameters postPage updatePage

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