Documentation
¶
Index ¶
- type Graph
- func (g *Graph) Clear(id string)
- func (g *Graph) GetAverageTimeProcessingBeforeStart(average float64, processingID string, request *tools.APIRequest) float64
- func (g *Graph) GetAverageTimeRelatedToProcessingActivity(start time.Time, processings []*resources.ProcessingResource, ...) (float64, float64)
- func (g *Graph) GetResource(id string) (tools.DataType, resources.ResourceInterface)
- func (wf *Graph) IsCompute(item GraphItem) bool
- func (wf *Graph) IsData(item GraphItem) bool
- func (wf *Graph) IsProcessing(item GraphItem) bool
- func (wf *Graph) IsStorage(item GraphItem) bool
- func (wf *Graph) IsWorkflow(item GraphItem) bool
- type GraphItem
- type GraphLink
- type GraphLinkStyle
- type Position
- type StorageProcessingGraphLink
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Graph ¶
type Graph struct { Partial bool `json:"partial" default:"false"` // Partial is a flag that indicates if the graph is partial Zoom float64 `bson:"zoom" json:"zoom" default:"1"` // Zoom is the graphical zoom of the graph Items map[string]GraphItem `bson:"items" json:"items" default:"{}" validate:"required"` // Items is the list of elements in the graph Links []GraphLink `bson:"links" json:"links" default:"{}" validate:"required"` // Links is the list of links between elements in the graph }
Graph is a struct that represents a graph
func (*Graph) GetAverageTimeProcessingBeforeStart ¶
func (g *Graph) GetAverageTimeProcessingBeforeStart(average float64, processingID string, request *tools.APIRequest) float64
* GetAverageTimeBeforeStart is a function that returns the average time before the start of a processing
func (*Graph) GetAverageTimeRelatedToProcessingActivity ¶
func (g *Graph) GetAverageTimeRelatedToProcessingActivity(start time.Time, processings []*resources.ProcessingResource, resource resources.ResourceInterface, f func(GraphItem) resources.ResourceInterface, request *tools.APIRequest) (float64, float64)
func (*Graph) GetResource ¶
func (*Graph) IsProcessing ¶
func (*Graph) IsWorkflow ¶
type GraphItem ¶
type GraphItem struct { ID string `bson:"id" json:"id" validate:"required"` // ID is the unique identifier of the item Width float64 `bson:"width" json:"width" validate:"required"` // Width is the graphical width of the item Height float64 `bson:"height" json:"height" validate:"required"` // Height is the graphical height of the item Position Position `bson:"position" json:"position" validate:"required"` // Position is the graphical position of the item *resources.ItemResource // ItemResource is the resource of the item affected to the item }
GraphItem is a struct that represents an item in a graph
func (*GraphItem) GetResource ¶
func (g *GraphItem) GetResource() (tools.DataType, resources.ResourceInterface)
type GraphLink ¶
type GraphLink struct { Source Position `bson:"source" json:"source" validate:"required"` // Source is the source graphical position of the link Destination Position `bson:"destination" json:"destination" validate:"required"` // Destination is the destination graphical position of the link Style *GraphLinkStyle `bson:"style,omitempty" json:"style,omitempty"` // Style is the graphical style of the link StorageLinkInfos []StorageProcessingGraphLink `bson:"storage_link_infos,omitempty" json:"storage_link_infos,omitempty"` // StorageLinkInfo is the storage link info Env []models.Param `json:"env" bson:"env"` }
GraphLink is a struct that represents a link between two items in a graph
type GraphLinkStyle ¶
type GraphLinkStyle struct { Color int64 `bson:"color" json:"color"` // Color is the graphical color of the link (int description of a color, can be transpose as hex) Stroke float64 `bson:"stroke" json:"stroke"` // Stroke is the graphical stroke of the link Tension float64 `bson:"tension" json:"tension"` // Tension is the graphical tension of the link HeadRadius float64 `bson:"head_radius" json:"head_radius"` // graphical pin radius DashWidth float64 `bson:"dash_width" json:"dash_width"` // DashWidth is the graphical dash width of the link DashSpace float64 `bson:"dash_space" json:"dash_space"` // DashSpace is the graphical dash space of the link EndArrow Position `bson:"end_arrow" json:"end_arrow"` // EndArrow is the graphical end arrow of the link StartArrow Position `bson:"start_arrow" json:"start_arrow"` // StartArrow is the graphical start arrow of the link ArrowStyle int64 `bson:"arrow_style" json:"arrow_style"` // ArrowStyle is the graphical arrow style of the link (enum foundable in UI) ArrowDirection int64 `bson:"arrow_direction" json:"arrow_direction"` // ArrowDirection is the graphical arrow direction of the link (enum foundable in UI) StartArrowWidth float64 `bson:"start_arrow_width" json:"start_arrow_width"` // StartArrowWidth is the graphical start arrow width of the link EndArrowWidth float64 `bson:"end_arrow_width" json:"end_arrow_width"` // EndArrowWidth is the graphical end arrow width of the link }
GraphLinkStyle is a struct that represents the style of a link in a graph
type Position ¶
type Position struct { ID string `json:"id" bson:"id"` // ID reprents ItemID (optionnal) X float64 `json:"x" bson:"x" validate:"required"` // X is the graphical x position Y float64 `json:"y" bson:"y" validate:"required"` // Y is the graphical y position }
Position is a struct that represents a graphical position
Click to show internal directories.
Click to hide internal directories.