initial commit

This commit is contained in:
ycc 2024-07-04 16:08:59 +02:00
commit f07f378aa1
13 changed files with 121 additions and 0 deletions

2
README.md Normal file
View File

@ -0,0 +1,2 @@
# oc-lib

1
calendar.go Normal file
View File

@ -0,0 +1 @@
package oclib

1
data.go Normal file
View File

@ -0,0 +1 @@
package oclib

1
datacenter.go Normal file
View File

@ -0,0 +1 @@
package oclib

1
datacenter_workflows.go Normal file
View File

@ -0,0 +1 @@
package oclib

106
doc/model.puml Normal file
View File

@ -0,0 +1,106 @@
@startuml oclib
abstract Ressource {
+id: int
}
class Data {
+id: int
+name: string
}
class Processing {
+id: int
+name: string
+container: string
+command: int
+environment: int
}
class Storage {
+id: int
+name: string
+url: string
+capacity: int
}
class Datacenter {
+id: int
+name: string
}
class Workflow {
+id: int
+name: string
}
class ResourceSet {
+id: int
+name: string
+ressources: Ressource[]
}
class WorkflowSchedule {
+id: int
+start: date
+end: date
+cron : string
}
class Graph {
+id: int
Ressource[] ressources
Link[] links
}
class Link {
+id: int
+source: Ressource
+target: Ressource
}
class Calendar {
+id: int
+name: string
+workflows: Workflow[]
+owner: string
}
class UserWorkflows {
+id: int
+user: string
+workflows: Workflow[]
}
class DatacenterWorkflows {
+id: int
+datacenter: Datacenter
+workflows: Workflow[]
}
UserWorkflows "1" o-- "0..*" Workflow
DatacenterWorkflows "1" o-- "0..*" Workflow
Ressource <|-- Data
Ressource <|-- Processing
Ressource <|-- Storage
Ressource <|-- Datacenter
Ressource <|-- Workflow
ResourceSet "1" o-- "0..*" Ressource
Workflow "1" o-- "0..*" ResourceSet
Workflow "1" o-- "0..*" WorkflowSchedule
Workflow "1" o-- "0..*" Graph
Graph "1" o-- "0..*" Ressource
Graph "1" o-- "0..*" Link
Calendar "1" o-- "0..*" Workflow
@enduml

3
go.mod Normal file
View File

@ -0,0 +1,3 @@
module oc-lib
go 1.22.0

1
graph.go Normal file
View File

@ -0,0 +1 @@
package oclib

1
resource.go Normal file
View File

@ -0,0 +1 @@
package oclib

1
resource_set.go Normal file
View File

@ -0,0 +1 @@
package oclib

1
storage.go Normal file
View File

@ -0,0 +1 @@
package oclib

1
user_workflows.go Normal file
View File

@ -0,0 +1 @@
package oclib

1
workflow_schedule.go Normal file
View File

@ -0,0 +1 @@
package oclib