7
7
8
8
type (
9
9
GitopsAPI interface {
10
- CreateEnvironment (name string , project string , application string , integration string ) error
10
+ CreateEnvironment (name string , project string , application string , integration string , namespace string ) error
11
11
SendEnvironment (environment Environment ) (map [string ]interface {}, error )
12
12
DeleteEnvironment (name string ) error
13
13
GetEnvironments () ([]CFEnvironment , error )
47
47
Context string `json:"context"`
48
48
Project string `json:"project"`
49
49
Application string `json:"application"`
50
+ Namespace string `json:"namespace,omitempty"`
50
51
}
51
52
52
53
EnvironmentPayload struct {
@@ -132,7 +133,7 @@ func newGitopsAPI(codefresh *codefresh) GitopsAPI {
132
133
return & gitops {codefresh }
133
134
}
134
135
135
- func (a * gitops ) CreateEnvironment (name string , project string , application string , integration string ) error {
136
+ func (a * gitops ) CreateEnvironment (name string , project string , application string , integration string , namespace string ) error {
136
137
_ , err := a .codefresh .requestAPI (& requestOptions {
137
138
method : "POST" ,
138
139
path : "/api/gitops/application" ,
@@ -146,6 +147,7 @@ func (a *gitops) CreateEnvironment(name string, project string, application stri
146
147
Context : integration ,
147
148
Project : project ,
148
149
Application : application ,
150
+ Namespace : namespace ,
149
151
},
150
152
},
151
153
})
0 commit comments