models

package
v2.6.1 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2023 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NodeTypeSingle  = "single"
	NodeTypeCluster = "cluster"

	ReadyTypeOnline    = "online"
	ReadyTypOffline    = "offline"
	ReadyTypeUninstall = "uninstall"

	NodeSortAsc  = "asc"
	NodeSortDesc = "desc"
)

Variables

This section is empty.

Functions

func BuildEmptyApps

func BuildEmptyApps() map[string]interface{}

func EqualConfig

func EqualConfig(config1, config2 *specV1.Configuration) bool

func GetPagingParam added in v2.2.0

func GetPagingParam(listOptions *ListOptions, resLen int) (start, end int)

Types

type Activation

type Activation struct {
	FingerprintValue string            `json:"fingerprintValue,omitempty" db:"fingerprint_value"`
	PenetrateData    map[string]string `json:"penetrateData,omitempty" db:"penetrate_data"`
}

type AltNames

type AltNames struct {
	DNSNames []string   `json:"dnsNames,omitempty"`
	IPs      []net.IP   `json:"ips,omitempty"`
	Emails   []string   `json:"emails,omitempty"`
	URIs     []*url.URL `json:"uris,omitempty"`
}

AltNames contains the domain names and IP addresses that will be added to the API Server's x509 certificate SubAltNames field. The values will be passed directly to the x509.Certificate object.

type AppItem

type AppItem struct {
	Name              string                `json:"name,omitempty" binding:"omitempty,res_name"`
	Mode              string                `json:"mode,omitempty" default:"kube"`
	Type              string                `json:"type,omitempty" default:"container"`
	Labels            map[string]string     `json:"labels,omitempty"`
	Selector          string                `json:"selector"`
	NodeSelector      string                `json:"nodeSelector"`
	Version           string                `json:"version,omitempty"`
	Namespace         string                `json:"namespace,omitempty"`
	CreationTimestamp time.Time             `json:"createTime,omitempty"`
	Description       string                `json:"description,omitempty"`
	System            bool                  `json:"system,omitempty"`
	CronStatus        specV1.CronStatusCode `json:"cronStatus,omitempty" default:"0"`
	CronTime          time.Time             `json:"cronTime,omitempty"`
	HostNetwork       bool                  `json:"hostNetwork,omitempty" yaml:"hostNetwork,omitempty"` // specifies host network mode of service
	Replica           int                   `json:"replica,omitempty" yaml:"replica,omitempty" binding:"required" default:"1"`
	Workload          string                `json:"workload,omitempty" yaml:"workload,omitempty"` // deployment | daemonset | statefulset | job
	JobConfig         *specV1.AppJobConfig  `json:"jobConfig,omitempty" yaml:"jobConfig,omitempty"`
	Ota               specV1.OtaInfo        `json:"ota,omitempty"`
	AutoScaleCfg      *specV1.AutoScaleCfg  `json:"autoScaleCfg,omitempty"`
}

type ApplicationList

type ApplicationList struct {
	Total        int `json:"total"`
	*ListOptions `json:",inline"`
	Items        []AppItem `json:"items"`
}

ApplicationList app List

type ApplicationView

type ApplicationView struct {
	Name              string                `json:"name,omitempty" binding:"res_name"`
	Mode              string                `json:"mode,omitempty" default:"kube"`
	Type              string                `json:"type,omitempty" default:"container"`
	Labels            map[string]string     `json:"labels,omitempty"`
	Namespace         string                `json:"namespace,omitempty"`
	CreationTimestamp time.Time             `json:"createTime,omitempty"`
	Version           string                `json:"version,omitempty"`
	Selector          string                `json:"selector,omitempty"`
	NodeSelector      string                `json:"nodeSelector,omitempty"`
	InitServices      []ServiceView         `json:"initServices,omitempty" binding:"dive"`
	Services          []ServiceView         `json:"services,omitempty" binding:"dive"`
	Volumes           []VolumeView          `json:"volumes,omitempty" binding:"dive"`
	Description       string                `json:"description,omitempty"`
	System            bool                  `json:"system,omitempty"`
	Registries        []RegistryView        `json:"registries,omitempty"`
	CronStatus        specV1.CronStatusCode `json:"cronStatus" default:"0"`
	CronTime          time.Time             `json:"cronTime,omitempty"`
	HostNetwork       bool                  `json:"hostNetwork,omitempty"` // specifies host network mode of service
	DNSPolicy         v1.DNSPolicy          `json:"dnsPolicy,omitempty" default:"ClusterFirst"`
	Replica           int                   `json:"replica"`
	Workload          string                `json:"workload,omitempty"` // deployment | daemonset | statefulset | job
	JobConfig         *specV1.AppJobConfig  `json:"jobConfig,omitempty"`
	Ota               specV1.OtaInfo        `json:"ota,omitempty"`
	AutoScaleCfg      *specV1.AutoScaleCfg  `json:"autoScaleCfg,omitempty"`
}

