Skip to content

Commit b4ce50f

Browse files
author
Mohd Uzair
authored
Merge pull request #339 from MUzairS15/meshmodel
Update struct with `yaml` tags.
2 parents 1e1bfdd + 670a367 commit b4ce50f

File tree

3 files changed

+13
-12
lines changed

3 files changed

+13
-12
lines changed

schemas/configuration.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package schemas
22

33
import "embed"
4+
45
//go:embed configuration
5-
var Schemas embed.FS
6+
var Schemas embed.FS

schemas/schemaProvider.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ func getSchemaMap() map[string]string {
99
"application": "configuration/applicationImport.json",
1010
"filter": "configuration/filterImport.json",
1111
"design": "configuration/designImport.json",
12-
"publish": "publish/publishModal.json",
12+
"publish": "publish/publishModal.json",
1313
}
1414
}
1515

@@ -18,7 +18,7 @@ func getUiSchemaMap() map[string]string {
1818
"application": "configuration/uiSchemaApplication.json",
1919
"design": "configuration/uiSchemaDesignImport.json",
2020
"filter": "configuration/uiSchemaFilter.json",
21-
"publish": "publish/uiSchemaPublishSchema.json",
21+
"publish": "publish/uiSchemaPublishSchema.json",
2222
}
2323
}
2424

utils/artifacthub/package.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ const AhHelmExporterEndpoint = ArtifactHubAPIEndpint + "/helm-exporter"
2121
// internal representation of artifacthub package
2222
// it contains information we need to identify a package using ArtifactHub API
2323
type AhPackage struct {
24-
Name string
25-
Repository string
26-
Organization string
27-
RepoUrl string
28-
ChartUrl string
29-
Official bool
30-
VerifiedPublisher bool
31-
CNCF bool
32-
Version string
24+
Name string `yaml:"name"`
25+
Repository string `yaml:"repository"`
26+
Organization string `yaml:"organization"`
27+
RepoUrl string `yaml:"repo_url"`
28+
ChartUrl string `yaml:"chart_url"`
29+
Official bool `yaml:"official"`
30+
VerifiedPublisher bool `yaml:"verified_publisher"`
31+
CNCF bool `yaml:"cncf"`
32+
Version string `yaml:"version"`
3333
}
3434

3535
func (pkg AhPackage) GenerateComponents() ([]v1alpha1.ComponentDefinition, error) {

0 commit comments

Comments
 (0)