Documentation ¶
Index ¶
- Constants
- func ApiRegexp() *regexp.Regexp
- func ApisRegexp() *regexp.Regexp
- func ArtifactRegexp() *regexp.Regexp
- func ArtifactsRegexp() *regexp.Regexp
- func GenerateID() string
- func ProjectRegexp() *regexp.Regexp
- func ProjectsRegexp() *regexp.Regexp
- func SpecRegexp() *regexp.Regexp
- func SpecsRegexp() *regexp.Regexp
- func VersionRegexp() *regexp.Regexp
- func VersionsRegexp() *regexp.Regexp
- type Api
- type Artifact
- 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 ¶
func ApisRegexp ¶
ApisRegexp returns a regular expression that matches collection of apis.
func ArtifactRegexp ¶
ArtifactRegexp returns a regular expression that matches an artifact resource name.
func ArtifactsRegexp ¶
ArtifactsRegexp returns a regular expression that matches collection of artifacts.
func ProjectRegexp ¶
ProjectRegexp returns a regular expression that matches a project resource name.
func ProjectsRegexp ¶
ProjectsRegexp returns a regular expression that matches collection of projects.
func SpecRegexp ¶
SpecRegexp returns a regular expression that matches a spec resource name with an optional revision identifier.
func SpecsRegexp ¶
SpecsRegexp returns a regular expression that matches a collection of specs.
func VersionRegexp ¶
VersionRegexp returns a regular expression that matches a version resource name.
func VersionsRegexp ¶
VersionsRegexp returns a regular expression that matches a collection of versions.
Types ¶
type Api ¶
Api represents a resource name for an API.
func (Api) Artifact ¶
Artifact returns an artifact 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 (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) 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 Project ¶
type Project struct {
ProjectID string
}
Project represents a resource name for a project.
func ParseProject ¶
ParseProject parses the name of a project.
func ParseProjectWithLocation ¶
ParseProjectWithLocation parses the name of a project.
type Spec ¶
Spec represents a resource name for an API spec.
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 (Version) Artifact ¶
Artifact returns an artifact with the provided ID and this resource as its parent.