func (*ApplicationView) ImageTrim added in v2.6.1

func (a *ApplicationView) ImageTrim()

type Bucket

type Bucket struct {
	Name         string    `json:"name,omitempty"`
	CreationDate time.Time `json:"createTime,omitempty"`
}

type BucketsView

type BucketsView struct {
	Buckets []Bucket `json:"buckets"`
}

type CertStorage

type CertStorage struct {
	CertName string
	KeyName  string
}

CertStorage contains certName and keyName which can be used to storage certificate and private key pem data to secret.

type Certificate

type Certificate struct {
	Name               string              `json:"name,omitempty" binding:"omitempty,res_name"`
	Namespace          string              `json:"namespace,omitempty"`
	SignatureAlgorithm string              `json:"signatureAlgorithm,omitempty"`
	EffectiveTime      string              `json:"effectiveTime,omitempty"`
	ExpiredTime        string              `json:"expiredTime,omitempty"`
	SerialNumber       string              `json:"serialNumber,omitempty"`
	Issuer             string              `json:"issuer,omitempty"`
	FingerPrint        string              `json:"fingerPrint,omitempty"`
	Data               CertificateDataItem `json:"data,omitempty"`
	CreationTimestamp  time.Time           `json:"createTime,omitempty"`
	UpdateTimestamp    time.Time           `json:"updateTime,omitempty"`
	Description        string              `json:"description"`
	Version            string              `json:"version,omitempty"`
}

Certificate Certificate

func FromSecretToCertificate

func FromSecretToCertificate(s *specV1.Secret, needToFilter bool) *Certificate

func (*Certificate) Equal

func (r *Certificate) Equal(target *Certificate) bool

func (*Certificate) ParseCertInfo

func (r *Certificate) ParseCertInfo() error

func (*Certificate) ToSecret

func (r *Certificate) ToSecret() *specV1.Secret

type CertificateDataItem

type CertificateDataItem struct {
	Key         string `json:"key,omitempty"`
	Certificate string `json:"certificate,omitempty"`
}

type CertificateList

type CertificateList struct {
	Total        int `json:"total"`
	*ListOptions `json:",inline"`
	Items        []Certificate `json:"items"`
}

CertificateList Certificate List

func FromSecretListToCertificateList

func FromSecretListToCertificateList(s *SecretList, needToFilter bool) *CertificateList

type ConfigDataItem

type ConfigDataItem struct {
	Key   string            `json:"key,omitempty" binding:"required,config_key"`
	Value map[string]string `json:"value,omitempty"`
}

type ConfigFunctionItem

type ConfigFunctionItem struct {
	ConfigObjectItem `json:",inline"`
	Function         string `json:"function,omitempty"`
	Version          string `json:"version,omitempty"`
	Runtime          string `json:"runtime,omitempty"`
	Handler          string `json:"handler,omitempty"`
}

type ConfigObjectItem

type ConfigObjectItem struct {
	Source        string `json:"source,omitempty"`
	Account       string `json:"account,omitempty"`
	Endpoint      string `json:"endpoint,omitempty"`
	Bucket        string `json:"bucket,omitempty"`
	Object        string `json:"object,omitempty"`
	Unpack        string `json:"unpack,omitempty"`
	MD5           string `json:"md5,omitempty"`
	Ak            string `json:"ak,omitempty"`
	Sk            string `json:"sk,omitempty"`
	AddressFormat string `json:"addressFormat,omitempty" default:"pathStyle"`
}

type ConfigurationList

type ConfigurationList struct {
	Total        int `json:"total"`
	*ListOptions `json:",inline"`
	Items        []specV1.Configuration `json:"items"`
}

