1111 IRuntimeAPI interface {
1212 Get (ctx context.Context , name string ) (* model.Runtime , error )
1313 List (ctx context.Context ) ([]model.Runtime , error )
14- Create (ctx context.Context , runtimeName string ) (* model.RuntimeCreationResponse , error )
14+ Create (ctx context.Context , runtimeName , cluster , runtimeVersion , ingressHost string , componentNames [] string ) (* model.RuntimeCreationResponse , error )
1515 Delete (ctx context.Context , runtimeName string ) (int , error )
1616 }
1717
@@ -74,6 +74,7 @@ func (r *argoRuntime) Get(ctx context.Context, name string) (*model.Runtime, err
7474 cluster
7575 ingressHost
7676 runtimeVersion
77+ installationStatus
7778 }
7879 }
7980 ` ,
@@ -120,6 +121,7 @@ func (r *argoRuntime) List(ctx context.Context) ([]model.Runtime, error) {
120121 cluster
121122 ingressHost
122123 runtimeVersion
124+ installationStatus
123125 }
124126 }
125127 }
@@ -144,20 +146,24 @@ func (r *argoRuntime) List(ctx context.Context) ([]model.Runtime, error) {
144146 return runtimes , nil
145147}
146148
147- func (r * argoRuntime ) Create (ctx context.Context , runtimeName string ) (* model.RuntimeCreationResponse , error ) {
149+ func (r * argoRuntime ) Create (ctx context.Context , runtimeName , cluster , runtimeVersion , ingressHost string , componentNames [] string ) (* model.RuntimeCreationResponse , error ) {
148150 jsonData := map [string ]interface {}{
149151 "query" : `
150152 mutation CreateRuntime(
151- $name : String!
153+ $runtimeName : String!, $cluster: String!, $runtimeVersion: String!, $ingressHost: String, $componentNames: [String] !
152154 ) {
153- runtime(name : $name ) {
155+ runtime(runtimeName : $runtimeName, cluster: $cluster, runtimeVersion: $runtimeVersion, ingressHost: $ingressHost, componentNames: $componentNames ) {
154156 name
155157 newAccessToken
156158 }
157159 }
158160 ` ,
159161 "variables" : map [string ]interface {}{
160- "name" : runtimeName ,
162+ "runtimeName" : runtimeName ,
163+ "cluster" : cluster ,
164+ "runtimeVersion" : runtimeVersion ,
165+ "ingressHost" : ingressHost ,
166+ "componentNames" : componentNames ,
161167 },
162168 }
163169
0 commit comments