runtimes

package
v0.0.0-...-ae4ac97 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2022 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(router *gin.RouterGroup)

func SupportedLang

func SupportedLang(c *gin.Context)

SupportedLang godoc @Summary Return supported languages available @Description Return supported languages available @Tags runtimes @Produce json @Success 200 {object} SupportedLangResp @Router /runtimes/available [get]

Types

type RuntimeImage

type RuntimeImage struct {
	ID           int64     `json:"id" gorm:"primaryKey"`
	Name         string    `json:"name" gorm:"not null"`
	LanguageName string    `json:"language_name" gorm:"not null"` // ForeignKey
	Taskdef      string    `json:"-" gorm:"not null"`             // AWS ECS Task Definition name
	Revision     string    `json:"-" gorm:"not null"`             // Revision number of Task Definition
	Available    bool      `json:"available" gorm:"not null;default:0"`
	CreatedAt    time.Time `json:"-" gorm:"not null"`
}

func GetRuntimeImage

func GetRuntimeImage(id int64) RuntimeImage

type SupportedLangResp

type SupportedLangResp struct {
	Image    []RuntimeImage      `json:"image"`
	Language []SupportedLanguage `json:"language"`
}

type SupportedLanguage

type SupportedLanguage struct {
	Name  string `json:"name" gorm:"primaryKey"`
	Order int8   `json:"order" gorm:"not null;default:0"`

	RuntimeImages []RuntimeImage `json:"-" gorm:"constraint:OnDelete:CASCADE;foreignKey:LanguageName;references:Name"`
}

Jump to

Keyboard shortcuts

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