ConfigurationList Configuration List

type ConfigurationView

type ConfigurationView struct {
	Name              string            `json:"name,omitempty" binding:"res_name"`
	Namespace         string            `json:"namespace,omitempty"`
	Labels            map[string]string `json:"labels,omitempty"`
	Data              []ConfigDataItem  `json:"data,omitempty" default:"[]" binding:"dive"`
	CreationTimestamp time.Time         `json:"createTime,omitempty"`
	UpdateTimestamp   time.Time         `json:"updateTime,omitempty"`
	Description       string            `json:"description,omitempty"`
	Version           string            `json:"version,omitempty"`
	System            bool              `json:"system,omitempty"`
}

type Cron added in v2.3.0

type Cron struct {
	Id        uint64    `json:"id,omitempty"`
	Namespace string    `json:"namespace,omitempty"`
	Name      string    `json:"name,omitempty" binding:"res_name"`
	Selector  string    `json:"selector,omitempty"`
	CronTime  time.Time `json:"cronTime,omitempty"`
}

type DesireRequest

type DesireRequest struct {
	Resources []*Resource `yaml:"resources,omitempty" json:"resources,omitempty"`
}

type DesireResponse

type DesireResponse struct {
	Resources []*Resource `yaml:"resources,omitempty" json:"resources,omitempty"`
}

type ExternalObjectInfo

type ExternalObjectInfo struct {
	Endpoint      string `form:"endpoint,omitempty"`
	Ak            string `form:"ak,omitempty"`
	Sk            string `form:"sk,omitempty"`
	SessionToken  string `form:"sessionToken,omitempty"`
	Region        string `form:"region,omitempty"`
	AddressFormat string `form:"addressFormat,omitempty"`
}

type Filter

type Filter struct {
	PageNo   int    `form:"pageNo" json:"pageNo,omitempty"`
	PageSize int    `form:"pageSize" json:"pageSize,omitempty"`
	Name     string `form:"name,omitempty" json:"name,omitempty"`
}

func (*Filter) GetFuzzyName

func (f *Filter) GetFuzzyName() string

func (*Filter) GetLimitNumber

func (f *Filter) GetLimitNumber() int

func (*Filter) GetLimitOffset

func (f *Filter) GetLimitOffset() int

type Function

type Function struct {
	Name    string       `yaml:"name,omitempty" json:"name,omitempty" binding:"omitempty,res_name,nonbaetyl"`
	Handler string       `yaml:"handler,omitempty" json:"handler,omitempty"`
	Version string       `yaml:"version,omitempty" json:"version,omitempty"`
	Runtime string       `yaml:"runtime,omitempty" json:"runtime,omitempty"`
	Code    FunctionCode `yaml:"code,omitempty" json:"code,omitempty"`
}

type FunctionCode

type FunctionCode struct {
	Size     int32  `yaml:"size,omitempty" json:"size,omitempty"`
	Sha256   string `yaml:"sha256,omitempty" json:"sha256,omitempty"`
	Location string `yaml:"location,omitempty" json:"location,omitempty"`
}

type FunctionList added in v2.6.1

type FunctionList struct {
	Functions []string `json:"functions"`
}

type FunctionSource

type FunctionSource struct {
	Name string `json:"name,omitempty"`
}

type FunctionSourceView

type FunctionSourceView struct {
	Sources  []FunctionSource  `json:"sources"`
	Runtimes map[string]string `json:"runtimes"`
}

type FunctionView

type FunctionView struct {
	Functions []Function `json:"functions"`
}

type Index

type Index struct {
	// contains filtered or unexported fields
}

type InitCMD added in v2.3.0

type InitCMD struct {
	CMD    string `json:"cmd,omitempty"`
	APK    string `json:"apk,omitempty"`
	APKSys string `json:"apk_sys,omitempty"`
}

type ListObjectsResult

type ListObjectsResult struct {
	Name           string
	Prefix         string
	Delimiter      string
	Marker         string
	NextMarker     string
	MaxKeys        int64
	IsTruncated    bool
	Contents       []ObjectSummaryType
	CommonPrefixes []PrefixType
}

type ListOptions

