Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Generator ¶
type Generator struct {
// contains filtered or unexported fields
}
func NewGenerator ¶
func (*Generator) Generate ¶
func (s *Generator) Generate(input ServiceGeneratorInput) error
func (*Generator) GenerateCommonTypes ¶
func (s *Generator) GenerateCommonTypes(input VersionGeneratorInput) error
func (*Generator) GenerateForVersion ¶
func (s *Generator) GenerateForVersion(input VersionGeneratorInput) error
type GeneratorData ¶
type GeneratorData struct {
// contains filtered or unexported fields
}
type ServiceGeneratorInput ¶
type ServiceGeneratorInput struct { CommonTypes models.CommonTypes OutputDirectory string ResourceDetails models.APIResource ResourceName string ServiceDetails models.Service ServiceName string Source models.SourceDataOrigin Type models.SourceDataType VersionDetails models.APIVersion VersionName string }
type Settings ¶
type Settings struct { // Whether model structs should have an `OmitDiscriminatedValue` field, to allow the caller to omit the // discriminated type value when marhalling. Used in Microsoft Graph for buggy APIs that don't parse this. AllowOmittingDiscriminatedValue bool // CanonicalApiVersions is a map of API version names to use in the SDK, where the key is the SDK-friendly // name, and the value is the upstream API version. Used in Microsoft Graph to translate `v1.0` to `stable`. CanonicalApiVersions map[string]string // CommonTypesPackageName is the name of the Go package that should be output with common models, constants // and resource IDs. Each API version will get a package below this containing the respective types. Used // in Microsoft Graph. Could be used in Resource Manager or other SDKs. CommonTypesPackageName string // DeleteExistingResourcesForVersion toggles whether any existing resources within a given API version should // be removed prior to generating. This is not compatible when more than one SourceDataType is being used to // generate an SDK. Used in Microsoft Graph because breaking removals are allowed. DeleteExistingResourcesForVersion bool // GenerateDescriptionsForModels enables nicely-formatted Go comments for model fields to be generated. GenerateDescriptionsForModels bool // RecurseParentModels is a behavioral toggle for discriminated types. When true, the full ancestry for child // models will be output in the SDK. When false, only the youngest ancestor containing the necessary type // information will be output. Used in Microsoft Graph to properly express model inheritance. RecurseParentModels bool // VersionsToGenerateCommonTypes is a map of API versions to SourceDataOrigin, to specify the API versions // for which common types should be generated. This is necessary because common types are enumerated separately // from service definitions. Used in Microsoft Graph. VersionsToGenerateCommonTypes map[string]models.SourceDataOrigin // contains filtered or unexported fields }
func (*Settings) CanonicalApiVersion ¶
func (*Settings) ShouldUseNewBaseLayer ¶
func (*Settings) UseOldBaseLayerFor ¶
type VersionGeneratorData ¶
type VersionGeneratorData struct { GeneratorData // contains filtered or unexported fields }
type VersionGeneratorInput ¶
type VersionGeneratorInput struct { CommonTypes models.CommonTypes OutputDirectory string Resources map[string]models.APIResource ServiceName string Source models.SourceDataOrigin Type models.SourceDataType UseNewBaseLayer bool VersionName string }
Source Files
¶
- data.go
- helpers.go
- service.go
- settings.go
- stage_clients.go
- stage_common_types.go
- stage_constants.go
- stage_ids.go
- stage_meta_client.go
- stage_methods.go
- stage_models.go
- stage_predicates.go
- stage_readme.go
- stage_version.go
- templater.go
- templater_clients.go
- templater_clients_autorest.go
- templater_constant.go
- templater_constants.go
- templater_id_parser.go
- templater_id_parser_tests.go
- templater_meta_client.go
- templater_meta_client_autorest.go
- templater_methods.go
- templater_methods_autorest.go
- templater_models.go
- templater_predicates.go
- templater_readme.go
- templater_version.go
Click to show internal directories.
Click to hide internal directories.