Documentation ¶
Index ¶
Constants ¶
View Source
const ( StatusOn = "on" StatusOff = "off" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Application struct { ID int64 `json:"id" form:"id" xorm:"pk autoincr 'id'"` Name string `json:"name" form:"name" xorm:"name"` Created time.Time `json:"created" xorm:"created"` Updated time.Time `json:"updated" xorm:"updated"` Deleted time.Time `json:"deleted" xorm:"deleted"` }
Application defines application info.
type ApplicationResource ¶
type ApplicationResource struct { ID int64 `json:"id"` Name string `json:"name"` ContainerResource []*ContainerResource `json:"container_resource"` }
type ApplicationStore ¶
type ApplicationStore interface { // Application CRUD CreateApplication(application *Application) error GetApplication(name string) (*Application, error) ListApplication() ([]*Application, error) UpdateApplication(application *Application) error DeleteApplication(application *Application) error }
type ContainerResource ¶
type ContainerResource struct { ID int64 `json:"id" xorm:"pk autoincr 'id'"` Name string `json:"name" xorm:"name"` ApplicationID int64 `json:"application_id" xorm:"application_id"` TimeframeID int64 `json:"timeframe_id" xorm:"timeframe_id"` CPULimit int64 `json:"cpu_limit" xorm:"cpu_limit"` MemoryLimit int64 `json:"memory_limit" xorm:"memory_limit"` DiskReadIOLimit int64 `json:"disk_read_io_limit" xorm:"disk_read_io_limit"` DiskWriteIOLimit int64 `json:"disk_write_io_limit" xorm:"disk_write_io_limit"` NetworkReceiveIOLimit int64 `json:"network_receive_io_limit" xorm:"network_receive_io_limit"` NetworkTransmitIOLimit int64 `json:"network_transmit_io_limit" xorm:"network_transmit_io_limit"` Created time.Time `json:"created" xorm:"created"` Updated time.Time `json:"updated" xorm:"updated"` }
ContainerResource defines container of application resource
type RecommendResourceStore ¶
type RecommendResourceStore interface { // RecommendResource CRUD GetApplicationResource(name string) (*ApplicationResource, error) DeleteApplicationResource(name string) error DeleteTimeframeResource(name string) error ListApplicationResource() ([]*ApplicationResource, error) AddOrUpdateContainerResource(resource []*ContainerResource) error ListTimeframeApplicationResource(name string) ([]*ApplicationResource, error) GetTimeframeApplicationResource(name, appName string) (*ApplicationResource, error) }
RecommendResourceStore defines store RecommendResource
type StatusName ¶
type StatusName string
type Timeframe ¶
type Timeframe struct { ID int64 `json:"id" xorm:"pk autoincr 'id'"` Name string `json:"name" xorm:"name"` Start time.Time `json:"start" xorm:"start"` End time.Time `json:"end" xorm:"end"` Status string `json:"status" xorm:"status"` Description string `json:"description" xorm:"description"` Created time.Time `json:"created" xorm:"created"` Updated time.Time `json:"updated" xorm:"updated"` Deleted time.Time `json:"deleted" xorm:"deleted"` }
Timeframe defines query time frame
type TimeframeStore ¶
Click to show internal directories.
Click to hide internal directories.