Create aws context

Signed-off-by: aiordache <anca.iordache@docker.com>
This commit is contained in:
aiordache 2020-07-15 15:09:05 +02:00
parent 3bad2d4004
commit 355295696f
13 changed files with 620 additions and 40 deletions

View file

@ -49,6 +49,13 @@ type AciContext struct {
ResourceGroup string `json:",omitempty"`
}
// AwsContext is the context for the AWS backend
type AwsContext struct {
Profile string `json:",omitempty"`
Cluster string `json:",omitempty"`
Region string `json:",omitempty"`
}
// LocalContext is the context for the local backend
type LocalContext struct{}

View file

@ -336,13 +336,16 @@ func createDirIfNotExist(dir string) error {
// be able to manage other contexts.
func getters() map[string]func() interface{} {
return map[string]func() interface{}{
"aci": func() interface{} {
AciContextType: func() interface{} {
return &AciContext{}
},
"local": func() interface{} {
AwsContextType: func() interface{} {
return &AwsContext{}
},
LocalContextType: func() interface{} {
return &LocalContext{}
},
"example": func() interface{} {
ExampleContextType: func() interface{} {
return &ExampleContext{}
},
}