Skip to content

Commit 7cc6ffa

Browse files
type update
1 parent 57a2687 commit 7cc6ffa

File tree

2 files changed

+176
-57
lines changed

2 files changed

+176
-57
lines changed

pkg/codefresh/argo_runtime.go

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99

1010
type (
1111
IRuntimeAPI interface {
12-
Create(ctx context.Context, opts *model.InstallationArgs) (*model.RuntimeCreationResponse, error)
12+
Create(ctx context.Context, opts *model.RuntimeInstallationArgs) (*model.RuntimeCreationResponse, error)
1313
Get(ctx context.Context, name string) (*model.Runtime, error)
1414
List(ctx context.Context) ([]model.Runtime, error)
1515
Delete(ctx context.Context, runtimeName string) (int, error)
@@ -46,13 +46,22 @@ type (
4646
}
4747
Errors []graphqlError
4848
}
49+
50+
51+
RuntimeCreateOnPlatformOptions struct {
52+
runtimeName string
53+
server string
54+
runtimeVersion string
55+
ingressHost string
56+
componentNames []*string
57+
}
4958
)
5059

5160
func newArgoRuntimeAPI(codefresh *codefresh) IRuntimeAPI {
5261
return &argoRuntime{codefresh: codefresh}
5362
}
5463

55-
func (r *argoRuntime) Create(ctx context.Context, opts *model.InstallationArgs) (*model.RuntimeCreationResponse, error) {
64+
func (r *argoRuntime) Create(ctx context.Context, opts *model.RuntimeInstallationArgs) (*model.RuntimeCreationResponse, error) {
5665
jsonData := map[string]interface{}{
5766
"query": `
5867
mutation CreateRuntime($installationArgs: InstallationArgs!) {
@@ -62,14 +71,8 @@ func (r *argoRuntime) Create(ctx context.Context, opts *model.InstallationArgs)
6271
}
6372
}
6473
`,
65-
"variables": map[string]map[string]interface{}{
66-
"installationArgs": {
67-
"runtimeName": opts.RuntimeName,
68-
"cluster": opts.Cluster,
69-
"runtimeVersion": opts.RuntimeVersion,
70-
"componentNames": opts.ComponentNames,
71-
"ingressHost": opts.IngressHost,
72-
},
74+
"variables": map[string]interface{}{
75+
"installationArgs": opts,
7376
},
7477
}
7578

pkg/codefresh/model/models_gen.go

Lines changed: 163 additions & 47 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)