Skip to content

Commit

Permalink
Merge pull request #339 from MUzairS15/meshmodel
Browse files Browse the repository at this point in the history
Update struct with `yaml` tags.
  • Loading branch information
MUzairS15 committed Aug 5, 2023
2 parents 1e1bfdd + 670a367 commit b4ce50f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
3 changes: 2 additions & 1 deletion schemas/configuration.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package schemas

import "embed"

//go:embed configuration
var Schemas embed.FS
var Schemas embed.FS
4 changes: 2 additions & 2 deletions schemas/schemaProvider.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ func getSchemaMap() map[string]string {
"application": "configuration/applicationImport.json",
"filter": "configuration/filterImport.json",
"design": "configuration/designImport.json",
"publish": "publish/publishModal.json",
"publish": "publish/publishModal.json",
}
}

Expand All @@ -18,7 +18,7 @@ func getUiSchemaMap() map[string]string {
"application": "configuration/uiSchemaApplication.json",
"design": "configuration/uiSchemaDesignImport.json",
"filter": "configuration/uiSchemaFilter.json",
"publish": "publish/uiSchemaPublishSchema.json",
"publish": "publish/uiSchemaPublishSchema.json",
}
}

Expand Down
18 changes: 9 additions & 9 deletions utils/artifacthub/package.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ const AhHelmExporterEndpoint = ArtifactHubAPIEndpint + "/helm-exporter"
// internal representation of artifacthub package
// it contains information we need to identify a package using ArtifactHub API
type AhPackage struct {
Name string
Repository string
Organization string
RepoUrl string
ChartUrl string
Official bool
VerifiedPublisher bool
CNCF bool
Version string
Name string `yaml:"name"`
Repository string `yaml:"repository"`
Organization string `yaml:"organization"`
RepoUrl string `yaml:"repo_url"`
ChartUrl string `yaml:"chart_url"`
Official bool `yaml:"official"`
VerifiedPublisher bool `yaml:"verified_publisher"`
CNCF bool `yaml:"cncf"`
Version string `yaml:"version"`
}

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

0 comments on commit b4ce50f

Please sign in to comment.