type ListOptions struct {
	LabelSelector string `form:"selector,omitempty" json:"selector,omitempty"`
	NodeSelector  string `form:"nodeSelector,omitempty" json:"nodeSelector,omitempty"`
	FieldSelector string `form:"fieldSelector,omitempty" json:"fieldSelector,omitempty"`
	KeywordType   string `form:"keywordType,omitempty" json:"keywordType,omitempty"`
	Keyword       string `form:"keyword,omitempty" json:"keyword,omitempty"`
	Alias         string `form:"alias,omitempty" json:"alias,omitempty"`
	Limit         int64  `form:"limit,omitempty" json:"limit,omitempty"`
	Continue      string `form:"continue,omitempty" json:"continue,omitempty"`
	NodeOptions   `json:",inline"`
	Filter        `json:",inline"`
}

func (*ListOptions) GetFuzzyAlias added in v2.4.3

func (l *ListOptions) GetFuzzyAlias() string

func (*ListOptions) GetFuzzyKeyword added in v2.4.3

func (l *ListOptions) GetFuzzyKeyword() string

func (*ListOptions) NodeOptionsCheck added in v2.6.1

func (l *ListOptions) NodeOptionsCheck() error

type MisData

type MisData struct {
	Count int         `json:"count,omitempty"`
	Rows  interface{} `json:"rows,omitempty"`
}

type Module added in v2.2.0

type Module struct {
	Name              string            `json:"name,omitempty"`
	Version           string            `json:"version,omitempty"`
	Image             string            `json:"image,omitempty"`
	Programs          map[string]string `json:"programs,omitempty"`
	Type              string            `json:"type,omitempty"`
	Flag              int               `json:"flag"`
	IsLatest          bool              `json:"isLatest,omitempty"`
	Description       string            `json:"description,omitempty"`
	CreationTimestamp time.Time         `json:"createTime,omitempty"`
	UpdateTimestamp   time.Time         `json:"updateTime,omitempty"`
}

type ModuleList added in v2.4.3

type ModuleList struct {
	Total    int         `json:"total"`
	PageNo   int         `json:"pageNo,omitempty"`
	PageSize int         `json:"pageSize,omitempty"`
	Items    interface{} `json:"items"`
}

type Namespace

type Namespace struct {
	Name string `json:"name,omitempty" binding:"namespace"`
}

Namespace Namespace

type NamespaceList added in v2.2.0

type NamespaceList struct {
	Total        int `json:"total"`
	*ListOptions `json:",inline"`
	Items        []Namespace `json:"items"`
}

NamespaceList namespace list

type NodeCoreConfigs added in v2.2.0

type NodeCoreConfigs struct {
	Version string `yaml:"version,omitempty" json:"version,omitempty"`
	// unit: seconds
	Frequency  int    `yaml:"frequency,omitempty" json:"frequency,omitempty"`
	APIPort    int    `yaml:"apiport,omitempty" json:"apiport,omitempty"`
	AgentPort  int    `yaml:"agentport,omitempty" json:"agentport,omitempty" default:"30080"`
	LogLevel   string `yaml:"logLevel,omitempty" json:"logLevel,omitempty" default:"debug" binding:"omitempty,oneof=debug info warn error"`
	ByteUnit   string `yaml:"byteUnit,omitempty" json:"byteUnit,omitempty" default:"KB" `
	SpeedLimit int    `yaml:"speedLimit,omitempty" json:"speedLimit,omitempty" default:"0"`
}

type NodeCoreVersions added in v2.2.0

type NodeCoreVersions struct {
	Versions []string `yaml:"versions,omitempty" json:"versions,omitempty"`
}

type NodeList

type NodeList struct {
	Total        int `json:"total"`
	*ListOptions `json:",inline"`
	Items        []specV1.Node `json:"items"`
}

NodeList node list

type NodeMode added in v2.1.1

type NodeMode struct {
	Mode string `yaml:"mode,omitempty" json:"mode,omitempty"`
}

type NodeNames

type NodeNames struct {
	Names []string `json:"names," binding:"max=20"`
}

type NodeOptionalSysApps added in v2.2.0

type NodeOptionalSysApps struct {
	Apps []NodeSysAppView `yaml:"apps,omitempty" json:"apps,omitempty"`
}

type NodeOptions added in v2.6.1

type NodeOptions struct {
	Cluster    string `form:"cluster,omitempty" json:"cluster,omitempty" `
	Ready      string `form:"ready,omitempty" json:"ready,omitempty" `
	CreateSort string `form:"createSort,omitempty" json:"createSort,omitempty" `
}

