forked from cloudfoundry/bosh-bootloader
-
Notifications
You must be signed in to change notification settings - Fork 2
/
template_builder.go
32 lines (28 loc) · 933 Bytes
/
template_builder.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
package fakes
import "github.com/cloudfoundry/bosh-bootloader/aws/cloudformation/templates"
type TemplateBuilder struct {
BuildCall struct {
Receives struct {
KeyPairName string
AZs []string
LBType string
LBCertificateARN string
IAMUserName string
EnvID string
BOSHAZ string
}
Returns struct {
Template templates.Template
}
}
}
func (b *TemplateBuilder) Build(keyPairName string, azs []string, lbType string, lbCertificateARN string, iamUserName string, envID string, boshAZ string) templates.Template {
b.BuildCall.Receives.KeyPairName = keyPairName
b.BuildCall.Receives.AZs = azs
b.BuildCall.Receives.LBType = lbType
b.BuildCall.Receives.LBCertificateARN = lbCertificateARN
b.BuildCall.Receives.IAMUserName = iamUserName
b.BuildCall.Receives.EnvID = envID
b.BuildCall.Receives.BOSHAZ = boshAZ
return b.BuildCall.Returns.Template
}