controller

package
v0.0.0-...-e9f2f75 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2023 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller struct {
}

func NewController

func NewController() *Controller

func (*Controller) GetInfo

func (c *Controller) GetInfo(ctx *gin.Context)

GetInfo godoc

@Summary		Get information
@Description	Display the information for current node
@Tags			info
@Accept			json
@Produce		json
@Success		200	{object}	model.Config
@Failure		500	{object}	model.APIError
@Router			/info [get]

func (*Controller) GetLog

func (c *Controller) GetLog(ctx *gin.Context)

GetLog godoc

@Summary		Get running log
@Description	Display the log for current node
@Tags			log
@Accept			json
@Produce		plain
@Success		200
@Failure		500	{object}	model.APIError
@Router			/log [get]

func (*Controller) RunScript

func (c *Controller) RunScript(ctx *gin.Context)

RunScript godoc

		@Summary		Flash elf to the board, and unzip the script.zip file and run script according to autorun.sh
		@Description	Accept two files from formData, and cache them to the file system. Then flashing the elf onto the board, then run the autorun.sh
		@Tags			script
		@Accept			multipart/form-data
		@Produce		text/plain
	    @Param          elf  formData  file  true  "elf file for flashing onto the board"
        @Param          script  formData  file  true  "zipped script file with an autorun.sh in the root directory"
		@Success		200
		@Failure		500	{object}	model.APIError
		@Router			/script [post]

type LogrusEntryWriter

type LogrusEntryWriter struct {
	Entry *logrus.Entry
}

func (*LogrusEntryWriter) Write

func (lew *LogrusEntryWriter) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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