Documentation ¶
Index ¶
- Constants
- func GenerateID() string
- type Api
- type Artifact
- func (a Artifact) ApiID() string
- func (a Artifact) ArtifactID() string
- func (a Artifact) DeploymentID() string
- func (a Artifact) Parent() string
- func (a Artifact) ProjectID() string
- func (a Artifact) SpecID() string
- func (a Artifact) String() string
- func (a Artifact) Validate() error
- func (a Artifact) VersionID() string
- type Deployment
- func (d Deployment) Api() Api
- func (d Deployment) Artifact(id string) Artifact
- func (d Deployment) Normal() Deployment
- func (d Deployment) Parent() string
- func (d Deployment) Project() Project
- func (d Deployment) Revision(id string) DeploymentRevision
- func (d Deployment) String() string
- func (d Deployment) Validate() error
- type DeploymentRevision
- type Name
- type Project
- type Spec
- type SpecRevision
- type Version
Constants ¶
const Location = "global"
Location is included in resource names immediately following the project_id.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Api ¶
Api represents a resource name for an API.
func ParseApiCollection ¶ added in v0.3.6
ParseApiCollection parses the name of an api collection.
func (Api) Artifact ¶
Artifact returns an artifact with the provided ID and this resource as its parent.
func (Api) Deployment ¶ added in v0.3.9
func (a Api) Deployment(id string) Deployment
Deployment returns an API deployment with the provided ID and this resource as its parent.
type Artifact ¶
type Artifact struct {
// contains filtered or unexported fields
}
Artifact represents a resource name for an artifact.
func ParseArtifact ¶
ParseArtifact parses the name of an artifact.
func ParseArtifactCollection ¶ added in v0.3.6
ParseArtifactCollection parses the name of an artifact collection.
func (Artifact) ApiID ¶
ApiID returns the artifact's API ID, or empty string if it doesn't have one.
func (Artifact) ArtifactID ¶
ArtifactID returns the artifact's ID.
func (Artifact) DeploymentID ¶ added in v0.3.9
DeploymentID returns the artifact's deployment ID, or empty string if it doesn't have one.
func (Artifact) ProjectID ¶
ProjectID returns the artifact's project ID, or empty string if it doesn't have one.
func (Artifact) SpecID ¶
SpecID returns the artifact's spec ID, or empty string if it doesn't have one.
type Deployment ¶ added in v0.3.9
Deployment represents a resource name for an API deployment.
func ParseDeployment ¶ added in v0.3.9
func ParseDeployment(name string) (Deployment, error)
ParseDeployment parses the name of a deployment.
func ParseDeploymentCollection ¶ added in v0.3.9
func ParseDeploymentCollection(name string) (Deployment, error)
func (Deployment) Api ¶ added in v0.3.9
func (d Deployment) Api() Api
Api returns the parent API for this resource.
func (Deployment) Artifact ¶ added in v0.3.9
func (d Deployment) Artifact(id string) Artifact
Artifact returns an artifact with the provided ID and this resource as its parent.
func (Deployment) Normal ¶ added in v0.3.9
func (d Deployment) Normal() Deployment
Normal returns the resource name with normalized identifiers.
func (Deployment) Parent ¶ added in v0.3.9
func (d Deployment) Parent() string
Parent returns this resource's parent API resource name.
func (Deployment) Project ¶ added in v0.3.9
func (d Deployment) Project() Project
Project returns the parent project for this resource.
func (Deployment) Revision ¶ added in v0.3.9
func (d Deployment) Revision(id string) DeploymentRevision
Revision returns an API deployment revision with the provided ID and this resource as its parent.
func (Deployment) String ¶ added in v0.3.9
func (d Deployment) String() string
func (Deployment) Validate ¶ added in v0.3.9
func (d Deployment) Validate() error
Validate returns an error if the resource name is invalid. For backward compatibility, names should only be validated at creation time.
type DeploymentRevision ¶ added in v0.3.9
type DeploymentRevision struct { ProjectID string ApiID string DeploymentID string RevisionID string }
DeploymentRevision represents a resource name for an API deployment revision.
func ParseDeploymentRevision ¶ added in v0.3.9
func ParseDeploymentRevision(name string) (DeploymentRevision, error)
ParseDeploymentRevision parses the name of a deployment.
func (DeploymentRevision) Deployment ¶ added in v0.3.9
func (s DeploymentRevision) Deployment() Deployment
Deployment returns the parent deployment for this resource.
func (DeploymentRevision) String ¶ added in v0.3.9
func (s DeploymentRevision) String() string
type Name ¶ added in v0.3.6
type Name interface {
String() string // all names have a string representation.
}
Name is an interface that represents resource names.
type Project ¶
type Project struct {
ProjectID string
}
Project represents a resource name for a project.
func ParseProject ¶
ParseProject parses the name of a project.
func ParseProjectCollection ¶ added in v0.3.6
ParseProjectCollection parses the name of a project collection.
func ParseProjectWithLocation ¶
ParseProjectWithLocation parses the name of a project.
type Spec ¶
Spec represents a resource name for an API spec.
func ParseSpecCollection ¶ added in v0.3.6
ParseSpecCollection parses the name of a spec collection.
func (Spec) Artifact ¶
Artifact returns an artifact with the provided ID and this resource as its parent.
func (Spec) Revision ¶
func (s Spec) Revision(id string) SpecRevision
Revision returns an API spec revision with the provided ID and this resource as its parent.
type SpecRevision ¶
type SpecRevision struct { ProjectID string ApiID string VersionID string SpecID string RevisionID string }
SpecRevision represents a resource name for an API spec revision.
func ParseSpecRevision ¶
func ParseSpecRevision(name string) (SpecRevision, error)
ParseSpecRevision parses the name of a spec.
func (SpecRevision) Spec ¶
func (s SpecRevision) Spec() Spec
Spec returns the parent spec for this resource.
func (SpecRevision) String ¶
func (s SpecRevision) String() string
type Version ¶
Version represents a resource name for an API version.
func ParseVersion ¶
ParseVersion parses the name of a version.
func ParseVersionCollection ¶ added in v0.3.6
ParseVersionCollection parses the name of a version collection.
func (Version) Artifact ¶
Artifact returns an artifact with the provided ID and this resource as its parent.