77
88type (
99 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
1111 SendEnvironment (environment Environment ) (map [string ]interface {}, error )
1212 DeleteEnvironment (name string ) error
1313 GetEnvironments () ([]CFEnvironment , error )
4747 Context string `json:"context"`
4848 Project string `json:"project"`
4949 Application string `json:"application"`
50+ Namespace string `json:"namespace,omitempty"`
5051 }
5152
5253 EnvironmentPayload struct {
@@ -132,7 +133,7 @@ func newGitopsAPI(codefresh *codefresh) GitopsAPI {
132133 return & gitops {codefresh }
133134}
134135
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 {
136137 _ , err := a .codefresh .requestAPI (& requestOptions {
137138 method : "POST" ,
138139 path : "/api/gitops/application" ,
@@ -146,6 +147,7 @@ func (a *gitops) CreateEnvironment(name string, project string, application stri
146147 Context : integration ,
147148 Project : project ,
148149 Application : application ,
150+ Namespace : namespace ,
149151 },
150152 },
151153 })
0 commit comments