Documentation ¶
Index ¶
- Constants
- func GetReferenceEntityType(resourcePattern string) (entity, entityType string, err error)
- func GetReferenceEntityValue(resourcePattern string, referred ResourceName) (string, error)
- type ApiName
- type ApiResource
- type ArtifactName
- type ArtifactResource
- type ProjectName
- type ProjectResource
- type ResourceInstance
- type ResourceName
- type SpecName
- type SpecResource
- type VersionName
- type VersionResource
Constants ¶
View Source
const ResourceKW = "$resource"
View Source
const ResourceUpdateThresholdSeconds = time.Second * 2
Variables ¶
This section is empty.
Functions ¶
func GetReferenceEntityType ¶
func GetReferenceEntityValue ¶
func GetReferenceEntityValue(resourcePattern string, referred ResourceName) (string, error)
Types ¶
type ApiName ¶
func (ApiName) ParentName ¶
func (a ApiName) ParentName() ResourceName
type ApiResource ¶
type ApiResource struct { ApiName ResourceName Timestamp time.Time }
func (ApiResource) ResourceName ¶
func (a ApiResource) ResourceName() ResourceName
func (ApiResource) UpdateTimestamp ¶
func (a ApiResource) UpdateTimestamp() time.Time
type ArtifactName ¶
func (ArtifactName) Api ¶
func (ar ArtifactName) Api() string
func (ArtifactName) Artifact ¶
func (ar ArtifactName) Artifact() string
func (ArtifactName) ParentName ¶
func (ar ArtifactName) ParentName() ResourceName
func (ArtifactName) Project ¶
func (ar ArtifactName) Project() string
func (ArtifactName) Spec ¶
func (ar ArtifactName) Spec() string
func (ArtifactName) String ¶
func (ar ArtifactName) String() string
func (ArtifactName) Version ¶
func (ar ArtifactName) Version() string
type ArtifactResource ¶
type ArtifactResource struct { ArtifactName ResourceName Timestamp time.Time }
func (ArtifactResource) ResourceName ¶
func (ar ArtifactResource) ResourceName() ResourceName
func (ArtifactResource) UpdateTimestamp ¶
func (ar ArtifactResource) UpdateTimestamp() time.Time
type ProjectName ¶
func (ProjectName) Api ¶
func (p ProjectName) Api() string
func (ProjectName) Artifact ¶
func (p ProjectName) Artifact() string
func (ProjectName) ParentName ¶
func (p ProjectName) ParentName() ResourceName
func (ProjectName) Project ¶
func (p ProjectName) Project() string
func (ProjectName) Spec ¶
func (p ProjectName) Spec() string
func (ProjectName) String ¶
func (p ProjectName) String() string
func (ProjectName) Version ¶
func (p ProjectName) Version() string
type ProjectResource ¶
type ProjectResource struct { ProjectName ResourceName Timestamp time.Time }
func (ProjectResource) ResourceName ¶
func (p ProjectResource) ResourceName() ResourceName
func (ProjectResource) UpdateTimestamp ¶
func (p ProjectResource) UpdateTimestamp() time.Time
type ResourceInstance ¶
type ResourceInstance interface { ResourceName() ResourceName UpdateTimestamp() time.Time }
This interface is used to describe generic resource instances ResourceName is embedded, the only additional field is the UpdateTimestamp
func ListResources ¶ added in v0.5.1
func ListResources(ctx context.Context, client connection.RegistryClient, pattern, filter string) ([]ResourceInstance, error)
type ResourceName ¶
type ResourceName interface { Artifact() string Spec() string Version() string Api() string Project() string String() string ParentName() ResourceName }
This interface is used to describe generic resource names Example: projects/demo/locations/global/apis/petstore/versions/1.0.0/specs/openapi.yaml projects/demo/locations/global/apis/-/versions/-/specs/-/artifacts/-
func FullResourceNameFromParent ¶
func FullResourceNameFromParent(resourcePattern string, parent string) (ResourceName, error)
func ParseResourcePattern ¶
func ParseResourcePattern(resourcePattern string) (ResourceName, error)
func SubstituteReferenceEntity ¶
func SubstituteReferenceEntity(resourcePattern string, referred ResourceName) (ResourceName, error)
type SpecName ¶
func (SpecName) ParentName ¶
func (s SpecName) ParentName() ResourceName
type SpecResource ¶
type SpecResource struct { SpecName ResourceName Timestamp time.Time }
func (SpecResource) ResourceName ¶
func (s SpecResource) ResourceName() ResourceName
func (SpecResource) UpdateTimestamp ¶
func (s SpecResource) UpdateTimestamp() time.Time
type VersionName ¶
func (VersionName) Api ¶
func (v VersionName) Api() string
func (VersionName) Artifact ¶
func (v VersionName) Artifact() string
func (VersionName) ParentName ¶
func (v VersionName) ParentName() ResourceName
func (VersionName) Project ¶
func (v VersionName) Project() string
func (VersionName) Spec ¶
func (v VersionName) Spec() string
func (VersionName) String ¶
func (v VersionName) String() string
func (VersionName) Version ¶
func (v VersionName) Version() string
type VersionResource ¶
type VersionResource struct { VersionName ResourceName Timestamp time.Time }
func (VersionResource) ResourceName ¶
func (v VersionResource) ResourceName() ResourceName
func (VersionResource) UpdateTimestamp ¶
func (v VersionResource) UpdateTimestamp() time.Time
Click to show internal directories.
Click to hide internal directories.