forked from crewjam/go-cloudformation
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathfunc_base64.go
24 lines (20 loc) · 850 Bytes
/
func_base64.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
package cloudformation
// Base64 represents the Fn::Base64 function called over value.
func Base64(value Stringable) *StringExpr {
return Base64Func{Value: *value.String()}.String()
}
// Base64Func represents an invocation of Fn::Base64.
//
// The intrinsic function Fn::Base64 returns the Base64 representation of the
// input string. This function is typically used to pass encoded data to
// Amazon EC2 instances by way of the UserData property.
//
// See http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-base64.html
type Base64Func struct {
Value StringExpr `json:"Fn::Base64"`
}
func (f Base64Func) String() *StringExpr {
return &StringExpr{Func: f}
}
var _ Stringable = Base64Func{} // Base64Func must implement Stringable
var _ StringFunc = Base64Func{} // Base64Func must implement StringFunc