github.com/dahs81/otto@v0.2.1-0.20160126165905-6400716cf085/builtin/foundation/consul/foundation.go (about) 1 package consul 2 3 import ( 4 "github.com/hashicorp/otto/foundation" 5 "github.com/hashicorp/otto/helper/bindata" 6 "github.com/hashicorp/otto/helper/compile" 7 "github.com/hashicorp/otto/helper/terraform" 8 ) 9 10 //go:generate go-bindata -pkg=consul -nomemcopy -nometadata ./data/... 11 12 // Foundation is an implementation of foundation.Foundation 13 type Foundation struct{} 14 15 func (f *Foundation) Compile(ctx *foundation.Context) (*foundation.CompileResult, error) { 16 var opts compile.FoundationOptions 17 opts = compile.FoundationOptions{ 18 Ctx: ctx, 19 Bindata: &bindata.Data{ 20 Asset: Asset, 21 AssetDir: AssetDir, 22 }, 23 } 24 25 return compile.Foundation(&opts) 26 } 27 28 func (f *Foundation) Infra(ctx *foundation.Context) error { 29 return (&terraform.Foundation{}).Infra(ctx) 30 }