function

package
v0.0.0-...-e07aaa2 Latest Latest
Warning

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

Go to latest
Published: May 23, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigureRoutes

func ConfigureRoutes(router *gin.Engine, db *gorm.DB, minioClient *minio.Client, builderEndpoint string, scheduler scheduler.Scheduler)

Types

type BuilderRequest

type BuilderRequest struct {
	Id      string            `json:"id"`
	Files   map[string]string `json:"files"`
	Variant string            `json:"variant"`
}

type Controller

type Controller struct {
	CodeStorageService *objectStorage.CodeStorageService
	DB                 *gorm.DB
	BuilderEndpoint    string
	Scheduler          *scheduler.Scheduler
}

func (*Controller) DeleteFunction

func (cont *Controller) DeleteFunction(c *gin.Context)

func (*Controller) GetAllFunction

func (cont *Controller) GetAllFunction(c *gin.Context)

func (*Controller) GetOneFunction

func (cont *Controller) GetOneFunction(c *gin.Context)

func (*Controller) PostFunction

func (cont *Controller) PostFunction(c *gin.Context)

func (*Controller) PutFunction

func (cont *Controller) PutFunction(c *gin.Context)

func (*Controller) RunFunction

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

type CreateFunctionDTO

type CreateFunctionDTO struct {
	Name        string            `json:"name" binding:"required"`
	Description string            `json:"description" binding:"required"`
	Language    string            `json:"language" binding:"required"`
	Files       map[string]string `json:"files" binding:"required"`
}

type ExecutionResponse

type ExecutionResponse struct {
	Status  int               `json:"status"`
	Body    interface{}       `json:"body"`
	Headers map[string]string `json:"headers"`
}

type ExecutionResultDTO

type ExecutionResultDTO struct {
	Time     int64             `json:"time"`
	Response ExecutionResponse `json:"response"`
}

type GetFunctionDTO

type GetFunctionDTO struct {
	Name           string            `json:"name"`
	Description    string            `json:"description"`
	Language       string            `json:"language"`
	Files          map[string]string `json:"files"`
	Built          bool              `json:"built"`
	BuildTimestamp int64             `json:"build_timestamp"`
	OwnerID        int               `json:"owner_id"`
}

Jump to

Keyboard shortcuts

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