entities

package
v2.2.0-rc77 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToApplicationModel

func ToApplicationModel(application *Application) (*specV1.Application, error)

func ToModuleModel added in v2.2.0

func ToModuleModel(module *Module) (*models.Module, error)

func ToTaskModel added in v2.2.0

func ToTaskModel(task *Task) (*models.Task, error)

Types

type Application

type Application struct {
	Id         uint64    `db:"id"`
	Namespace  string    `db:"namespace"`
	Name       string    `db:"name"`
	Version    string    `db:"version"`
	IsDeleted  int       `db:"is_deleted"`
	CreateTime time.Time `db:"create_time"`
	UpdateTime time.Time `db:"update_time"`
	Content    string    `db:"content"`
}

func FromApplicationModel

func FromApplicationModel(application *specV1.Application) (*Application, error)

type Module added in v2.2.0

type Module struct {
	Id          uint64    `db:"id"`
	Name        string    `db:"name"`
	Version     string    `db:"version"`
	Image       string    `db:"image"`
	Programs    string    `db:"programs"`
	Type        string    `db:"type"`
	IsLatest    bool      `db:"is_latest"`
	Description string    `db:"description"`
	CreateTime  time.Time `db:"create_time"`
	UpdateTime  time.Time `db:"update_time"`
}

func FromModuleModel added in v2.2.0

func FromModuleModel(module *models.Module) (*Module, error)

type Shadow

type Shadow struct {
	Id            int64     `db:"id"`
	Namespace     string    `db:"namespace"`
	Name          string    `db:"name"`
	CreateTime    time.Time `db:"create_time"`
	UpdateTime    time.Time `db:"update_time"`
	Report        string    `db:"report"`
	Desire        string    `db:"desire"`
	ReportMeta    string    `db:"report_meta"`
	DesireMeta    string    `db:"desire_meta"`
	DesireVersion string    `db:"desire_version"`
}

func NewShadowFromShadowModel

func NewShadowFromShadowModel(shadow *models.Shadow) (*Shadow, error)

func (*Shadow) ToShadowModel

func (s *Shadow) ToShadowModel() (*models.Shadow, error)

type Task added in v2.2.0

type Task struct {
	Id               int64     `json:"id,omitempty" db:"id"`
	Name             string    `json:"name,omitempty" db:"name"`
	RegistrationName string    `json:"registrationName" db:"registration_name"`
	Namespace        string    `json:"namespace,omitempty" db:"namespace"`
	ResourceName     string    `json:"resourceName,omitempty" db:"resource_name"`
	ResourceType     string    `json:"resourceType,omitempty" db:"resource_type"`
	Version          int64     `json:"version,omitempty" db:"version"`
	ExpireTime       int64     `json:"expireTime,omitempty" db:"expire_time"`
	Status           int       `json:"status,omitempty" db:"status"`
	Content          string    `json:"content,omitempty" db:"content"`
	CreateTime       time.Time `json:"createTime" db:"create_time"`
	UpdateTime       time.Time `json:"updateTime" db:"update_time"`
}

func FromTaskModel added in v2.2.0

func FromTaskModel(task *models.Task) (*Task, error)

Jump to

Keyboard shortcuts

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