Documentation ¶
Index ¶
- func BuildEmptyApps() map[string]interface{}
- func EqualConfig(config1, config2 *specV1.Configuration) bool
- func GetPagingParam(listOptions *ListOptions, resLen int) (start, end int)
- type Activation
- type AltNames
- type AppItem
- type ApplicationList
- type ApplicationView
- type Bucket
- type BucketsView
- type CertStorage
- type Certificate
- type CertificateDataItem
- type CertificateList
- type ConfigDataItem
- type ConfigFunctionItem
- type ConfigObjectItem
- type ConfigurationList
- type ConfigurationView
- type DesireRequest
- type DesireResponse
- type ExternalObjectInfo
- type Filter
- type Function
- type FunctionCode
- type FunctionSource
- type FunctionSourceView
- type FunctionView
- type Index
- type ListObjectsResult
- type ListOptions
- type ListView
- type MisData
- type Module
- type Namespace
- type NamespaceList
- type NodeCoreConfigs
- type NodeCoreVersions
- type NodeList
- type NodeMode
- type NodeNames
- type NodeOptionalSysApps
- type NodeProperties
- type NodePropertiesMetadata
- type NodePropertiesState
- type NodeProperty
- type NodeSysAppInfo
- type NodeSysAppView
- type NodeViewList
- type Object
- type ObjectMeta
- type ObjectParams
- type ObjectRequestParams
- type ObjectStorageSource
- type ObjectStorageSourceV2
- type ObjectStorageSourceView
- type ObjectStorageSourceViewV2
- type ObjectSummaryType
- type ObjectURL
- type ObjectView
- type ObjectsView
- type PEMCredential
- type Package
- type PackageParam
- type PrefixType
- type Property
- type PropertyValue
- type Quota
- type Registry
- type RegistryList
- type RegistryView
- type Resource
- type ResponseInfo
- type SecretList
- type SecretView
- type SecretViewList
- type ServiceFunction
- type ServiceView
- type Shadow
- type ShadowList
- type SysConfig
- type SysConfigView
- type Task
- type TaskStatus
- type VolumeView
Constants ¶
This section is empty.
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 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" validate:"omitempty,resourceName"` 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"` }
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" validate:"resourceName"` 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"` Services []ServiceView `json:"services,omitempty" validate:"dive"` Volumes []VolumeView `json:"volumes,omitempty" validate:"dive"` Description string `json:"description,omitempty"` System bool `json:"system,omitempty"` Registries []RegistryView `json:"registries,omitempty"` }
type BucketsView ¶
type BucketsView struct {
Buckets []Bucket `json:"buckets"`
}
type CertStorage ¶
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" validate:"omitempty,resourceName"` 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 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 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"` }
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" validate:"resourceName"` Namespace string `json:"namespace,omitempty"` Labels map[string]string `json:"labels,omitempty"` Data []ConfigDataItem `json:"data,omitempty" default:"[]" validate:"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 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 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 (*Filter) GetLimitNumber ¶
func (*Filter) GetLimitOffset ¶
type Function ¶
type Function struct { Name string `yaml:"name,omitempty" json:"name,omitempty" validate:"omitempty,resourceName,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 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 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"` Limit int64 `form:"limit,omitempty" json:"limit,omitempty"` Continue string `form:"continue,omitempty" json:"continue,omitempty"` Filter `json:",inline"` }
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"` IsLatest bool `json:"isLatest,omitempty"` Description string `json:"description,omitempty"` CreationTimestamp time.Time `json:"createTime,omitempty"` UpdateTimestamp time.Time `json:"updateTime,omitempty"` }
type Namespace ¶
type Namespace struct {
Name string `json:"name,omitempty" validate:"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 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 NodeOptionalSysApps ¶ added in v2.2.0
type NodeOptionalSysApps struct {
Apps []NodeSysAppView `yaml:"apps,omitempty" json:"apps,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 NodePropertiesState ¶ added in v2.1.1
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 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 ObjectParams ¶
type ObjectRequestParams ¶
type ObjectRequestParams struct { Source string `json:"source,omitempty"` Bucket string `json:"bucket,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 ObjectView ¶
type ObjectView struct {
Name string `json:"name,omitempty"`
}
type ObjectsView ¶
type ObjectsView struct {
Objects []ObjectView `json:"objects"`
}
type PEMCredential ¶
PEMCredential holds a certificate, private key pem data
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 Quota ¶ added in v2.1.1
type Quota struct { Namespace string `json:"namespace" validate:"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" validate:"omitempty,resourceName"` 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 ¶
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 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" validate:"omitempty,resourceName"` 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 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"` }
func NewShadowFromNode ¶
func (*Shadow) GetDesireMetaString ¶ added in v2.2.0
func (*Shadow) GetDesireString ¶
func (*Shadow) GetReportMetaString ¶ added in v2.2.0
func (*Shadow) GetReportString ¶
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" validate:"omitempty,resourceName"` HostPath *specV1.HostPathVolumeSource `json:"hostPath,omitempty"` Config *specV1.ObjectReference `json:"config,omitempty"` Secret *specV1.ObjectReference `json:"secret,omitempty"` Certificate *specV1.ObjectReference `json:"certificate,omitempty"` }
VolumeView volume view