Documentation ¶
Index ¶
- Constants
- Variables
- func EnvironmentTypes() []string
- func IsEnvironmentType(s string) bool
- func IsIdleCost(name string) bool
- func IsIdleOrManagementCost(name string) bool
- func IsManagementCost(name string) bool
- func IsRoleKind(s string) bool
- func IsSubjectKind(s string) bool
- func IsTokenKind(s string) bool
- func RoleKinds() []string
- func RolePolicyFields(f ...string) []string
- type CatalogSync
- type Context
- type CostFilters
- type FilterField
- type FilterRule
- type FinOpsCustomPricing
- type GraphEdge
- type GraphVertex
- type GraphVertexID
- type GroupByField
- type IdleShareOption
- type ItemSharedOption
- type ItemSharedOptions
- type ManagementShareOption
- type MatchResourceMetadata
- type MetadataName
- type Operator
- type OutputValue
- type PVCost
- type ProviderRequirement
- type QueryCondition
- type QueryPagination
- type ResourceComponentOperationKey
- type ResourceComponentOperationKeys
- type ResourceEndpoint
- type ResourceEndpoints
- type ResourceSpec
- type RetryStrategy
- type RolePolicies
- func (in RolePolicies) Clone() RolePolicies
- func (in RolePolicies) Deduplicate() RolePolicies
- func (in RolePolicies) Delete(rs ...RolePolicy) RolePolicies
- func (in RolePolicies) Len() int
- func (in RolePolicies) Less(i, j int) bool
- func (in RolePolicies) Normalize() RolePolicies
- func (in RolePolicies) Sort() RolePolicies
- func (in RolePolicies) Swap(i, j int)
- type RolePolicy
- type Schema
- func (s *Schema) Expose(skipProps ...string) UISchema
- func (s *Schema) Intersect(s2 *Schema)
- func (s *Schema) IsEmpty() bool
- func (s *Schema) OutputSchema() *openapi3.Schema
- func (s *Schema) RemoveVariableContext()
- func (s *Schema) SetOutputSchema(v *openapi3.Schema)
- func (s *Schema) SetVariableSchema(v *openapi3.Schema)
- func (s *Schema) Validate() error
- func (s *Schema) VariableSchema() *openapi3.Schema
- type Selector
- type SharedCostOptions
- type SharingStrategy
- type Step
- type TemplateSpec
- type TemplateVersionSchema
- type TemplateVersionSchemaData
- type UISchema
- type WalrusFile
- type WorkflowExecutionTrigger
- type WorkflowStepApprovalSpec
- func (s *WorkflowStepApprovalSpec) IsApprovalUser(user object.ID) bool
- func (s *WorkflowStepApprovalSpec) IsApproved() bool
- func (s *WorkflowStepApprovalSpec) IsRejected() bool
- func (s *WorkflowStepApprovalSpec) Reset()
- func (s *WorkflowStepApprovalSpec) SetApprovedUser(user object.ID) error
- func (s *WorkflowStepApprovalSpec) SetRejectedUser(user object.ID) error
- func (s *WorkflowStepApprovalSpec) SetUserApproval(user object.ID, approved bool) error
- func (s *WorkflowStepApprovalSpec) ToAttributes() map[string]any
- type WorkflowVariable
- type WorkflowVariables
Constants ¶
const ( // AnnotationEnableManagedNamespace specify whether Walrus-managed namespace is enabled. // Defaults to true. AnnotationEnableManagedNamespace = "walrus.seal.io/enable-managed-namespace" // AnnotationManagedNamespace specify custom environment namespace name. AnnotationManagedNamespace = "walrus.seal.io/managed-namespace-name" )
const ( LabelWalrusProjectName string = "walrus.seal.io/project-name" LabelWalrusEnvironmentName string = "walrus.seal.io/environment-name" LabelWalrusServiceName string = "walrus.seal.io/service-name" // LabelWalrusEnvironmentPath indicate environment with project name, format: projectName/environmentName. LabelWalrusEnvironmentPath string = "walrus.seal.io/environment-path" // LabelWalrusServicePath indicate service with project name and environment name, // format: projectName/environmentName/serviceName LabelWalrusServicePath string = "walrus.seal.io/service-path" // LabelWalrusManaged indicates whether the resource is managed by Seal. LabelWalrusManaged string = "walrus.seal.io/managed" // LabelWalrusCategory indicates the category of the resource. LabelWalrusCategory string = "walrus.seal.io/category" // LabelWalrusConnectorType indicates the connector type of the resource. LabelWalrusConnectorType string = "walrus.seal.io/connector-type" // LabelWalrusResourceType indicates the type of the resource. LabelWalrusResourceType string = "walrus.seal.io/resource-type" // LabelWalrusResourceDefinition indicates if the template is for resource definition. LabelWalrusResourceDefinition string = "walrus.seal.io/resource-definition" // LabelResourceStoppable indicates if the resource is stoppable. LabelResourceStoppable string = "walrus.seal.io/stoppable" // LabelEmbeddedKubernetes indicates whether a connector is the embedded kubernetes. LabelEmbeddedKubernetes = "walrus.seal.io/embedded-kubernetes" )
built-in labels.
const ( WalrusSystemNamespace = "walrus-system" DeployerServiceAccountName = "walrus-deployer" WorkflowServiceAccountName = "walrus-workflow" )
const ( ConnectorTypeDocker string = "Docker" ConnectorTypeKubernetes string = "Kubernetes" ConnectorTypeAlibaba string = "Alibaba" ConnectorTypeAWS string = "AWS" )
const ( ConnectorCategoryDocker string = "Docker" ConnectorCategoryKubernetes string = "Kubernetes" ConnectorCategoryCustom string = "Custom" ConnectorCategoryVersionControl string = "VersionControl" ConnectorCategoryCloudProvider string = "CloudProvider" )
const ( // ManagementCostItemName indicates cost item name for cluster management. ManagementCostItemName = "__management__" // UnmountedCostItemName indicated cost item name for unmounted resource (PV or LB). UnmountedCostItemName = "__unmounted__" // IdleCostItemName indicated cost item name for idle. IdleCostItemName = "__idle__" // UnallocatedItemName indicate the cost for the resources unallocated. UnallocatedItemName = "__unallocated__" )
const ( EnvironmentDevelopment = "development" EnvironmentStaging = "staging" EnvironmentProduction = "production" )
const ( GitDriverGithub = "Github" GitDriverGitlab = "Gitlab" GitDriverGitee = "Gitee" )
const ( // VertexKindResource indicates the vertex kind of resource, it contains resource groups. VertexKindResource = "Resource" // VertexKindResourceComponentGroup indicates the group resource that generates same type resources. VertexKindResourceComponentGroup = "ResourceComponentGroup" // VertexKindResourceComponent indicates the vertex kind of resource component. VertexKindResourceComponent = "ResourceComponent" // EdgeTypeComposition indicates vertex is composed of another vertex. EdgeTypeComposition = "Composition" // EdgeTypeRealization indicates vertex are realized by another vertex. EdgeTypeRealization = "Realization" // EdgeTypeDependency indicates vertex has dependency on another vertex. EdgeTypeDependency = "Dependency" )
const ( // ResourceRelationshipTypeImplicit indicates the resource dependency is auto created by resource reference. ResourceRelationshipTypeImplicit = "Implicit" // ResourceRelationshipTypeExplicit indicates the resource dependency is manually created by user. ResourceRelationshipTypeExplicit = "Explicit" )
const ( // ResourceComponentModeManaged indicates the resource created to target platform, // it is writable(update or delete). ResourceComponentModeManaged = "managed" // ResourceComponentModeData indicates the resource read from target platform, // it is read-only. ResourceComponentModeData = "data" // ResourceComponentModeDiscovered indicates the resource discovered from target platform, // it inherits its composition's characteristic to be writable or not. ResourceComponentModeDiscovered = "discovered" )
const ( // ResourceComponentShapeClass indicates the resource is a class. ResourceComponentShapeClass = "class" // ResourceComponentShapeInstance indicates the resource is an instance that implements a class. ResourceComponentShapeInstance = "instance" )
const ( RoleKindSystem = "system" RoleKindProject = "project" )
const ( SystemRoleAnonymity = "system/anonymity" SystemRoleUser = "system/user" SystemRoleManager = "system/manager" SystemRoleAdmin = "system/admin" ProjectRoleViewer = "project/viewer" ProjectRoleMember = "project/member" ProjectRoleOwner = "project/owner" )
const ( VariableSchemaKey = "variables" OutputSchemaKey = "outputs" )
const ( SubjectKindUser = "user" SubjectKindGroup = "group" )
const ( TokenKindDeployment = "deployment" TokenKindAPI = "api" )
const ( WorkflowTypeDefault = "default" WorkflowTypeCron = "cron" )
const ( WorkflowStepTypeService = "service" WorkflowStepTypeApproval = "approval" )
const ( ExecutionStatusRunning = "Running" ExecutionStatusSucceeded = "Succeeded" ExecutionStatusFailed = "Failed" ExecutionStatusError = "Error" )
const ( // WorkflowStepApprovalTypeOr means step is approved // if any of the approval users approves it. WorkflowStepApprovalTypeOr = "or" // WorkflowStepApprovalTypeAnd means step is approved // only all of the approval users approve it. WorkflowStepApprovalTypeAnd = "and" // WorkflowStepApprovalType is the key of type in spec. WorkflowStepApprovalType = "approvalType" // WorkflowStepApprovalUsers is the key of approval users in spec. WorkflowStepApprovalUsers = "approvalUsers" // WorkflowStepApprovedUsers is the key of approved users in spec. WorkflowStepApprovedUsers = "approvedUsers" // WorkflowStepRejectedUsers is the key of reject users in spec. WorkflowStepRejectedUsers = "rejectedUsers" )
const DeployerTypeTF string = "Terraform"
const (
// LabelPrefix is used for generate label's field names.
LabelPrefix = "label:"
)
const ResourceComponentRelationshipTypeDependency = "Dependency"
ResourceComponentRelationshipTypeDependency indicates the relationship between resource component and its dependencies.
const SubjectDomainBuiltin = "builtin"
const WalrusContextVariableName = openapi.WalrusContextVariableName
const (
WalrusFileVersion = "v1"
)
const (
WalrusOperationTokenName = "walrus-operation-token"
)
const (
WorkflowExecutionTriggerTypeManual = "manual"
)
Variables ¶
var SubjectKinds = []string{ SubjectKindUser, SubjectKindGroup, }
var TokenKinds = []string{ TokenKindDeployment, TokenKindAPI, }
Functions ¶
func EnvironmentTypes ¶ added in v0.4.0
func EnvironmentTypes() []string
func IsEnvironmentType ¶ added in v0.4.0
func IsIdleCost ¶
func IsIdleOrManagementCost ¶
func IsManagementCost ¶
func IsRoleKind ¶
func IsSubjectKind ¶
func IsTokenKind ¶
func RolePolicyFields ¶
Types ¶
type CatalogSync ¶
type CatalogSync struct { Total int `json:"total"` Succeeded int `json:"succeeded"` Failed int `json:"failed"` Time time.Time `json:"time"` }
CatalogSync is the sync information of a catalog.
type Context ¶ added in v0.5.0
type Context struct { // Project indicate the project metadata. Project struct { Name string `json:"name,omitempty"` ID object.ID `json:"id,omitempty"` } `json:"project,omitempty"` // Environment indicate the environment metadata. Environment struct { Name string `json:"name,omitempty"` ID object.ID `json:"id,omitempty"` // Namespace is the managed namespace name of an environment, // valid when Kubernetes connector is used in the environment. Namespace string `json:"namespace,omitempty"` } `json:"environment,omitempty"` // Resource indicate the resource metadata. Resource struct { Name string `json:"name,omitempty"` ID object.ID `json:"id,omitempty"` } `json:"resource,omitempty"` }
Context indicate the walrus related metadata, will set to attribute context while user module include this attribute.
func NewContext ¶ added in v0.5.0
func NewContext() *Context
func (*Context) SetEnvironment ¶ added in v0.5.0
func (*Context) SetProject ¶ added in v0.5.0
type FilterField ¶
type FilterField string
FilterField indicate type for filter field.
const ( FilterFieldConnectorID FilterField = "connector_id" FilterFieldNamespace FilterField = "namespace" FilterFieldClusterName FilterField = "cluster_name" FilterFieldNode FilterField = "node" FilterFieldController FilterField = "controller" FilterFieldControllerKind FilterField = "controller_kind" FilterFieldPod FilterField = "pod" FilterFieldContainer FilterField = "container" FilterFieldName FilterField = "name" // FilterFieldProject is "label:seal.io/project-name". FilterFieldProject = FilterField("label:" + LabelWalrusProjectName) // FilterFieldEnvironmentPath is "label:seal.io/environment-name". FilterFieldEnvironmentPath = FilterField("label:" + LabelWalrusEnvironmentPath) // FilterFieldServicePath is "label:seal.io/service-name". FilterFieldServicePath = FilterField("label:" + LabelWalrusServicePath) )
built-in filter fieldName.
func (*FilterField) IsLabel ¶
func (f *FilterField) IsLabel() bool
type FilterRule ¶
type FilterRule struct { FieldName FilterField `json:"fieldName,omitempty"` Operator Operator `json:"operator,omitempty"` Values []string `json:"values,omitempty"` IncludeAll bool `json:"includeAll,omitempty"` }
FilterRule indicate the filter rule for cost query.
type FinOpsCustomPricing ¶
type FinOpsCustomPricing struct { // CPU describing cost per core-month of CPU. CPU string `json:"cpu"` // CPU describing cost per core-month of CPU for spot nodes. SpotCPU string `json:"spotCPU"` // RAM describing cost per GiB-month of RAM/memory. RAM string `json:"ram"` // SpotRAM describing cost per GiB-month of RAM/memory for spot nodes. SpotRAM string `json:"spotRAM"` GPU string `json:"gpu"` SpotGPU string `json:"spotGPU"` // Storage describing cost per GB-month of storage (e.g. PV, disk) resources. Storage string `json:"storage"` }
FinOpsCustomPricing used to config opencost.
func DefaultFinOpsCustomPricing ¶
func DefaultFinOpsCustomPricing() *FinOpsCustomPricing
func (*FinOpsCustomPricing) IsZero ¶
func (c *FinOpsCustomPricing) IsZero() bool
type GraphEdge ¶
type GraphEdge struct { // Type indicates the type of the edge, like: Dependency or Composition. Type string `json:"type"` // Start indicates the beginning of the edge. Start GraphVertexID `json:"start"` // End indicates the ending of the edge. End GraphVertexID `json:"end"` }
GraphEdge defines the edge of graph.
type GraphVertex ¶
type GraphVertex struct { GraphVertexID `json:",inline"` // Name indicates a human-readable string of the vertex. Name string `json:"name,omitempty"` // Description indicates the detail of the vertex. Description string `json:"description,omitempty"` // Icon indicates the icon of the vertex. Icon string `json:"icon,omitempty"` // Labels indicates the labels of the vertex. Labels map[string]string `json:"labels,omitempty"` // CreateTime indicates the time to create the vertex. CreateTime *time.Time `json:"createTime,omitempty"` // UpdateTime indicates the time to update the vertex. UpdateTime *time.Time `json:"updateTime,omitempty"` // Status observes the status of the vertex. Status status.Summary `json:"status,omitempty"` // Extensions records the other information of the vertex, // e.g. the physical type, logical category or the operational keys of the resource. Extensions map[string]any `json:"extensions,omitempty"` }
GraphVertex defines the vertex of graph.
type GraphVertexID ¶
type GraphVertexID struct { // Kind indicates the kind of the resource, // which should be the same as the API handler's Kind returning. Kind string `json:"kind"` // ID indicates the identifier of the resource. ID any `json:"id,omitempty"` }
GraphVertexID defines the identifier of the vertex, which uniquely represents an API resource.
type GroupByField ¶
type GroupByField string
GroupByField indicate type for groupBy field.
const ( // Properties. GroupByFieldConnectorID GroupByField = "connector_id" GroupByFieldNamespace GroupByField = "namespace" GroupByFieldClusterName GroupByField = "cluster_name" GroupByFieldNode GroupByField = "node" GroupByFieldController GroupByField = "controller" GroupByFieldControllerKind GroupByField = "controller_kind" GroupByFieldPod GroupByField = "pod" GroupByFieldContainer GroupByField = "container" GroupByFieldWorkload GroupByField = "workload" // Time bucket. GroupByFieldDay GroupByField = "day" GroupByFieldWeek GroupByField = "week" GroupByFieldMonth GroupByField = "month" // Built-in labels. GroupByFieldProject = GroupByField("label:" + LabelWalrusProjectName) // "label:walrus.seal.io/project-name". GroupByFieldEnvironment = GroupByField( "label:" + LabelWalrusEnvironmentName, ) // "label:walrus.seal.io/environment-name". GroupByFieldService = GroupByField( "label:" + LabelWalrusServiceName, ) // "label:walrus.seal.io/service-name". GroupByFieldEnvironmentPath = GroupByField( "label:" + LabelWalrusEnvironmentPath, ) // "label:walrus.seal.io/environment-path". GroupByFieldServicePath = GroupByField("label:" + LabelWalrusServicePath) // "label:walrus.seal.io/service-path". )
built-in groupBy fieldName.
func (*GroupByField) IsLabel ¶
func (f *GroupByField) IsLabel() bool
type IdleShareOption ¶
type IdleShareOption struct {
}IdleShareOption indicate the shared cost option for idle cost.
type ItemSharedOption ¶
type ItemSharedOption struct {}
ItemSharedOption indicate the shared cost option for custom item cost query.
type ItemSharedOptions ¶
type ItemSharedOptions []ItemSharedOption
ItemSharedOptions indicate the shared cost options for custom item cost query.
type ManagementShareOption ¶
type ManagementShareOption struct {
}ManagementShareOption indicate the shared cost option for management cost.
type MatchResourceMetadata ¶ added in v0.5.0
type MetadataName ¶ added in v0.5.0
type MetadataName struct {
Name string `json:"name,omitempty" yaml:"name,omitempty"`
}
MetadataName is the name of the resource.
type OutputValue ¶
type ProviderRequirement ¶
type ProviderRequirement struct { *tfconfig.ProviderRequirement Name string `json:"name"` }
ProviderRequirement include the required provider.
type QueryCondition ¶
type QueryCondition struct { Filters CostFilters `json:"filters,omitempty"` GroupBy GroupByField `json:"groupBy,omitempty"` Step Step `json:"step,omitempty"` Paging QueryPagination `json:"paging,omitempty"` Query string `json:"query"` }
QueryCondition indicated the filters, groupBys, step, and shared costs query params.
type QueryPagination ¶
type QueryPagination struct { Page int `json:"page,omitempty"` PerPage int `json:"perPage,omitempty"` }
QueryPagination indicate the pagination query config.
type ResourceComponentOperationKey ¶ added in v0.4.0
type ResourceComponentOperationKey struct { // Keys indicates the subordinate keys, // usually, it should not be valued in leaves. Keys []ResourceComponentOperationKey `json:"keys,omitempty"` // Name indicates the name of the key. Name string `json:"name"` // Value indicates the value of the key, // usually, it should be valued in leaves. Value string `json:"value,omitempty"` // Loggable indicates whether to be able to get log. Loggable *bool `json:"loggable,omitempty"` // Executable indicates whether to be able to execute remote command. Executable *bool `json:"executable,omitempty"` }
ResourceComponentOperationKey holds hierarchy query keys.
type ResourceComponentOperationKeys ¶ added in v0.4.0
type ResourceComponentOperationKeys struct { // Labels stores label of layer, // its length means each key contains levels with the same value as level. Labels []string `json:"labels,omitempty"` // Keys stores key in tree. Keys []ResourceComponentOperationKey `json:"keys,omitempty"` }
type ResourceEndpoint ¶ added in v0.5.0
type ResourceEndpoint struct { // Name indicates the name of endpoint. Name string `json:"name"` // URL indicates the URL of endpoint, must be a valid URL. URL string `json:"url,cli-table-column"` }
ResourceEndpoint holds the endpoint definition of resource.
type ResourceEndpoints ¶ added in v0.5.0
type ResourceEndpoints []ResourceEndpoint
ResourceEndpoints holds a list of the endpoints definitions of resource.
func ResourceEndpointsFromMap ¶ added in v0.5.0
func ResourceEndpointsFromMap(m map[string]string) ResourceEndpoints
ResourceEndpointsFromMap converts a map to ResourceEndpoints.
func (ResourceEndpoints) Len ¶ added in v0.5.0
func (in ResourceEndpoints) Len() int
func (ResourceEndpoints) Less ¶ added in v0.5.0
func (in ResourceEndpoints) Less(i, j int) bool
func (ResourceEndpoints) Sort ¶ added in v0.5.0
func (in ResourceEndpoints) Sort() ResourceEndpoints
func (ResourceEndpoints) Swap ¶ added in v0.5.0
func (in ResourceEndpoints) Swap(i, j int)
type ResourceSpec ¶ added in v0.5.0
type ResourceSpec struct { Name string `json:"name" yaml:"name,omitempty"` Description string `json:"description,omitempty" yaml:"description,omitempty"` // Scope. Project *MetadataName `json:"project,omitempty" yaml:"project,omitempty"` Environment *MetadataName `json:"environment,omitempty" yaml:"environment,omitempty"` // Template or resource definition type. Type string `json:"type,omitempty" yaml:"type,omitempty"` Template *TemplateSpec `json:"template,omitempty" yaml:"template,omitempty"` Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` Attributes property.Values `json:"attributes,omitempty" yaml:"attributes,omitempty"` }
ResourceSpec include the fields walrus file related. The walrus file yaml preserves the order of the fields in this struct.
type RetryStrategy ¶ added in v0.4.0
type RetryStrategy struct { Limit int `json:"limit"` RetryPolicy wfv1.RetryPolicy `json:"retryPolicy"` Backoff *wfv1.Backoff `json:"backoff"` }
RetryStrategy is the retry strategy of a workflow step. See https://raw.githubusercontent.com/argoproj/argo-workflows/master/examples/retry-conditional.yaml
type RolePolicies ¶
type RolePolicies []RolePolicy
func DefaultRolePolicies ¶
func DefaultRolePolicies() RolePolicies
func (RolePolicies) Clone ¶
func (in RolePolicies) Clone() RolePolicies
func (RolePolicies) Deduplicate ¶
func (in RolePolicies) Deduplicate() RolePolicies
func (RolePolicies) Delete ¶
func (in RolePolicies) Delete(rs ...RolePolicy) RolePolicies
func (RolePolicies) Len ¶
func (in RolePolicies) Len() int
func (RolePolicies) Less ¶
func (in RolePolicies) Less(i, j int) bool
func (RolePolicies) Normalize ¶
func (in RolePolicies) Normalize() RolePolicies
func (RolePolicies) Sort ¶
func (in RolePolicies) Sort() RolePolicies
func (RolePolicies) Swap ¶
func (in RolePolicies) Swap(i, j int)
type RolePolicy ¶
type RolePolicy struct { // Actions specifies the including action list of this policy. Actions []string `json:"actions,omitempty"` // Resources specifies the including resource list of this policy. Resources []string `json:"resources,omitempty"` // ResourceRefers specifies the including object.Refer list of this policy, // only works if the Resources specified as ["<a kind of resource>"]. ResourceRefers []string `json:"resourceRefers,omitempty"` // Paths specifies the route-registered path list of this policy, // i.e. /resources/:id, only works if the Resources has not been specified. Paths []string `json:"paths,omitempty"` }
func (RolePolicy) IsZero ¶
func (in RolePolicy) IsZero() bool
func (RolePolicy) Normalize ¶
func (in RolePolicy) Normalize() RolePolicy
func (RolePolicy) String ¶
func (in RolePolicy) String() string
type Schema ¶ added in v0.4.0
Schema specifies the openAPI schema with variables and outputs.
func (*Schema) Intersect ¶ added in v0.4.0
Intersect sets variables & outputs schema of s to intersection of s and s2.
func (*Schema) OutputSchema ¶ added in v0.4.0
OutputSchema returns the outputs' schema.
func (*Schema) RemoveVariableContext ¶ added in v0.5.0
func (s *Schema) RemoveVariableContext()
func (*Schema) SetOutputSchema ¶ added in v0.4.0
func (*Schema) SetVariableSchema ¶ added in v0.4.0
func (*Schema) VariableSchema ¶ added in v0.4.0
VariableSchema returns the variables' schema.
type Selector ¶ added in v0.4.0
type Selector struct { ProjectNames []string `json:"projectNames,omitempty"` ProjectLabels map[string]string `json:"projectLabels,omitempty"` EnvironmentNames []string `json:"environmentNames,omitempty"` EnvironmentTypes []string `json:"environmentTypes,omitempty"` EnvironmentLabels map[string]string `json:"environmentLabels,omitempty"` ResourceLabels map[string]string `json:"resourceLabels,omitempty"` }
type SharedCostOptions ¶
type SharedCostOptions struct {}
SharedCostOptions indicate the shared cost options for shared cost query.
type SharingStrategy ¶
type SharingStrategy string
SharingStrategy indicate the share cost strategy.
const ( SharingStrategyEqually SharingStrategy = "equally" SharingStrategyProportionally SharingStrategy = "proportionally" )
type TemplateSpec ¶ added in v0.5.0
type TemplateSpec struct { Name string `json:"name,omitempty" yaml:"name,omitempty"` Version string `json:"version,omitempty" yaml:"version,omitempty"` }
TemplateSpec include the field walrus file related.
type TemplateVersionSchema ¶ added in v0.4.0
type TemplateVersionSchema struct { Schema `json:",inline"` // TemplateVersionSchemaData include the data of this template version. TemplateVersionSchemaData `json:",inline"` }
TemplateVersionSchema include the internal template variables schema and template data.
func (*TemplateVersionSchema) Validate ¶ added in v0.4.0
func (s *TemplateVersionSchema) Validate() error
Validate reports if the schema is valid.
type TemplateVersionSchemaData ¶ added in v0.4.0
type TemplateVersionSchemaData struct { // Readme specifies the readme of this template. Readme string `json:"readme"` // RequiredProviders specifies the required providers of this template. RequiredProviders []ProviderRequirement `json:"requiredProviders"` }
TemplateVersionSchemaData include the data of this template version.
type UISchema ¶ added in v0.4.0
type UISchema Schema
UISchema include the UI schema that users can customize.
func (*UISchema) SetVariableSchema ¶ added in v0.5.0
SetVariableSchema sets the variables' schema.
func (*UISchema) VariableSchema ¶ added in v0.4.0
VariableSchema returns the variables' schema.
type WalrusFile ¶ added in v0.5.0
type WalrusFile struct { Version string `json:"version,omitempty" yaml:"version,omitempty"` Resources []ResourceSpec `json:"resources,omitempty" yaml:"resources,omitempty"` }
WalrusFile is the spec for the WalrusFile.
func (*WalrusFile) Yaml ¶ added in v0.5.0
func (w *WalrusFile) Yaml() ([]byte, error)
Yaml returns the yaml bytes of the walrus file.
type WorkflowExecutionTrigger ¶ added in v0.4.0
WorkflowExecutionTrigger is the trigger of a workflow execution.
type WorkflowStepApprovalSpec ¶ added in v0.4.0
type WorkflowStepApprovalSpec struct { ApprovalUsers []object.ID `json:"approvalUsers"` ApprovedUsers []object.ID `json:"approvedUsers"` RejectedUsers []object.ID `json:"rejectedUsers"` Type string `json:"approvalType"` }
func NewWorkflowStepApprovalSpec ¶ added in v0.4.0
func NewWorkflowStepApprovalSpec(spec map[string]any) (*WorkflowStepApprovalSpec, error)
func (*WorkflowStepApprovalSpec) IsApprovalUser ¶ added in v0.4.0
func (s *WorkflowStepApprovalSpec) IsApprovalUser(user object.ID) bool
func (*WorkflowStepApprovalSpec) IsApproved ¶ added in v0.4.0
func (s *WorkflowStepApprovalSpec) IsApproved() bool
func (*WorkflowStepApprovalSpec) IsRejected ¶ added in v0.4.0
func (s *WorkflowStepApprovalSpec) IsRejected() bool
func (*WorkflowStepApprovalSpec) Reset ¶ added in v0.4.0
func (s *WorkflowStepApprovalSpec) Reset()
func (*WorkflowStepApprovalSpec) SetApprovedUser ¶ added in v0.4.0
func (s *WorkflowStepApprovalSpec) SetApprovedUser(user object.ID) error
func (*WorkflowStepApprovalSpec) SetRejectedUser ¶ added in v0.4.0
func (s *WorkflowStepApprovalSpec) SetRejectedUser(user object.ID) error
func (*WorkflowStepApprovalSpec) SetUserApproval ¶ added in v0.4.0
func (s *WorkflowStepApprovalSpec) SetUserApproval(user object.ID, approved bool) error
SetUserApproval sets the user approval status.
func (*WorkflowStepApprovalSpec) ToAttributes ¶ added in v0.4.0
func (s *WorkflowStepApprovalSpec) ToAttributes() map[string]any
type WorkflowVariable ¶ added in v0.4.0
type WorkflowVariable struct { // Name is the name of the parameter. Name string `json:"name"` Value string `json:"value"` Overwrite bool `json:"overwrite"` Description string `json:"description,omitempty"` }
WorkflowVariable is the config of a workflow parameter. Parameters could be reconfigured in workflow execution.
func (*WorkflowVariable) Validate ¶ added in v0.4.0
func (c *WorkflowVariable) Validate() error
type WorkflowVariables ¶ added in v0.4.0
type WorkflowVariables []*WorkflowVariable
func (WorkflowVariables) Validate ¶ added in v0.4.0
func (c WorkflowVariables) Validate() error
Source Files ¶
- built_in_annotations.go
- built_in_labels.go
- built_in_names.go
- catalog.go
- connector.go
- cost_report.go
- deployer.go
- environment.go
- git.go
- graph.go
- perspective.go
- resource.go
- resource_component.go
- resource_definition.go
- resource_revision.go
- role.go
- schema.go
- subject.go
- token.go
- walrus_context.go
- walrus_file.go
- workflow.go