entities

package
v2.0.1-rc36 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2020 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 ToBatchModel

func ToBatchModel(batch *Batch) *models.Batch

func ToCallbackModel

func ToCallbackModel(c *Callback) *models.Callback

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 Batch

type Batch struct {
	Name            string          `db:"name"`
	Namespace       string          `db:"namespace"`
	Description     string          `db:"description"`
	QuotaNum        int             `db:"quota_num"`
	EnableWhitelist int             `db:"enable_whitelist"`
	SecurityType    common.Security `db:"security_type"`
	SecurityKey     string          `db:"security_key"`
	CallbackName    string          `db:"callback_name"`
	CreateTime      time.Time       `db:"create_time"`
	UpdateTime      time.Time       `db:"update_time"`
	Labels          string          `db:"labels"`
	Fingerprint     string          `db:"fingerprint"`
}

func FromBatchModel

func FromBatchModel(batch *models.Batch) *Batch

type Callback

type Callback struct {
	Name        string    `db:"name"`
	Namespace   string    `db:"namespace"`
	Method      string    `db:"method"`
	Url         string    `db:"url"`
	Params      string    `db:"params"`
	Header      string    `db:"header"`
	Body        string    `db:"body"`
	Description string    `db:"description"`
	CreateTime  time.Time `db:"create_time"`
	UpdateTime  time.Time `db:"update_time"`
}

func FromCallbackModel

func FromCallbackModel(c *models.Callback) *Callback

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"`
}

func NewShadowFromShadowModel

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

func (*Shadow) ToShadowModel

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

Jump to

Keyboard shortcuts

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