type NodeProperties added in v2.1.1

type NodeProperties struct {
	State NodePropertiesState    `yaml:"state,omitempty" json:"state,omitempty"`
	Meta  NodePropertiesMetadata `yaml:"metadata,omitempty" json:"metadata,omitempty"`
}

type NodePropertiesMetadata added in v2.1.1

type NodePropertiesMetadata struct {
	ReportMeta map[string]interface{} `yaml:"report,omitempty" json:"report,omitempty"`
	DesireMeta map[string]interface{} `yaml:"desire,omitempty" json:"desire,omitempty"`
}

type NodePropertiesState added in v2.1.1

type NodePropertiesState struct {
	Report map[string]interface{} `yaml:"report,omitempty" json:"report,omitempty"`
	Desire map[string]interface{} `yaml:"desire,omitempty" json:"desire,omitempty"`
}

type NodeProperty added in v2.1.1

type NodeProperty struct {
	Name    string        `yaml:"name,omitempty" json:"name,omitempty"`
	Type    string        `yaml:"type,omitempty" json:"type,omitempty"`
	Current PropertyValue `yaml:"current,omitempty" json:"current,omitempty"`
	Expect  PropertyValue `yaml:"expect,omitempty" json:"expect,omitempty"`
}

type NodeSysAppInfo added in v2.2.0

type NodeSysAppInfo struct {
	Name        string            `yaml:"name,omitempty" json:"name,omitempty"`
	Image       string            `yaml:"image,omitempty" json:"image,omitempty"`
	Description string            `yaml:"description,omitempty" json:"description,omitempty"`
	Programs    map[string]string `yaml:"programs,omitempty" json:"programs,omitempty"`
}

type NodeSysAppView added in v2.2.0

type NodeSysAppView struct {
	Name        string `yaml:"name,omitempty" json:"name,omitempty"`
	Description string `yaml:"description,omitempty" json:"description,omitempty"`
}

type NodeViewList

type NodeViewList struct {
	Total        int `json:"total"`
	*ListOptions `json:",inline"`
	Items        []specV1.NodeView `json:"items"`
}

NodeViewList node view list

type Object

type Object struct {
	ObjectMeta
	Body io.ReadCloser
}

type ObjectMeta

type ObjectMeta struct {
	AcceptRanges       string
	CacheControl       string
	ContentDisposition string
	ContentEncoding    string
	ContentLength      int64
	ContentType        string
	ETag               string
	Expires            string
	LastModified       time.Time
	StorageClass       string
}

type ObjectParams

type ObjectParams struct {
	Marker    string
	MaxKeys   int64
	Prefix    string
	Delimiter string
}

type ObjectRequestParams

type ObjectRequestParams struct {
	Source             string             `json:"source,omitempty"`
	Bucket             string             `json:"bucket,omitempty"`
	Object             string             `form:"object,omitempty"`
	Account            string             `form:"account,omitempty"`
	ExternalObjectInfo ExternalObjectInfo `form:",inline"`
}

type ObjectStorageSource

type ObjectStorageSource struct {
	Name string `json:"name,omitempty"`
}

type ObjectStorageSourceV2

type ObjectStorageSourceV2 struct {
	AccountEnabled bool `json:"accountEnabled,omitempty"`
}

type ObjectStorageSourceView

type ObjectStorageSourceView struct {
	Sources []ObjectStorageSource `json:"sources"`
}

type ObjectStorageSourceViewV2

type ObjectStorageSourceViewV2 struct {
	Sources map[string]ObjectStorageSourceV2 `json:"sources"`
}

type ObjectSummaryType

type ObjectSummaryType struct {
	ETag         string
	Key          string
	LastModified time.Time
	Size         int64
	StorageClass string
}

type ObjectURL

type ObjectURL struct {
	URL   string `json:"url,omitempty"`
	MD5   string `json:"md5,omitempty"`
	Token string `json:"token,omitempty"`
}

type ObjectView

type ObjectView struct {
	Name string `json:"name,omitempty"`
}

type ObjectsView

type ObjectsView struct {
	Objects []ObjectView `json:"objects"`
}

type PEMCredential

type PEMCredential struct {
	CertPEM []byte
	KeyPEM  []byte
	CertId  string
}

