Documentation
¶
Overview ¶
package encoding provides structs that can be used to serialize YAML files for import with `registry apply`.
Index ¶
- Constants
- func EncodeYAML(model interface{}) ([]byte, error)
- func NodeForMessage(m proto.Message) (*yaml.Node, error)
- func StyleForJSON(node *yaml.Node)
- func StyleForYAML(node *yaml.Node)
- type Api
- type ApiData
- type ApiDeployment
- type ApiDeploymentData
- type ApiSpec
- type ApiSpecData
- type ApiVersion
- type ApiVersionData
- type Artifact
- type Header
- type List
- type Metadata
- type Project
- type ProjectData
Constants ¶
View Source
const RegistryV1 = "apigeeregistry/v1"
Variables ¶
This section is empty.
Functions ¶
func NodeForMessage ¶
NodeForMessage converts a proto message for export as a YAML node.
func StyleForJSON ¶
StyleForJSON sets the style field on a tree of yaml.Nodes for JSON export.
func StyleForYAML ¶
StyleForYAML sets the style field on a tree of yaml.Nodes for YAML export.
Types ¶
type ApiData ¶
type ApiData struct {
DisplayName string `yaml:"displayName,omitempty"`
Description string `yaml:"description,omitempty"`
Availability string `yaml:"availability,omitempty"`
RecommendedVersion string `yaml:"recommendedVersion,omitempty"`
RecommendedDeployment string `yaml:"recommendedDeployment,omitempty"`
ApiVersions []*ApiVersion `yaml:"versions,omitempty"`
ApiDeployments []*ApiDeployment `yaml:"deployments,omitempty"`
Artifacts []*Artifact `yaml:"artifacts,omitempty"`
}
type ApiDeployment ¶
type ApiDeployment struct {
Header `yaml:",inline"`
Data ApiDeploymentData `yaml:"data"`
}
type ApiDeploymentData ¶
type ApiDeploymentData struct {
DisplayName string `yaml:"displayName,omitempty"`
Description string `yaml:"description,omitempty"`
ApiSpecRevision string `yaml:"apiSpecRevision,omitempty"`
EndpointURI string `yaml:"endpointURI,omitempty"`
ExternalChannelURI string `yaml:"externalChannelURI,omitempty"`
IntendedAudience string `yaml:"intendedAudience,omitempty"`
AccessGuidance string `yaml:"accessGuidance,omitempty"`
Artifacts []*Artifact `yaml:"artifacts,omitempty"`
}
type ApiSpec ¶
type ApiSpec struct {
Header `yaml:",inline"`
Data ApiSpecData `yaml:"data"`
}
type ApiSpecData ¶
type ApiVersion ¶
type ApiVersion struct {
Header `yaml:",inline"`
Data ApiVersionData `yaml:"data"`
}
type ApiVersionData ¶
type ApiVersionData struct {
DisplayName string `yaml:"displayName,omitempty"`
Description string `yaml:"description,omitempty"`
State string `yaml:"state,omitempty"`
PrimarySpec string `yaml:"primarySpec,omitempty"`
ApiSpecs []*ApiSpec `yaml:"specs,omitempty"`
Artifacts []*Artifact `yaml:"artifacts,omitempty"`
}
type Project ¶
type Project struct {
Header `yaml:",inline"`
Data ProjectData `yaml:"data"`
}
type ProjectData ¶
Click to show internal directories.
Click to hide internal directories.