forked from blushft/go-diagrams
-
Notifications
You must be signed in to change notification settings - Fork 1
/
cost.go
38 lines (30 loc) · 1.45 KB
/
cost.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
34
35
36
37
38
package aws
import "github.com/consensusnetworks/go-diagrams/diagram"
type costContainer struct {
path string
opts []diagram.NodeOption
}
var Cost = &costContainer{
opts: diagram.OptionSet{diagram.Provider("aws"), diagram.NodeShape("none")},
path: "assets/aws/cost",
}
func (c *costContainer) CostAndUsageReport(opts ...diagram.NodeOption) *diagram.Node {
nopts := diagram.MergeOptionSets(diagram.OptionSet{diagram.Icon("assets/aws/cost/cost-and-usage-report.png")}, c.opts, opts)
return diagram.NewNode(nopts...)
}
func (c *costContainer) CostExplorer(opts ...diagram.NodeOption) *diagram.Node {
nopts := diagram.MergeOptionSets(diagram.OptionSet{diagram.Icon("assets/aws/cost/cost-explorer.png")}, c.opts, opts)
return diagram.NewNode(nopts...)
}
func (c *costContainer) ReservedInstanceReporting(opts ...diagram.NodeOption) *diagram.Node {
nopts := diagram.MergeOptionSets(diagram.OptionSet{diagram.Icon("assets/aws/cost/reserved-instance-reporting.png")}, c.opts, opts)
return diagram.NewNode(nopts...)
}
func (c *costContainer) SavingsPlans(opts ...diagram.NodeOption) *diagram.Node {
nopts := diagram.MergeOptionSets(diagram.OptionSet{diagram.Icon("assets/aws/cost/savings-plans.png")}, c.opts, opts)
return diagram.NewNode(nopts...)
}
func (c *costContainer) Budgets(opts ...diagram.NodeOption) *diagram.Node {
nopts := diagram.MergeOptionSets(diagram.OptionSet{diagram.Icon("assets/aws/cost/budgets.png")}, c.opts, opts)
return diagram.NewNode(nopts...)
}