PEMCredential holds a certificate, private key pem data

type Package

type Package struct {
	Url string `json:"url,omitempty"`
	MD5 string `json:"md5,omitempty"`
	Cmd string `json:"cmd,omitempty"`
}

type PackageParam

type PackageParam struct {
	Platform string `form:"platform"`
}

type PrefixType

type PrefixType struct {
	Prefix string
}

type Property

type Property struct {
	Name       string    `yaml:"name,omitempty" json:"name,omitempty" db:"name"`
	Value      string    `yaml:"value,omitempty" json:"value,omitempty" db:"value"`
	CreateTime time.Time `yaml:"createTime,omitempty" json:"createTime,omitempty" db:"create_time"`
	UpdateTime time.Time `yaml:"updateTime,omitempty" json:"updateTime,omitempty" db:"update_time"`
}

type PropertyValue added in v2.1.1

type PropertyValue struct {
	Value      string `yaml:"value,omitempty" json:"value,omitempty"`
	UpdateTime string `yaml:"updateTime,omitempty" json:"updateTime,omitempty"`
}

type Quota added in v2.1.1

type Quota struct {
	Namespace string `json:"namespace" binding:"required"`
	QuotaName string `json:"quotaName,omitempty"`
	Quota     int    `json:"quota" default:"0"`
	UsedNum   int    `json:"usedNum" default:"0"`
}

Quota

type Registry

type Registry struct {
	Name              string    `json:"name,omitempty" binding:"omitempty,res_name"`
	Namespace         string    `json:"namespace,omitempty"`
	Address           string    `json:"address"`
	Username          string    `json:"username"`
	Password          string    `json:"password,omitempty"`
	CreationTimestamp time.Time `json:"createTime,omitempty"`
	UpdateTimestamp   time.Time `json:"updateTime,omitempty"`
	Description       string    `json:"description"`
	Version           string    `json:"version,omitempty"`
}

Registry Registry

func FromSecretToRegistry

func FromSecretToRegistry(s *specV1.Secret, needToFilter bool) *Registry

func (*Registry) Equal

func (r *Registry) Equal(target *Registry) bool

func (*Registry) ToSecret

func (r *Registry) ToSecret() *specV1.Secret

type RegistryList

type RegistryList struct {
	Total        int `json:"total"`
	*ListOptions `json:",inline"`
	Items        []Registry `json:"items"`
}

RegistryList Registry List

func FromSecretListToRegistryList

func FromSecretListToRegistryList(s *SecretList, needToFilter bool) *RegistryList

type RegistryView

type RegistryView struct {
	Name     string `json:"name,omitempty"`
	Address  string `json:"address,omitempty"`
	Username string `json:"username,omitempty"`
}

type Resource

type Resource struct {
	Type    string      `yaml:"type,omitempty" json:"type,omitempty"`
	Name    string      `yaml:"name,omitempty" json:"name,omitempty"`
	Version string      `yaml:"version,omitempty" json:"version,omitempty"`
	Value   interface{} `yaml:"value,omitempty" json:"value,omitempty"`
}

type ResponseInfo

type ResponseInfo struct {
	Delta    interface{}            `yaml:"delta,omitempty" json:"delta,omitempty"`
	Metadata map[string]interface{} `yaml:"metadata,omitempty" json:"metadata,omitempty" default:"{}"`
}

type SecretList

type SecretList struct {
	Total        int `json:"total"`
	*ListOptions `json:",inline"`
	Items        []specV1.Secret `json:"items"`
}

type SecretView

type SecretView struct {
	Name              string            `json:"name,omitempty" binding:"omitempty,res_name"`
	Namespace         string            `json:"namespace,omitempty"`
	Data              map[string]string `json:"data,omitempty" binding:"required"`
	CreationTimestamp time.Time         `json:"createTime,omitempty"`
	UpdateTimestamp   time.Time         `json:"updateTime,omitempty"`
	Description       string            `json:"description"`
	Version           string            `json:"version,omitempty"`
}

func FromSecretToView

func FromSecretToView(s *specV1.Secret, needToFilter bool) *SecretView

func (*SecretView) Equal

func (s *SecretView) Equal(target *SecretView) bool

func (*SecretView) ToSecret

func (s *SecretView) ToSecret() *specV1.Secret

type SecretViewList

