server

package
v0.0.0-...-ded32d3 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2018 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const Layout = "2006-01-02 15:04:05"

Layout parse time

Variables

This section is empty.

Functions

func ParseAndValidate

func ParseAndValidate(form *TimeframeForm, flag string) (*v1alpha1.Timeframe, error)

func ValidateApplication

func ValidateApplication(application *v1alpha1.Application) error

Types

type Controller

type Controller interface {
	CreateApplication(c *gin.Context)
	GetApplication(c *gin.Context)
	ListApplications(c *gin.Context)
	DeleteApplication(c *gin.Context)

	GetResource(c *gin.Context)
	DeleteResource(c *gin.Context)
	CreateResource(c *gin.Context)
	ListResource(c *gin.Context)
	ListTimeframeResource(c *gin.Context)
	DeleteTimeframeResource(c *gin.Context)
	GetTimeframeResource(c *gin.Context)

	CreateTimeframe(c *gin.Context)
	GetTimeframe(c *gin.Context)
	UpdateTimeframe(c *gin.Context)
	ListTimeframes(c *gin.Context)
	DeleteTimeframe(c *gin.Context)
}

func NewController

func NewController(store store.Store) Controller

type TestResource

type TestResource struct {
	CPULimit    int64 `json:"cpu_limit"`
	MemoryLimit int64 `json:"memory_limit"`
}

type TimeframeForm

type TimeframeForm struct {
	ID          int64  `json:"id"`
	Name        string `json:"name"`
	Start       string `form:"start"`
	End         string `form:"end"`
	Status      string `json:"status"`
	Description string `form:"description"`
}

Jump to

Keyboard shortcuts

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