Documentation ¶
Index ¶
- Constants
- Variables
- func GetRegisterModels() map[string]Interface
- func RegisterModel(models ...Interface)
- type Application
- func (a *Application) GetAppNamespaceForSynced() string
- func (a *Application) Index() map[string]string
- func (a *Application) IsReadOnly() bool
- func (a *Application) IsSynced() bool
- func (a *Application) PrimaryKey() string
- func (a *Application) ShortTableName() string
- func (a *Application) TableName() string
- type ApplicationComponent
- type ApplicationPolicy
- type ApplicationRevision
- type ApplicationTrait
- type ApplicationTrigger
- type BaseModel
- type Cluster
- type ClusterSelector
- type ClusterTarget
- type CodeInfo
- type ComponentPatch
- type ComponentSelector
- type Condition
- type CustomClaims
- type DataStoreApp
- type DexConfig
- type DexStaticClient
- type DexStorage
- type DexStorageConfig
- type DexWeb
- type Env
- type EnvBinding
- type ImageInfo
- type ImageRepository
- type ImageResource
- type Interface
- type JSONStruct
- type Permission
- type PermissionTemplate
- type Pipeline
- type PipelineContext
- type Principal
- type Project
- type ProjectRef
- type ProjectUser
- type ProviderInfo
- type Role
- type StaticPassword
- type StatisticInfo
- type StepStatus
- type SystemInfo
- type Target
- type Telemetry
- type TraitPatch
- type UpdateDexConfig
- type User
- type Value
- type WebConfig
- type Workflow
- type WorkflowRecord
- type WorkflowSpec
- type WorkflowStep
- type WorkflowStepBase
- type WorkflowStepStatus
Constants ¶
const ( // PayloadTypeCustom is the payload type custom PayloadTypeCustom = "custom" // PayloadTypeDockerhub is the payload type dockerhub PayloadTypeDockerhub = "dockerhub" // PayloadTypeACR is the payload type acr PayloadTypeACR = "acr" // PayloadTypeHarbor is the payload type harbor PayloadTypeHarbor = "harbor" // PayloadTypeJFrog is the payload type jfrog PayloadTypeJFrog = "jfrog" // ComponentTypeWebservice is the component type webservice ComponentTypeWebservice = "webservice" // ComponentTypeWorker is the component type worker ComponentTypeWorker = "worker" // ComponentTypeTask is the component type task ComponentTypeTask = "task" )
const ( // HarborEventTypePushArtifact is the event type PUSH_ARTIFACT HarborEventTypePushArtifact = "PUSH_ARTIFACT" // JFrogEventTypePush is push event type of jfrog webhook JFrogEventTypePush = "pushed" // JFrogDomainDocker is webhook domain of jfrog docker JFrogDomainDocker = "docker" )
const ( // ClusterStatusHealthy healthy cluster ClusterStatusHealthy = "Healthy" // ClusterStatusUnhealthy unhealthy cluster ClusterStatusUnhealthy = "Unhealthy" )
const ( // LoginTypeDex is the dex login type LoginTypeDex string = "dex" // LoginTypeLocal is the local login type LoginTypeLocal string = "local" )
const ( // AutoGenDesc describes the metadata in datastore that's automatically generated AutoGenDesc = "Automatically converted from KubeVela Application in Kubernetes." // AutoGenProj describes the automatically created project AutoGenProj = "Automatically generated by sync mechanism." // AutoGenEnvNamePrefix describes the common prefix for auto-generated env AutoGenEnvNamePrefix = "syc-" // AutoGenComp describes the creator of component that is auto-generated AutoGenComp = "syc-comp" // AutoGenPolicy describes the creator of policy that is auto-generated AutoGenPolicy = "syc-policy" // AutoGenRefPolicy describes the creator of policy that is auto-generated, this differs from AutoGenPolicy as the policy is referenced ones AutoGenRefPolicy = "syc-ref-policy" // AutoGenWorkflowNamePrefix describes the common prefix for auto-generated workflow AutoGenWorkflowNamePrefix = "syc-" // AutoGenTargetNamePrefix describes the common prefix for auto-generated target AutoGenTargetNamePrefix = "syc-" // LabelSyncGeneration describes the generation synced from LabelSyncGeneration = "ux.oam.dev/synced-generation" // LabelSyncNamespace describes the namespace synced from LabelSyncNamespace = "ux.oam.dev/from-namespace" )
const ( // LabelSourceOfTruth describes the source of this app LabelSourceOfTruth = "app.oam.dev/source-of-truth" // FromCR means the data source of truth is from k8s CR FromCR = "from-k8s-resource" // FromUX means the data source of truth is from velaux data store FromUX = "from-velaux" // FromInner means the data source of truth is from KubeVela inner usage // the configuration that don't want to be synced // the addon application should be synced, but set to readonly mode FromInner = "from-inner-system" )
const ( // DefaultInitName is default object name for initialization DefaultInitName = "default" // DefaultAddonProject is default addon projects DefaultAddonProject = "addons" // DefaultInitNamespace is default namespace name for initialization DefaultInitNamespace = "default" // DefaultTargetDescription describes default target created DefaultTargetDescription = "Default target is created by velaux system automatically." // DefaultEnvDescription describes default env created DefaultEnvDescription = "Default environment is created by velaux system automatically." // DefaultProjectDescription describes the default project created DefaultProjectDescription = "Default project is created by velaux system automatically." )
const DefaultAdminUserAlias = "Administrator"
DefaultAdminUserAlias default admin user alias
const DefaultAdminUserName = "admin"
DefaultAdminUserName default admin user name
const Finished = "true"
Finished means the workflow record is finished
const UnFinished = "false"
UnFinished means the workflow record is not finished
Variables ¶
var ( // LocalClusterCreatedTime create time for local cluster, set to late date in order to ensure it is sorted to first LocalClusterCreatedTime = time.Date(2999, 1, 1, 0, 0, 0, 0, time.UTC) )
var RevisionStatusComplete = "complete"
RevisionStatusComplete event status complete
var RevisionStatusFail = "failure"
RevisionStatusFail event status failure
var RevisionStatusInit = "init"
RevisionStatusInit event status init
var RevisionStatusRollback = "rollback"
RevisionStatusRollback event status rollback
var RevisionStatusRunning = "running"
RevisionStatusRunning event status running
var RevisionStatusTerminated = "terminated"
RevisionStatusTerminated event status terminated
Functions ¶
func GetRegisterModels ¶
GetRegisterModels will return the register models
Types ¶
type Application ¶
type Application struct { BaseModel Name string `json:"name"` Alias string `json:"alias"` Project string `json:"project"` Description string `json:"description"` Icon string `json:"icon"` Labels map[string]string `json:"labels,omitempty"` }
Application application delivery model
func (*Application) GetAppNamespaceForSynced ¶
func (a *Application) GetAppNamespaceForSynced() string
GetAppNamespaceForSynced will return the namespace of synced CR
func (*Application) Index ¶
func (a *Application) Index() map[string]string
Index return custom index
func (*Application) IsReadOnly ¶ added in v1.5.0
func (a *Application) IsReadOnly() bool
IsReadOnly is readonly app Only the source is inner, the app is readonly
func (*Application) IsSynced ¶
func (a *Application) IsSynced() bool
IsSynced answer if the app is synced one
func (*Application) PrimaryKey ¶
func (a *Application) PrimaryKey() string
PrimaryKey return custom primary key the app primary key is the app name, so the app name is globally unique in every namespace when the app is synced from CR, the first synced one be same with app name, if there's any conflicts, the name will be composed by <appname>-<namespace>
func (*Application) ShortTableName ¶
func (a *Application) ShortTableName() string
ShortTableName is the compressed version of table name for kubeapi storage and others
func (*Application) TableName ¶
func (a *Application) TableName() string
TableName return custom table name
type ApplicationComponent ¶
type ApplicationComponent struct { BaseModel AppPrimaryKey string `json:"appPrimaryKey"` Description string `json:"description,omitempty"` Labels map[string]string `json:"labels,omitempty"` Icon string `json:"icon,omitempty"` Creator string `json:"creator"` Name string `json:"name"` Alias string `json:"alias"` Type string `json:"type"` Main bool `json:"main"` // ExternalRevision specified the component revisionName ExternalRevision string `json:"externalRevision,omitempty"` Properties *JSONStruct `json:"properties,omitempty"` DependsOn []string `json:"dependsOn,omitempty"` Inputs workflowv1alpha1.StepInputs `json:"inputs,omitempty"` Outputs workflowv1alpha1.StepOutputs `json:"outputs,omitempty"` // Traits define the trait of one component, the type must be array to keep the order. Traits []ApplicationTrait `json:"traits,omitempty"` // scopes in ApplicationComponent defines the component-level scopes // the format is <scope-type:scope-instance-name> pairs, the key represents type of `ScopeDefinition` while the value represent the name of scope instance. Scopes map[string]string `json:"scopes,omitempty"` WorkloadType common.WorkloadTypeDescriptor `json:"workloadType,omitempty"` }
ApplicationComponent component database model
func (*ApplicationComponent) Index ¶
func (a *ApplicationComponent) Index() map[string]string
Index return custom index
func (*ApplicationComponent) PrimaryKey ¶
func (a *ApplicationComponent) PrimaryKey() string
PrimaryKey return custom primary key
func (*ApplicationComponent) ShortTableName ¶
func (a *ApplicationComponent) ShortTableName() string
ShortTableName is the compressed version of table name for kubeapi storage and others
func (*ApplicationComponent) TableName ¶
func (a *ApplicationComponent) TableName() string
TableName return custom table name
type ApplicationPolicy ¶
type ApplicationPolicy struct { BaseModel AppPrimaryKey string `json:"appPrimaryKey"` Name string `json:"name"` Alias string `json:"alias"` Description string `json:"description"` Type string `json:"type"` Creator string `json:"creator"` Properties *JSONStruct `json:"properties,omitempty"` // EnvName if it is not empty, the policy is only belong to this environment // For auto created policies, this field will be assigned a value EnvName string `json:"envName"` }
ApplicationPolicy app policy
func (*ApplicationPolicy) Index ¶
func (a *ApplicationPolicy) Index() map[string]string
Index return custom index
func (*ApplicationPolicy) PrimaryKey ¶
func (a *ApplicationPolicy) PrimaryKey() string
PrimaryKey return custom primary key
func (*ApplicationPolicy) ShortTableName ¶
func (a *ApplicationPolicy) ShortTableName() string
ShortTableName is the compressed version of table name for kubeapi storage and others
func (*ApplicationPolicy) TableName ¶
func (a *ApplicationPolicy) TableName() string
TableName return custom table name
type ApplicationRevision ¶
type ApplicationRevision struct { BaseModel AppPrimaryKey string `json:"appPrimaryKey"` Version string `json:"version"` RollbackVersion string `json:"rollbackVersion,omitempty"` // ApplyAppConfig Stores the application configuration during the current deploy. ApplyAppConfig string `json:"applyAppConfig,omitempty"` // RevisionCRName This is associated with the application revision in the cluster. RevisionCRName string `json:"revisionCRName"` // Deploy event status Status string `json:"status"` Reason string `json:"reason"` // The user that triggers the deploy. DeployUser string `json:"deployUser"` // Information that users can note. Note string `json:"note"` // TriggerType the event trigger source, Web、API、SyncFromCR TriggerType string `json:"triggerType"` // WorkflowName deploy controller by workflow WorkflowName string `json:"workflowName"` // EnvName is the env name of this application revision EnvName string `json:"envName"` // CodeInfo is the code info of this application revision CodeInfo *CodeInfo `json:"codeInfo,omitempty"` // ImageInfo is the image info of this application revision ImageInfo *ImageInfo `json:"imageInfo,omitempty"` }
ApplicationRevision be created when an application initiates deployment and describes the phased version of the application.
func (*ApplicationRevision) Index ¶
func (a *ApplicationRevision) Index() map[string]string
Index return custom index
func (*ApplicationRevision) PrimaryKey ¶
func (a *ApplicationRevision) PrimaryKey() string
PrimaryKey return custom primary key
func (*ApplicationRevision) ShortTableName ¶
func (a *ApplicationRevision) ShortTableName() string
ShortTableName is the compressed version of table name for kubeapi storage and others
func (*ApplicationRevision) TableName ¶
func (a *ApplicationRevision) TableName() string
TableName return custom table name
type ApplicationTrait ¶
type ApplicationTrait struct { Alias string `json:"alias"` Description string `json:"description"` Type string `json:"type"` Properties *JSONStruct `json:"properties,omitempty"` CreateTime time.Time `json:"createTime"` UpdateTime time.Time `json:"updateTime"` }
ApplicationTrait application trait
type ApplicationTrigger ¶
type ApplicationTrigger struct { BaseModel AppPrimaryKey string `json:"appPrimaryKey"` WorkflowName string `json:"workflowName,omitempty"` Name string `json:"name"` Alias string `json:"alias,omitempty"` Description string `json:"description,omitempty"` Token string `json:"token"` Type string `json:"type"` PayloadType string `json:"payloadType"` ComponentName string `json:"componentName"` }
ApplicationTrigger is the model for trigger
func (*ApplicationTrigger) Index ¶
func (w *ApplicationTrigger) Index() map[string]string
Index return custom index
func (*ApplicationTrigger) PrimaryKey ¶
func (w *ApplicationTrigger) PrimaryKey() string
PrimaryKey return custom primary key
func (*ApplicationTrigger) ShortTableName ¶
func (w *ApplicationTrigger) ShortTableName() string
ShortTableName is the compressed version of table name for kubeapi storage and others
func (*ApplicationTrigger) TableName ¶
func (w *ApplicationTrigger) TableName() string
TableName return custom table name
type BaseModel ¶
type BaseModel struct { CreateTime time.Time `json:"createTime"` UpdateTime time.Time `json:"updateTime"` }
BaseModel common model
func (*BaseModel) SetCreateTime ¶
SetCreateTime set create time
func (*BaseModel) SetUpdateTime ¶
SetUpdateTime set update time
type Cluster ¶
type Cluster struct { BaseModel Name string `json:"name"` Alias string `json:"alias"` Description string `json:"description"` Icon string `json:"icon"` Labels map[string]string `json:"labels"` Status string `json:"status"` Reason string `json:"reason"` Provider ProviderInfo `json:"provider"` APIServerURL string `json:"apiServerURL"` DashboardURL string `json:"dashboardURL"` KubeConfig string `json:"kubeConfig"` KubeConfigSecret string `json:"kubeConfigSecret"` }
Cluster describes the model of cluster in apiserver
func (*Cluster) PrimaryKey ¶
PrimaryKey primary key for datastore
func (*Cluster) SetCreateTime ¶
SetCreateTime for local cluster, create time is set to a large date which ensures the order of list
func (*Cluster) ShortTableName ¶
ShortTableName is the compressed version of table name for kubeapi storage and others
type ClusterSelector ¶
type ClusterSelector struct { Name string `json:"name"` // Adapt to a scenario where only one Namespace is available or a user-defined Namespace is available. Namespace string `json:"namespace,omitempty"` }
ClusterSelector cluster selector
type ClusterTarget ¶
type ClusterTarget struct { ClusterName string `json:"clusterName" validate:"checkname"` Namespace string `json:"namespace" optional:"true"` }
ClusterTarget one kubernetes cluster delivery target
type CodeInfo ¶
type CodeInfo struct { // Commit is the commit hash Commit string `json:"commit,omitempty"` // Branch is the branch name Branch string `json:"branch,omitempty"` // User is the user name User string `json:"user,omitempty"` }
CodeInfo is the code info for webhook request
type ComponentPatch ¶
type ComponentPatch struct { Name string `json:"name"` Properties *JSONStruct `json:"properties,omitempty"` Disable bool `json:"disable"` TraitsPatch []TraitPatch `json:"traitsPatch,omitempty"` }
ComponentPatch Define differential patches for components in the environment.
type ComponentSelector ¶
type ComponentSelector struct {
Components []string `json:"components"`
}
ComponentSelector component selector
type CustomClaims ¶
type CustomClaims struct { Username string `json:"username"` GrantType string `json:"grantType"` jwt.StandardClaims }
CustomClaims is the custom claims
type DataStoreApp ¶
type DataStoreApp struct { AppMeta *Application Env *Env Eb *EnvBinding Comps []*ApplicationComponent Policies []*ApplicationPolicy Workflow *Workflow Targets []*Target Record *WorkflowRecord Revision *ApplicationRevision }
DataStoreApp is a memory struct that describes the model of an application in datastore
type DexConfig ¶
type DexConfig struct { Issuer string `json:"issuer"` Web DexWeb `json:"web"` Storage DexStorage `json:"storage"` Telemetry Telemetry `json:"telemetry"` Frontend WebConfig `json:"frontend"` StaticClients []DexStaticClient `json:"staticClients"` Connectors []map[string]interface{} `json:"connectors,omitempty"` EnablePasswordDB bool `json:"enablePasswordDB"` StaticPasswords []StaticPassword `json:"staticPasswords,omitempty"` }
DexConfig dex config
type DexStaticClient ¶
type DexStaticClient struct { ID string `json:"id"` Name string `json:"name"` Secret string `json:"secret"` RedirectURIs []string `json:"redirectURIs"` }
DexStaticClient dex static client
type DexStorage ¶
type DexStorage struct { Type string `json:"type"` Config DexStorageConfig `json:"config,omitempty"` }
DexStorage dex storage
type DexStorageConfig ¶
type DexStorageConfig struct {
InCluster bool `json:"inCluster"`
}
DexStorageConfig is the storage config of dex
type DexWeb ¶
type DexWeb struct { HTTP string `json:"http"` HTTPS string `json:"https"` TLSCert string `json:"tlsCert"` TLSKey string `json:"tlsKey"` AllowedOrigins []string `json:"allowedOrigins"` }
DexWeb dex web
type Env ¶
type Env struct { BaseModel Name string `json:"name"` Alias string `json:"alias"` Description string `json:"description,omitempty"` // Project defines the project this Env belongs to Project string `json:"project"` // Namespace defines the K8s namespace of the Env in control plane Namespace string `json:"namespace"` // Targets defines the name of delivery target that belongs to this env // In one project, a delivery target can only belong to one env. Targets []string `json:"targets,omitempty"` }
Env models the data of env in database
func (*Env) ShortTableName ¶
ShortTableName is the compressed version of table name for kubeapi storage and others
type EnvBinding ¶
type EnvBinding struct { BaseModel AppPrimaryKey string `json:"appPrimaryKey"` AppDeployName string `json:"appDeployName"` Name string `json:"name"` ComponentsPatch []ComponentPatch `json:"componentsPatchs"` }
EnvBinding application env binding
func (*EnvBinding) PrimaryKey ¶
func (e *EnvBinding) PrimaryKey() string
PrimaryKey return custom primary key
func (*EnvBinding) ShortTableName ¶
func (e *EnvBinding) ShortTableName() string
ShortTableName is the compressed version of table name for kubeapi storage and others
func (*EnvBinding) TableName ¶
func (e *EnvBinding) TableName() string
TableName return custom table name
type ImageInfo ¶
type ImageInfo struct { // Type is the image type, ACR or Harbor or DockerHub Type string `json:"type"` // Resource is the image resource Resource *ImageResource `json:"resource,omitempty"` // Repository is the image repository Repository *ImageRepository `json:"repository,omitempty"` }
ImageInfo is the image info for webhook request
type ImageRepository ¶
type ImageRepository struct { // Name is the image repository name Name string `json:"name"` // Namespace is the image repository namespace Namespace string `json:"namespace"` // FullName is the image repository full name FullName string `json:"fullName"` // Region is the image repository region Region string `json:"region,omitempty"` // Type is the image repository type, public or private Type string `json:"type"` // CreateTime is the image repository create time CreateTime time.Time `json:"createTime,omitempty"` }
ImageRepository is the image repository
type ImageResource ¶
type ImageResource struct { // Digest is the image digest Digest string `json:"digest"` // Tag is the image tag Tag string `json:"tag"` // URL is the image url URL string `json:"url"` // CreateTime is the image create time CreateTime time.Time `json:"createTime,omitempty"` }
ImageResource is the image resource
type JSONStruct ¶
type JSONStruct map[string]interface{}
JSONStruct json struct, same with runtime.RawExtension
func NewJSONStruct ¶
func NewJSONStruct(raw *runtime.RawExtension) (*JSONStruct, error)
NewJSONStruct new json struct from runtime.RawExtension
func NewJSONStructByString ¶
func NewJSONStructByString(source string) (*JSONStruct, error)
NewJSONStructByString new json struct from string
func NewJSONStructByStruct ¶
func NewJSONStructByStruct(object interface{}) (*JSONStruct, error)
NewJSONStructByStruct new json struct from struct object
func (*JSONStruct) RawExtension ¶
func (j *JSONStruct) RawExtension() *runtime.RawExtension
RawExtension Encoded as a RawExtension
type Permission ¶
type Permission struct { BaseModel Name string `json:"name"` Alias string `json:"alias"` Project string `json:"project,omitempty"` Resources []string `json:"resources"` Actions []string `json:"actions"` // Effect option values: Allow,Deny Effect string `json:"effect"` Principal *Principal `json:"principal,omitempty"` Condition *Condition `json:"condition,omitempty"` }
Permission is a model for a new RBAC mode.
func (*Permission) PrimaryKey ¶
func (p *Permission) PrimaryKey() string
PrimaryKey return custom primary key
func (*Permission) ShortTableName ¶
func (p *Permission) ShortTableName() string
ShortTableName return custom table name
func (*Permission) TableName ¶
func (p *Permission) TableName() string
TableName return custom table name
type PermissionTemplate ¶
type PermissionTemplate struct { BaseModel Name string `json:"name"` Alias string `json:"alias"` // Scope options: project or platform Scope string `json:"scope"` Resources []string `json:"resources"` Actions []string `json:"actions"` Effect string `json:"effect"` Condition *Condition `json:"condition,omitempty"` }
PermissionTemplate is a model for a new RBAC mode.
func (*PermissionTemplate) Index ¶
func (p *PermissionTemplate) Index() map[string]string
Index return custom index
func (*PermissionTemplate) PrimaryKey ¶
func (p *PermissionTemplate) PrimaryKey() string
PrimaryKey return custom primary key
func (*PermissionTemplate) ShortTableName ¶
func (p *PermissionTemplate) ShortTableName() string
ShortTableName return custom table name
func (*PermissionTemplate) TableName ¶
func (p *PermissionTemplate) TableName() string
TableName return custom table name
type Pipeline ¶ added in v1.6.0
type Pipeline struct { BaseModel Spec WorkflowSpec Name string `json:"name"` Project string `json:"project"` Alias string `json:"alias"` Description string `json:"description"` }
Pipeline is the model of pipeline
func (Pipeline) PrimaryKey ¶ added in v1.6.0
PrimaryKey return custom primary key
func (Pipeline) ShortTableName ¶ added in v1.6.0
ShortTableName is the compressed version of table name for kubeapi storage and others
type PipelineContext ¶ added in v1.6.0
type PipelineContext struct { BaseModel PipelineName string `json:"pipelineName"` ProjectName string `json:"projectName"` Contexts map[string][]Value `json:"contexts"` }
PipelineContext is pipeline's context groups
func (*PipelineContext) Index ¶ added in v1.6.0
func (c *PipelineContext) Index() map[string]string
Index return custom index
func (*PipelineContext) PrimaryKey ¶ added in v1.6.0
func (c *PipelineContext) PrimaryKey() string
PrimaryKey return custom primary key
func (*PipelineContext) ShortTableName ¶ added in v1.6.0
func (c *PipelineContext) ShortTableName() string
ShortTableName is the compressed version of table name for kubeapi storage and others
func (*PipelineContext) TableName ¶ added in v1.6.0
func (c *PipelineContext) TableName() string
TableName return custom table name
type Principal ¶
type Principal struct { // Type options: User or Role Type string `json:"type"` Names []string `json:"names"` }
Principal is a model for a new RBAC mode.
type Project ¶
type Project struct { BaseModel Name string `json:"name"` Alias string `json:"alias"` Owner string `json:"owner"` Description string `json:"description,omitempty"` Namespace string `json:"namespace"` }
Project basic model
func (*Project) GetNamespace ¶ added in v1.6.0
GetNamespace get the namespace name of this project.
func (*Project) PrimaryKey ¶
PrimaryKey return custom primary key
func (*Project) ShortTableName ¶
ShortTableName is the compressed version of table name for kubeapi storage and others
type ProjectRef ¶ added in v1.5.0
ProjectRef set the project name and roles
type ProjectUser ¶
type ProjectUser struct { BaseModel Username string `json:"username"` ProjectName string `json:"projectName"` // UserRoles binding the project level roles UserRoles []string `json:"userRoles"` }
ProjectUser is the model of user in project
func (*ProjectUser) Index ¶
func (u *ProjectUser) Index() map[string]string
Index return custom index
func (*ProjectUser) PrimaryKey ¶
func (u *ProjectUser) PrimaryKey() string
PrimaryKey return custom primary key
func (*ProjectUser) ShortTableName ¶
func (u *ProjectUser) ShortTableName() string
ShortTableName return custom table name
func (*ProjectUser) TableName ¶
func (u *ProjectUser) TableName() string
TableName return custom table name
type ProviderInfo ¶
type ProviderInfo struct { Provider string `json:"provider"` ClusterID string `json:"clusterID"` ClusterName string `json:"clusterName,omitempty"` Zone string `json:"zone,omitempty"` ZoneID string `json:"zoneID,omitempty"` RegionID string `json:"regionID,omitempty"` VpcID string `json:"vpcID,omitempty"` Labels map[string]string `json:"labels"` }
ProviderInfo describes the information from provider API
type Role ¶
type Role struct { BaseModel Name string `json:"name"` Alias string `json:"alias"` Project string `json:"project,omitempty"` Permissions []string `json:"permissions"` }
Role is a model for a new RBAC mode.
func (*Role) ShortTableName ¶
ShortTableName return custom table name
type StaticPassword ¶
type StaticPassword struct { Email string `json:"email"` Hash string `json:"hash"` Username string `json:"username"` }
StaticPassword is the static password for dex
type StatisticInfo ¶
type StatisticInfo struct { ClusterCount string `json:"clusterCount,omitempty"` AppCount string `json:"appCount,omitempty"` EnabledAddon map[string]string `json:"enabledAddon,omitempty"` TopKCompDef []string `json:"topKCompDef,omitempty"` TopKTraitDef []string `json:"topKTraitDef,omitempty"` TopKWorkflowStepDef []string `json:"topKWorkflowStepDef,omitempty"` TopKPolicyDef []string `json:"topKPolicyDef,omitempty"` UpdateTime time.Time `json:"updateTime,omitempty"` }
StatisticInfo the system statistic info
type StepStatus ¶ added in v1.6.0
type StepStatus struct { ID string `json:"id"` Name string `json:"name"` Alias string `json:"alias"` Type string `json:"type,omitempty"` Phase workflowv1alpha1.WorkflowStepPhase `json:"phase,omitempty"` Message string `json:"message,omitempty"` Reason string `json:"reason,omitempty"` FirstExecuteTime time.Time `json:"firstExecuteTime,omitempty"` LastExecuteTime time.Time `json:"lastExecuteTime,omitempty"` }
StepStatus is the workflow step status database model
type SystemInfo ¶
type SystemInfo struct { BaseModel SignedKey string `json:"signedKey"` InstallID string `json:"installID"` EnableCollection bool `json:"enableCollection"` StatisticInfo StatisticInfo `json:"statisticInfo,omitempty"` LoginType string `json:"loginType"` DexUserDefaultProjects []ProjectRef `json:"projects"` DexUserDefaultPlatformRoles []string `json:"dexUserDefaultPlatformRoles"` }
SystemInfo systemInfo model
func (*SystemInfo) PrimaryKey ¶
func (u *SystemInfo) PrimaryKey() string
PrimaryKey return custom primary key
func (*SystemInfo) ShortTableName ¶
func (u *SystemInfo) ShortTableName() string
ShortTableName is the compressed version of table name for kubeapi storage and others
func (*SystemInfo) TableName ¶
func (u *SystemInfo) TableName() string
TableName return custom table name
type Target ¶
type Target struct { BaseModel Name string `json:"name"` Alias string `json:"alias,omitempty"` Project string `json:"project"` Description string `json:"description,omitempty"` Cluster *ClusterTarget `json:"cluster,omitempty"` Variable map[string]interface{} `json:"variable,omitempty"` }
Target defines the delivery target information for the application It includes kubernetes clusters or cloud service providers
func (*Target) PrimaryKey ¶
PrimaryKey return custom primary key
func (*Target) ShortTableName ¶
ShortTableName is the compressed version of table name for kubeapi storage and others
type Telemetry ¶ added in v1.5.0
type Telemetry struct {
HTTP string `json:"http"`
}
Telemetry is the config format for telemetry including the HTTP server config.
type TraitPatch ¶
type TraitPatch struct { Type string `json:"type"` Properties *JSONStruct `json:"properties,omitempty"` Disable bool `json:"disable"` }
TraitPatch Define differential patches for traits in the environment.
type UpdateDexConfig ¶
type UpdateDexConfig struct { Connectors []map[string]interface{} StaticPasswords []StaticPassword VelaAddress string }
UpdateDexConfig update dex config
type User ¶
type User struct { BaseModel Name string `json:"name"` Email string `json:"email"` Alias string `json:"alias,omitempty"` Password string `json:"password,omitempty"` Disabled bool `json:"disabled"` LastLoginTime time.Time `json:"lastLoginTime,omitempty"` // UserRoles binding the platform level roles UserRoles []string `json:"userRoles"` DexSub string `json:"dexSub,omitempty"` }
User is the model of user
func (*User) ShortTableName ¶
ShortTableName return custom table name
type WebConfig ¶ added in v1.5.0
type WebConfig struct { LogoURL string // Defaults to "dex" Issuer string // Defaults to "light" Theme string }
WebConfig holds the server's frontend templates and asset configuration.
type Workflow ¶
type Workflow struct { BaseModel Name string `json:"name"` Alias string `json:"alias"` Description string `json:"description"` // Workflow used by the default Default *bool `json:"default"` AppPrimaryKey string `json:"appPrimaryKey"` EnvName string `json:"envName"` Steps []WorkflowStep `json:"steps,omitempty"` }
Workflow application delivery database model
func (*Workflow) PrimaryKey ¶
PrimaryKey return custom primary key
func (*Workflow) ShortTableName ¶
ShortTableName is the compressed version of table name for kubeapi storage and others
type WorkflowRecord ¶
type WorkflowRecord struct { BaseModel WorkflowName string `json:"workflowName"` WorkflowAlias string `json:"workflowAlias"` AppPrimaryKey string `json:"appPrimaryKey"` // RevisionPrimaryKey: should be assigned the version(PublishVersion) RevisionPrimaryKey string `json:"revisionPrimaryKey"` Name string `json:"name"` Namespace string `json:"namespace"` StartTime time.Time `json:"startTime,omitempty"` Finished string `json:"finished"` Steps []WorkflowStepStatus `json:"steps,omitempty"` Status string `json:"status"` }
WorkflowRecord is the workflow record database model
func (*WorkflowRecord) Index ¶
func (w *WorkflowRecord) Index() map[string]string
Index return custom primary key
func (*WorkflowRecord) PrimaryKey ¶
func (w *WorkflowRecord) PrimaryKey() string
PrimaryKey return custom primary key
func (*WorkflowRecord) ShortTableName ¶
func (w *WorkflowRecord) ShortTableName() string
ShortTableName is the compressed version of table name for kubeapi storage and others
func (*WorkflowRecord) TableName ¶
func (w *WorkflowRecord) TableName() string
TableName return custom table name
type WorkflowSpec ¶ added in v1.6.0
type WorkflowSpec struct { Mode *v1alpha1.WorkflowExecuteMode `json:"mode,omitempty"` Steps []WorkflowStep `json:"steps,omitempty"` }
WorkflowSpec defines workflow steps and other attributes
type WorkflowStep ¶
type WorkflowStep struct { WorkflowStepBase `json:",inline"` SubSteps []WorkflowStepBase `json:"subSteps,omitempty"` }
WorkflowStep defines how to execute a workflow step.
type WorkflowStepBase ¶ added in v1.6.0
type WorkflowStepBase struct { // Name is the unique name of the workflow step. Name string `json:"name"` Alias string `json:"alias"` Type string `json:"type"` Description string `json:"description"` OrderIndex int `json:"orderIndex"` Inputs workflowv1alpha1.StepInputs `json:"inputs,omitempty"` Outputs workflowv1alpha1.StepOutputs `json:"outputs,omitempty"` DependsOn []string `json:"dependsOn"` Properties *JSONStruct `json:"properties,omitempty"` Meta *workflowv1alpha1.WorkflowStepMeta `json:"meta,omitempty"` If string `json:"if,omitempty"` Timeout string `json:"timeout,omitempty"` }
WorkflowStepBase is the step base of workflow
type WorkflowStepStatus ¶
type WorkflowStepStatus struct { StepStatus `json:",inline"` SubStepsStatus []StepStatus `json:"subSteps,omitempty"` }
WorkflowStepStatus is the workflow step status database model