Documentation ¶
Index ¶
- 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 ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApisRegexp ¶
ApisRegexp returns a regular expression that matches collection of apis.
func ArtifactRegexp ¶ added in v0.2.0
ArtifactRegexp returns a regular expression that matches an artifact resource name.
func ArtifactsRegexp ¶ added in v0.2.0
ArtifactsRegexp returns a regular expression that matches collection of artifacts.
func GenerateID ¶ added in v0.2.0
func GenerateID() string
GenerateID generates a random resource ID.
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 ¶ added in v0.2.1
Api represents a resource name for an API.
func (Api) Artifact ¶ added in v0.2.1
Artifact returns an artifact with the provided ID and this resource as its parent.
type Artifact ¶ added in v0.2.1
type Artifact struct {
// contains filtered or unexported fields
}
Artifact represents a resource name for an artifact.
func ParseArtifact ¶ added in v0.2.1
ParseArtifact parses the name of an artifact.
func (Artifact) ApiID ¶ added in v0.2.1
ApiID returns the artifact's API ID, or empty string if it doesn't have one.
func (Artifact) ArtifactID ¶ added in v0.2.1
ArtifactID returns the artifact's ID.
func (Artifact) ProjectID ¶ added in v0.2.1
ProjectID returns the artifact's project ID, or empty string if it doesn't have one.
func (Artifact) SpecID ¶ added in v0.2.1
SpecID returns the artifact's spec ID, or empty string if it doesn't have one.
type Project ¶ added in v0.2.1
type Project struct {
ProjectID string
}
Project represents a resource name for a project.
func ParseProject ¶ added in v0.2.0
ParseProject parses the name of a project.
func (Project) Api ¶ added in v0.2.1
Api returns an API with the provided ID and this resource as its parent.
type Spec ¶ added in v0.2.1
Spec represents a resource name for an API spec.
func (Spec) Artifact ¶ added in v0.2.1
Artifact returns an artifact with the provided ID and this resource as its parent.
func (Spec) Revision ¶ added in v0.2.1
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 ¶ added in v0.2.1
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 ¶ added in v0.2.1
func ParseSpecRevision(name string) (SpecRevision, error)
ParseSpecRevision parses the name of a spec.
func (SpecRevision) Spec ¶ added in v0.2.1
func (s SpecRevision) Spec() Spec
Spec returns the parent spec for this resource.
func (SpecRevision) String ¶ added in v0.2.1
func (s SpecRevision) String() string
type Version ¶ added in v0.2.1
Version represents a resource name for an API version.
func ParseVersion ¶ added in v0.2.0
ParseVersion parses the name of a version.
func (Version) Artifact ¶ added in v0.2.1
Artifact returns an artifact with the provided ID and this resource as its parent.