type SecretViewList struct {
	Total        int `json:"total"`
	*ListOptions `json:",inline"`
	Items        []SecretView `json:"items"`
}

func FromSecretListToView

func FromSecretListToView(s *SecretList, needToFilter bool) *SecretViewList

type ServiceFunction

type ServiceFunction struct {
	Functions []specV1.ServiceFunction `json:"functions,omitempty"`
}

type ServiceView added in v2.2.0

type ServiceView struct {
	specV1.Service `json:",inline"`
	ProgramConfig  string `json:"programConfig,omitempty"`
}

type Shadow

type Shadow struct {
	Namespace         string    `json:"namespace,omitempty"`
	Name              string    `json:"name,omitempty"`
	Report            v1.Report `json:"report,omitempty"`
	Desire            v1.Desire `json:"desire,omitempty"`
	ReportMeta        v1.Report `json:"reportMeta,omitempty"`
	DesireMeta        v1.Desire `json:"desireMeta,omitempty"`
	CreationTimestamp time.Time `json:"createTime,omitempty"`
	DesireVersion     string    `json:"desireVersion,omitempty"`
	Time              time.Time `json:"time"`
	ReportStr         string
}

func NewShadow

func NewShadow(namespace, name string) *Shadow

func NewShadowFromNode

func NewShadowFromNode(node *v1.Node) *Shadow

func (*Shadow) GetDesireMetaString added in v2.2.0

func (s *Shadow) GetDesireMetaString() (string, error)

func (*Shadow) GetDesireString

func (s *Shadow) GetDesireString() (string, error)

func (*Shadow) GetReportMetaString added in v2.2.0

func (s *Shadow) GetReportMetaString() (string, error)

func (*Shadow) GetReportString

func (s *Shadow) GetReportString() (string, error)

type ShadowList

type ShadowList struct {
	Total        int `json:"total"`
	*ListOptions `json:",inline"`
	Items        []Shadow `json:"items"`
}

NodeViewList node view list

type SysConfig

type SysConfig struct {
	Type       string    `yaml:"type,omitempty" json:"type,omitempty" db:"type"`
	Key        string    `yaml:"key,omitempty" json:"key,omitempty" db:"name"`
	Value      string    `yaml:"value,omitempty" json:"value,omitempty" db:"value"`
	CreateTime time.Time `yaml:"createTime,omitempty" json:"createTime,omitempty" db:"create_time"`
	UpdateTime time.Time `yaml:"updateTime,omitempty" json:"updateTime,omitempty" db:"update_time"`
}

type SysConfigView

type SysConfigView struct {
	SysConfigs []SysConfig `json:"sysconfigs"`
}

type Task

type Task struct {
	Id               int64                 `json:"id,omitempty"`
	Name             string                `json:"name,omitempty"`
	RegistrationName string                `json:"registrationName,omitempty"`
	Namespace        string                `json:"namespace,omitempty"`
	ResourceName     string                `json:"resourceName,omitempty"`
	ResourceType     string                `json:"resourceType,omitempty"`
	Version          int64                 `json:"version,omitempty"`
	ExpireTime       int64                 `json:"expireTime,omitempty"`
	Status           TaskStatus            `json:"status,omitempty"`
	ProcessorsStatus map[string]TaskStatus `json:"processorsStatus,omitempty"`
}

type TaskStatus added in v2.2.0

type TaskStatus int
const (
	TaskNew TaskStatus = iota
	TaskProcessing
	TaskNeedRetry
	TaskFinished
	TaskFailed
)

type VolumeView

type VolumeView struct {
	// specified name of the volume
	Name        string                       `json:"name,omitempty" binding:"required,res_name"`
	HostPath    *specV1.HostPathVolumeSource `json:"hostPath,omitempty"`
	Config      *specV1.ObjectReference      `json:"config,omitempty"`
	Secret      *specV1.ObjectReference      `json:"secret,omitempty"`
	EmptyDir    *specV1.EmptyDirVolumeSource `json:"emptyDir,omitempty"`
	Certificate *specV1.ObjectReference      `json:"certificate,omitempty"`
}

VolumeView volume view

type YamlResourceList added in v2.4.3

type YamlResourceList struct {
	Total int           `json:"total"`
	Items []interface{} `json:"items"`
}

Jump to

Keyboard shortcuts

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