forked from Azure/azure-service-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve docs on Supported Resources (Azure#2339)
- Loading branch information
1 parent
a6ea2a7
commit a32af6d
Showing
11 changed files
with
405 additions
and
318 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
v2/tools/generator/internal/config/supported_resources_report.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* | ||
* Copyright (c) Microsoft Corporation. | ||
* Licensed under the MIT license. | ||
*/ | ||
|
||
package config | ||
|
||
import ( | ||
"path/filepath" | ||
) | ||
|
||
// SupportedResourcesReport is configuration for the report that lists all the supported resources. | ||
type SupportedResourcesReport struct { | ||
cfg *Configuration // Back reference to global configuration | ||
|
||
OutputPath string `yaml:"outputPath,omitempty"` // Destination filepath for the report, relative to DestinationGoModuleFile | ||
Introduction string `yaml:"introduction,omitempty"` // Introduction to the report | ||
} | ||
|
||
// NewSupportedResourcesReport creates a new SupportedResourcesReport. | ||
func NewSupportedResourcesReport(cfg *Configuration) *SupportedResourcesReport { | ||
return &SupportedResourcesReport{ | ||
cfg: cfg, | ||
} | ||
} | ||
|
||
// FullOutputPath returns the fully qualified path to the output file. | ||
func (srr *SupportedResourcesReport) FullOutputPath() string { | ||
return filepath.Join( | ||
filepath.Dir(srr.cfg.DestinationGoModuleFile), | ||
srr.OutputPath) | ||
} |