Documentation ¶
Index ¶
- Constants
- func NewNodeTemplatePointerEdge(type_ string, name string, pointer *Pointer, ...)
- func SetMetadata(entity cloutpkg.Entity, kind string)
- type Artifact
- type Artifacts
- type CallOperation
- type Capabilities
- type Capability
- func (self *Capability) MarshalCBOR() ([]byte, error)
- func (self *Capability) MarshalJSON() ([]byte, error)
- func (self *Capability) MarshalMsgpack() ([]byte, error)
- func (self *Capability) MarshalYAML() (any, error)
- func (self *Capability) Marshalable() any
- func (self *Capability) ToARD(reflector *ard.Reflector) (any, error)
- type EntityType
- type EntityTypes
- type FunctionCall
- type FunctionCallMap
- type FunctionCallMapMap
- type FunctionCalls
- type Group
- type Groups
- type Interface
- type Interfaces
- type List
- type Location
- type Map
- type MarshalableCapability
- type MarshalablePointer
- type MarshalableRequirement
- type NodeTemplate
- func (self *NodeTemplate) NewArtifact(name string) *Artifact
- func (self *NodeTemplate) NewCapability(name string, location *Location) *Capability
- func (self *NodeTemplate) NewInterface(name string) *Interface
- func (self *NodeTemplate) NewPointer(target string) *Pointer
- func (self *NodeTemplate) NewRequirement(name string, location *Location) *Requirement
- type NodeTemplates
- type Normalizable
- type Notification
- type Notifications
- type Operation
- type Operations
- type Pointer
- func (self *Pointer) MarshalCBOR() ([]byte, error)
- func (self *Pointer) MarshalJSON() ([]byte, error)
- func (self *Pointer) MarshalMsgpack() ([]byte, error)
- func (self *Pointer) MarshalYAML() (any, error)
- func (self *Pointer) Marshalable() any
- func (self *Pointer) ToARD(reflector *ard.Reflector) (any, error)
- type Pointers
- type Policies
- type Policy
- type PolicyTrigger
- type Primitive
- type Relationship
- type Relationships
- type Requirement
- func (self *Requirement) MarshalCBOR() ([]byte, error)
- func (self *Requirement) MarshalJSON() ([]byte, error)
- func (self *Requirement) MarshalMsgpack() ([]byte, error)
- func (self *Requirement) MarshalYAML() (any, error)
- func (self *Requirement) Marshalable() any
- func (self *Requirement) NewRelationship() *Relationship
- func (self *Requirement) ToARD(reflector *ard.Reflector) (any, error)
- type Requirements
- type ServiceTemplate
- func (serviceTemplate *ServiceTemplate) Compile() (*cloutpkg.Clout, error)
- func (self *ServiceTemplate) NewGroup(name string) *Group
- func (self *ServiceTemplate) NewNodeTemplate(name string) *NodeTemplate
- func (self *ServiceTemplate) NewPolicy(name string) *Policy
- func (self *ServiceTemplate) NewSubstitution() *Substitution
- func (self *ServiceTemplate) NewWorkflow(name string) *Workflow
- type Substitution
- type Value
- type ValueList
- type ValueMeta
- type ValueMetaMap
- type Values
- type Workflow
- type WorkflowActivity
- type WorkflowPrecondition
- type WorkflowStep
- type WorkflowSteps
- type Workflows
Constants ¶
View Source
const VERSION = "1.0"
Variables ¶
This section is empty.
Functions ¶
func SetMetadata ¶
Types ¶
type Artifact ¶
type Artifact struct { NodeTemplate *NodeTemplate `json:"-" yaml:"-"` Name string `json:"-" yaml:"-"` Description string `json:"description" yaml:"description"` Types EntityTypes `json:"types" yaml:"types"` Properties Values `json:"properties" yaml:"properties"` Filename string `json:"filename" yaml:"filename"` SourcePath string `json:"sourcePath" yaml:"sourcePath"` TargetPath string `json:"targetPath" yaml:"targetPath"` Version string `json:"version" yaml:"version"` ChecksumAlgorithm string `json:"checksumAlgorithm" yaml:"checksumAlgorithm"` Checksum string `json:"checksum" yaml:"checksum"` Credential Value `json:"credential" yaml:"credential"` }
type CallOperation ¶
type CallOperation struct { Activity *WorkflowActivity `json:"-" yaml:"-"` Operation *Operation `json:"operation" yaml:"operation"` Inputs Values `json:"inputs" yaml:"inputs"` }
type Capabilities ¶
type Capabilities map[string]*Capability
type Capability ¶
type Capability struct { NodeTemplate *NodeTemplate Name string Description string Types EntityTypes Properties Values Attributes Values MinRelationshipCount uint64 MaxRelationshipCount uint64 Location *Location }
func (*Capability) MarshalCBOR ¶
func (self *Capability) MarshalCBOR() ([]byte, error)
(cbor.Marshaler interface)
func (*Capability) MarshalJSON ¶
func (self *Capability) MarshalJSON() ([]byte, error)
(json.Marshaler interface)
func (*Capability) MarshalMsgpack ¶
func (self *Capability) MarshalMsgpack() ([]byte, error)
([msgpack.Marshaler] interface)
func (*Capability) MarshalYAML ¶
func (self *Capability) MarshalYAML() (any, error)
([yaml.Marshaler] interface)
func (*Capability) Marshalable ¶
func (self *Capability) Marshalable() any
type EntityType ¶
type EntityType struct { Name string `json:"-" yaml:"-"` Description string `json:"description,omitempty" yaml:"description,omitempty"` Metadata map[string]string `json:"metadata,omitempty" yaml:"metadata,omitempty"` Parent string `json:"parent,omitempty" yaml:"parent,omitempty"` }
func NewEntityType ¶
func NewEntityType(name string) *EntityType
type EntityTypes ¶
type EntityTypes map[string]*EntityType
func GetEntityTypes ¶
func GetHierarchyEntityTypes ¶
func GetHierarchyEntityTypes(hierarchy *parsing.Hierarchy) EntityTypes
func NewEntityTypes ¶
func NewEntityTypes(names ...string) EntityTypes
type FunctionCall ¶
type FunctionCall struct { Key Value `json:"$key,omitempty" yaml:"$key,omitempty"` ValueMeta *ValueMeta `json:"$meta,omitempty" yaml:"$meta,omitempty"` FunctionCall *parsing.FunctionCall `json:"$functionCall" yaml:"$functionCall"` }
func NewFunctionCall ¶
func NewFunctionCall(functionCall *parsing.FunctionCall) *FunctionCall
func (*FunctionCall) SetMeta ¶
func (self *FunctionCall) SetMeta(valueMeta *ValueMeta)
Value interface
type FunctionCallMap ¶
type FunctionCallMap map[string]FunctionCalls
type FunctionCallMapMap ¶
type FunctionCallMapMap map[string]FunctionCallMap
type FunctionCalls ¶
type FunctionCalls []*FunctionCall
type Group ¶
type Group struct { ServiceTemplate *ServiceTemplate `json:"-" yaml:"-"` Name string `json:"-" yaml:"-"` Metadata map[string]string `json:"metadata" yaml:"metadata"` Description string `json:"description" yaml:"description"` Types EntityTypes `json:"types" yaml:"types"` Properties Values `json:"properties" yaml:"properties"` Interfaces Interfaces `json:"interfaces" yaml:"interfaces"` Members []*NodeTemplate `json:"-" yaml:"-"` }
func (*Group) NewInterface ¶
type Interface ¶
type Interface struct { NodeTemplate *NodeTemplate `json:"-" yaml:"-"` Group *Group `json:"-" yaml:"-"` Relationship *Relationship `json:"-" yaml:"-"` Name string `json:"-" yaml:"-"` Description string `json:"description" yaml:"description"` Types EntityTypes `json:"types" yaml:"types"` Inputs Values `json:"inputs" yaml:"inputs"` Operations Operations `json:"operations" yaml:"operations"` Notifications Notifications `json:"notifications" yaml:"notifications"` }
func (*Interface) NewNotification ¶
func (self *Interface) NewNotification(name string) *Notification
func (*Interface) NewOperation ¶
type Interfaces ¶
type List ¶
type Location ¶
type Location struct { Path string `json:"path" yaml:"path"` Row int `json:"row" yaml:"row"` Column int `json:"column" yaml:"column"` }
func NewLocationForContext ¶
type Map ¶
type MarshalableCapability ¶
type MarshalableCapability struct { Description string `json:"description" yaml:"description"` Types EntityTypes `json:"types" yaml:"types"` Properties Values `json:"properties" yaml:"properties"` Attributes Values `json:"attributes" yaml:"attributes"` MinRelationshipCount int64 `json:"minRelationshipCount" yaml:"minRelationshipCount"` MaxRelationshipCount int64 `json:"maxRelationshipCount" yaml:"maxRelationshipCount"` Location *Location `json:"location" yaml:"location"` }
type MarshalablePointer ¶
type MarshalableRequirement ¶
type MarshalableRequirement struct { Name string `json:"name" yaml:"name"` CapabilityTypeName string `json:"capabilityTypeName" yaml:"capabilityTypeName"` CapabilityName string `json:"capabilityName" yaml:"capabilityName"` NodeTypeName string `json:"nodeTypeName" yaml:"nodeTypeName"` NodeTemplateName string `json:"nodeTemplateName" yaml:"nodeTemplateName"` NodeTemplatePropertyValidators FunctionCallMap `json:"nodeTemplatePropertyValidators" yaml:"nodeTemplatePropertyValidators"` CapabilityPropertyValidators FunctionCallMapMap `json:"capabilityPropertyValidators" yaml:"capabilityPropertyValidators"` Relationship *Relationship `json:"relationship" yaml:"relationship"` Directives []string `json:"directives" yaml:"directives"` Optional bool `json:"optional" yaml:"optional"` Location *Location `json:"location" yaml:"location"` }
type NodeTemplate ¶
type NodeTemplate struct { ServiceTemplate *ServiceTemplate `json:"-" yaml:"-"` Name string `json:"-" yaml:"-"` Metadata map[string]string `json:"metadata" yaml:"metadata"` Description string `json:"description" yaml:"description"` Types EntityTypes `json:"types" yaml:"types"` Directives []string `json:"directives" yaml:"directives"` Properties Values `json:"properties" yaml:"properties"` Attributes Values `json:"attributes" yaml:"attributes"` Requirements Requirements `json:"requirements" yaml:"requirements"` Capabilities Capabilities `json:"capabilities" yaml:"capabilities"` Interfaces Interfaces `json:"interfaces" yaml:"interfaces"` Artifacts Artifacts `json:"artifacts" yaml:"artifacts"` }
func (*NodeTemplate) NewArtifact ¶
func (self *NodeTemplate) NewArtifact(name string) *Artifact
func (*NodeTemplate) NewCapability ¶
func (self *NodeTemplate) NewCapability(name string, location *Location) *Capability
func (*NodeTemplate) NewInterface ¶
func (self *NodeTemplate) NewInterface(name string) *Interface
func (*NodeTemplate) NewPointer ¶
func (self *NodeTemplate) NewPointer(target string) *Pointer
func (*NodeTemplate) NewRequirement ¶
func (self *NodeTemplate) NewRequirement(name string, location *Location) *Requirement
type NodeTemplates ¶
type NodeTemplates map[string]*NodeTemplate
type Normalizable ¶
type Normalizable interface {
NormalizeServiceTemplate() *ServiceTemplate
}
type Notification ¶
type Notification struct { Interface *Interface `json:"-" yaml:"-"` Name string `json:"-" yaml:"-"` Description string `json:"description" yaml:"description"` Implementation string `json:"implementation" yaml:"implementation"` Dependencies []string `json:"dependencies" yaml:"dependencies"` Timeout int64 `json:"timeout" yaml:"timeout"` Host string `json:"host,omitempty" yaml:"host,omitempty"` Outputs Values `json:"outputs" yaml:"outputs"` }
type Notifications ¶
type Notifications map[string]*Notification
type Operation ¶
type Operation struct { Interface *Interface `json:"-" yaml:"-"` PolicyTrigger *PolicyTrigger `json:"-" yaml:"-"` Name string `json:"-" yaml:"-"` Description string `json:"description" yaml:"description"` Implementation string `json:"implementation" yaml:"implementation"` Dependencies []string `json:"dependencies" yaml:"dependencies"` Inputs Values `json:"inputs" yaml:"inputs"` Outputs Values `json:"outputs" yaml:"outputs"` Timeout int64 `json:"timeout" yaml:"timeout"` Host string `json:"host,omitempty" yaml:"host,omitempty"` }
type Operations ¶
type Pointer ¶
type Pointer struct { NodeTemplate *NodeTemplate Target string }
func NewPointer ¶
func (*Pointer) MarshalCBOR ¶
(cbor.Marshaler interface)
func (*Pointer) MarshalJSON ¶
(json.Marshaler interface)
func (*Pointer) MarshalMsgpack ¶
([msgpack.Marshaler] interface)
func (*Pointer) MarshalYAML ¶
([yaml.Marshaler] interface)
func (*Pointer) Marshalable ¶
type Policy ¶
type Policy struct { ServiceTemplate *ServiceTemplate `json:"-" yaml:"-"` Name string `json:"-" yaml:"-"` Metadata map[string]string `json:"metadata" yaml:"metadata"` Description string `json:"description" yaml:"description"` Types EntityTypes `json:"types" yaml:"types"` Properties Values `json:"properties" yaml:"properties"` GroupTargets []*Group `json:"-" yaml:"-"` NodeTemplateTargets []*NodeTemplate `json:"-" yaml:"-"` Triggers []*PolicyTrigger `json:"-" yaml:"-"` }
func (*Policy) NewTrigger ¶
func (self *Policy) NewTrigger() *PolicyTrigger
type PolicyTrigger ¶
type PolicyTrigger struct { Policy *Policy `json:"-" yaml:"-"` EventType string `json:"eventType" yaml:"eventType"` Operation *Operation `json:"operation" yaml:"operation"` Workflow *Workflow `json:"workflow" yaml:"workflow"` }
func (*PolicyTrigger) NewOperation ¶
func (self *PolicyTrigger) NewOperation() *Operation
type Primitive ¶
type Primitive struct { Key Value `json:"$key,omitempty" yaml:"$key,omitempty"` ValueMeta *ValueMeta `json:"$meta,omitempty" yaml:"$meta,omitempty"` Primitive ard.Value `json:"$primitive" yaml:"$primitive"` }
func NewPrimitive ¶
func NewPrimitive(primitive ard.Value) *Primitive
type Relationship ¶
type Relationship struct { Requirement *Requirement `json:"-" yaml:"-"` Name string `json:"-" yaml:"-"` Metadata map[string]string `json:"metadata" yaml:"metadata"` Description string `json:"description" yaml:"description"` Types EntityTypes `json:"types" yaml:"types"` Properties Values `json:"properties" yaml:"properties"` Attributes Values `json:"attributes" yaml:"attributes"` Interfaces Interfaces `json:"interfaces" yaml:"interfaces"` }
func (*Relationship) NewInterface ¶
func (self *Relationship) NewInterface(name string) *Interface
type Relationships ¶
type Relationships []*Relationship
type Requirement ¶
type Requirement struct { SourceNodeTemplate *NodeTemplate Name string CapabilityTypeName *string CapabilityName *string NodeTypeName *string NodeTemplate *NodeTemplate NodeTemplatePropertyValidation FunctionCallMap CapabilityPropertyValidation FunctionCallMapMap Relationship *Relationship Directives []string Optional bool Location *Location }
func (*Requirement) MarshalCBOR ¶
func (self *Requirement) MarshalCBOR() ([]byte, error)
(cbor.Marshaler interface)
func (*Requirement) MarshalJSON ¶
func (self *Requirement) MarshalJSON() ([]byte, error)
(json.Marshaler interface)
func (*Requirement) MarshalMsgpack ¶
func (self *Requirement) MarshalMsgpack() ([]byte, error)
([msgpack.Marshaler] interface)
func (*Requirement) MarshalYAML ¶
func (self *Requirement) MarshalYAML() (any, error)
([yaml.Marshaler] interface)
func (*Requirement) Marshalable ¶
func (self *Requirement) Marshalable() any
func (*Requirement) NewRelationship ¶
func (self *Requirement) NewRelationship() *Relationship
type Requirements ¶
type Requirements []*Requirement
type ServiceTemplate ¶
type ServiceTemplate struct { Description string `json:"description" yaml:"description"` NodeTemplates NodeTemplates `json:"nodeTemplates" yaml:"nodeTemplates"` Groups Groups `json:"groups" yaml:"groups"` Policies Policies `json:"policies" yaml:"policies"` Inputs Values `json:"inputs" yaml:"inputs"` Outputs Values `json:"outputs" yaml:"outputs"` Workflows Workflows `json:"workflows" yaml:"workflows"` Substitution *Substitution `json:"substitution" yaml:"substitution"` Metadata map[string]string `json:"metadata" yaml:"metadata"` ScriptletNamespace *parsing.ScriptletNamespace `json:"scriptletNamespace" yaml:"scriptletNamespace"` }
func NewServiceTemplate ¶
func NewServiceTemplate() *ServiceTemplate
func NormalizeServiceTemplate ¶
func NormalizeServiceTemplate(entityPtr parsing.EntityPtr) (*ServiceTemplate, bool)
From Normalizable interface
func (*ServiceTemplate) Compile ¶
func (serviceTemplate *ServiceTemplate) Compile() (*cloutpkg.Clout, error)
func (*ServiceTemplate) NewGroup ¶
func (self *ServiceTemplate) NewGroup(name string) *Group
func (*ServiceTemplate) NewNodeTemplate ¶
func (self *ServiceTemplate) NewNodeTemplate(name string) *NodeTemplate
func (*ServiceTemplate) NewPolicy ¶
func (self *ServiceTemplate) NewPolicy(name string) *Policy
func (*ServiceTemplate) NewSubstitution ¶
func (self *ServiceTemplate) NewSubstitution() *Substitution
func (*ServiceTemplate) NewWorkflow ¶
func (self *ServiceTemplate) NewWorkflow(name string) *Workflow
type Substitution ¶
type Substitution struct { ServiceTemplate *ServiceTemplate `json:"-" yaml:"-"` Type string `json:"type" yaml:"type"` TypeMetadata map[string]string `json:"typeMetadata" yaml:"typeMetadata"` InputPointers Pointers `json:"inputPointers" yaml:"inputPointers"` CapabilityPointers Pointers `json:"capabilityPointers" yaml:"capabilityPointers"` RequirementPointer Pointers `json:"requirementPointers" yaml:"requirementPointers"` PropertyPointers Pointers `json:"propertyPointers" yaml:"propertyPointers"` PropertyValues Values `json:"propertyValues" yaml:"propertyValues"` AttributePointers Pointers `json:"attributePointers" yaml:"attributePointers"` InterfacePointers Pointers `json:"interfacePointers" yaml:"interfacePointers"` }
type ValueMeta ¶
type ValueMeta struct { Type string `json:"type,omitempty" yaml:"type,omitempty"` Element *ValueMeta `json:"element,omitempty" yaml:"element,omitempty"` Key *ValueMeta `json:"key,omitempty" yaml:"key,omitempty"` Value *ValueMeta `json:"value,omitempty" yaml:"value,omitempty"` Fields ValueMetaMap `json:"fields,omitempty" yaml:"fields,omitempty"` Validators FunctionCalls `json:"validators,omitempty" yaml:"validators,omitempty"` Converter *FunctionCall `json:"converter,omitempty" yaml:"converter,omitempty"` Description string `json:"description,omitempty" yaml:"description,omitempty"` TypeDescription string `json:"typeDescription,omitempty" yaml:"typeDescription,omitempty"` LocalDescription string `json:"localDescription,omitempty" yaml:"localDescription,omitempty"` Metadata map[string]string `json:"metadata,omitempty" yaml:"metadata,omitempty"` TypeMetadata map[string]string `json:"typeMetadata,omitempty" yaml:"typeMetadata,omitempty"` LocalMetadata map[string]string `json:"localMetadata,omitempty" yaml:"localMetadata,omitempty"` }
func CopyValueMeta ¶
func NewValueMeta ¶
func NewValueMeta() *ValueMeta
func (*ValueMeta) AddValidator ¶
func (self *ValueMeta) AddValidator(validator *parsing.FunctionCall)
func (*ValueMeta) SetConverter ¶
func (self *ValueMeta) SetConverter(converter *parsing.FunctionCall)
type ValueMetaMap ¶
func CopyValueMetaMap ¶
func CopyValueMetaMap(valueMetaMap ValueMetaMap) ValueMetaMap
func (ValueMetaMap) Empty ¶
func (self ValueMetaMap) Empty() bool
func (ValueMetaMap) Prune ¶
func (self ValueMetaMap) Prune()
type Workflow ¶
type Workflow struct { ServiceTemplate *ServiceTemplate `json:"-" yaml:"-"` Name string `json:"-" yaml:"-"` Metadata map[string]string `json:"metadata" yaml:"metadata"` Description string `json:"description" yaml:"description"` Preconditions []*WorkflowPrecondition `json:"preconditions" yaml:"preconditions"` Steps WorkflowSteps `json:"steps" yaml:"steps"` Inputs Values `json:"inputs" yaml:"inputs"` }
func (*Workflow) NewStep ¶
func (self *Workflow) NewStep(name string) *WorkflowStep
type WorkflowActivity ¶
type WorkflowActivity struct { Step *WorkflowStep `json:"-" yaml:"-"` DelegateWorkflow *Workflow `json:"-" yaml:"-"` InlineWorkflow *Workflow `json:"-" yaml:"-"` SetNodeState string `json:"setNodeState" yaml:"setNodeState"` CallOperation *CallOperation `json:"callOperation" yaml:"callOperation"` }
func (*WorkflowActivity) NewCallOperation ¶
func (self *WorkflowActivity) NewCallOperation() *CallOperation
type WorkflowPrecondition ¶
type WorkflowPrecondition struct { TargetNodeTemplate *NodeTemplate `json:"-" yaml:"-"` TargetGroup *Group `json:"-" yaml:"-"` }
type WorkflowStep ¶
type WorkflowStep struct { Workflow *Workflow `json:"-" yaml:"-"` Name string `json:"-" yaml:"-"` TargetNodeTemplate *NodeTemplate `json:"-" yaml:"-"` TargetGroup *Group `json:"-" yaml:"-"` // TODO: Filters OnSuccessSteps []*WorkflowStep `json:"-" yaml:"-"` OnFailureSteps []*WorkflowStep `json:"-" yaml:"-"` Activities []*WorkflowActivity `json:"-" yaml:"-"` Host string `json:"-" yaml:"-"` }
func (*WorkflowStep) NewActivity ¶
func (self *WorkflowStep) NewActivity() *WorkflowActivity
type WorkflowSteps ¶
type WorkflowSteps map[string]*WorkflowStep
Source Files ¶
- artifact.go
- capability.go
- common.go
- compile.go
- entity-type.go
- function-call.go
- group.go
- interface.go
- list.go
- location.go
- map.go
- node-template.go
- notification.go
- operation.go
- pointer.go
- policy.go
- primitive.go
- relationship.go
- requirement.go
- service-template.go
- substitution.go
- value-meta.go
- value.go
- workflow.go
Click to show internal directories.
Click to hide internal directories.