forked from blushft/go-diagrams
-
Notifications
You must be signed in to change notification settings - Fork 1
/
storage.go
33 lines (26 loc) · 1.15 KB
/
storage.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package k8s
import "github.com/consensusnetworks/go-diagrams/diagram"
type storageContainer struct {
path string
opts []diagram.NodeOption
}
var Storage = &storageContainer{
opts: diagram.OptionSet{diagram.Provider("k8s"), diagram.NodeShape("none")},
path: "assets/k8s/storage",
}
func (c *storageContainer) Vol(opts ...diagram.NodeOption) *diagram.Node {
nopts := diagram.MergeOptionSets(diagram.OptionSet{diagram.Icon("assets/k8s/storage/vol.png")}, c.opts, opts)
return diagram.NewNode(nopts...)
}
func (c *storageContainer) Pv(opts ...diagram.NodeOption) *diagram.Node {
nopts := diagram.MergeOptionSets(diagram.OptionSet{diagram.Icon("assets/k8s/storage/pv.png")}, c.opts, opts)
return diagram.NewNode(nopts...)
}
func (c *storageContainer) Pvc(opts ...diagram.NodeOption) *diagram.Node {
nopts := diagram.MergeOptionSets(diagram.OptionSet{diagram.Icon("assets/k8s/storage/pvc.png")}, c.opts, opts)
return diagram.NewNode(nopts...)
}
func (c *storageContainer) Sc(opts ...diagram.NodeOption) *diagram.Node {
nopts := diagram.MergeOptionSets(diagram.OptionSet{diagram.Icon("assets/k8s/storage/sc.png")}, c.opts, opts)
return diagram.NewNode(nopts...)
}