@@ -8,23 +8,19 @@ import (
88type (
99 IAppProxyClustersAPI interface {
1010 CreateArgoRollouts (ctx context.Context , server string , namespace string ) error
11- Delete (ctx context.Context , server string , runtime string ) error
11+ Delete (ctx context.Context , server string , runtime string ) error
1212 }
1313
1414 appProxyClusters struct {
1515 codefresh * codefresh
1616 }
17-
18- graphqlClusterResponse struct {
19- Errors []graphqlError
20- }
2117)
2218
2319func newAppProxyClustersAPI (c * codefresh ) IAppProxyClustersAPI {
2420 return & appProxyClusters {codefresh : c }
2521}
2622
27- func (c * appProxyClusters )CreateArgoRollouts (ctx context.Context , server string , namespace string ) error {
23+ func (c * appProxyClusters ) CreateArgoRollouts (ctx context.Context , server string , namespace string ) error {
2824 jsonData := map [string ]interface {}{
2925 "query" : `
3026 mutation createArgoRollouts($args: CreateArgoRolloutsInput!) {
@@ -33,13 +29,13 @@ func (c *appProxyClusters)CreateArgoRollouts(ctx context.Context, server string,
3329 ` ,
3430 "variables" : map [string ]interface {}{
3531 "args" : map [string ]interface {}{
36- "destServer" : server ,
32+ "destServer" : server ,
3733 "destNamespace" : namespace ,
3834 },
3935 },
4036 }
4137
42- res := & graphqlClusterResponse {}
38+ res := & graphqlVoidResponse {}
4339 err := c .codefresh .graphqlAPI (ctx , jsonData , res )
4440
4541 if err != nil {
@@ -53,20 +49,20 @@ func (c *appProxyClusters)CreateArgoRollouts(ctx context.Context, server string,
5349 return nil
5450}
5551
56- func (c * appProxyClusters )Delete (ctx context.Context , server string , runtime string ) error {
52+ func (c * appProxyClusters ) Delete (ctx context.Context , server string , runtime string ) error {
5753 jsonData := map [string ]interface {}{
5854 "query" : `
5955 mutation RemoveCluster($server: String!, $runtime: String!) {
6056 removeCluster(server: $server, runtime: $runtime)
6157 }
6258 ` ,
6359 "variables" : map [string ]interface {}{
64- "server" : server ,
60+ "server" : server ,
6561 "runtime" : runtime ,
6662 },
6763 }
6864
69- res := & graphqlClusterResponse {}
65+ res := & graphqlVoidResponse {}
7066 err := c .codefresh .graphqlAPI (ctx , jsonData , res )
7167
7268 if err != nil {
@@ -78,4 +74,4 @@ func (c *appProxyClusters)Delete(ctx context.Context, server string, runtime str
7874 }
7975
8076 return nil
81- }
77+ }
0 commit comments