Documentation ¶
Index ¶
- func AuthGroupURL(groupName string) *api.URL
- func CertificateURL(fingerprint string) *api.URL
- func IdentityProviderGroupURL(identityProviderGroupName string) *api.URL
- func IdentityURL(authenticationMethod string, identifier string) *api.URL
- func ImageAliasURL(projectName string, imageAliasName string) *api.URL
- func ImageURL(projectName string, imageName string) *api.URL
- func InstanceBackupURL(projectName string, instanceName string, backupName string) *api.URL
- func InstanceSnapshotURL(projectName string, instanceName string, snapshotName string) *api.URL
- func InstanceURL(projectName string, instanceName string) *api.URL
- func NetworkACLURL(projectName string, networkACLName string) *api.URL
- func NetworkURL(projectName string, networkName string) *api.URL
- func NetworkZoneURL(projectName string, networkZoneName string) *api.URL
- func ProfileURL(projectName string, profileName string) *api.URL
- func ProjectURL(projectName string) *api.URL
- func ServerURL() *api.URL
- func StorageBucketURL(projectName string, location string, storagePoolName string, ...) *api.URL
- func StoragePoolURL(storagePoolName string) *api.URL
- func StorageVolumeBackupURL(projectName string, location string, poolName string, volumeTypeName string, ...) *api.URL
- func StorageVolumeSnapshotURL(projectName string, location string, poolName string, volumeTypeName string, ...) *api.URL
- func StorageVolumeURL(projectName string, location string, storagePoolName string, ...) *api.URL
- type Type
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthGroupURL ¶
AuthGroupURL returns an *api.URL to a group.
func CertificateURL ¶
CertificateURL returns an *api.URL to a certificate.
func IdentityProviderGroupURL ¶
IdentityProviderGroupURL returns an *api.URL to an identity provider group.
func IdentityURL ¶
IdentityURL returns an *api.URL to an identity.
func ImageAliasURL ¶
ImageAliasURL returns an *api.URL to an image alias.
func InstanceBackupURL ¶
InstanceBackupURL returns an *api.URL to an instance backup.
func InstanceSnapshotURL ¶
InstanceSnapshotURL returns an *api.URL to an instance snapshot.
func InstanceURL ¶
InstanceURL returns an *api.URL to an instance.
func NetworkACLURL ¶
NetworkACLURL returns an *api.URL to a network ACL.
func NetworkURL ¶
NetworkURL returns an *api.URL to a network.
func NetworkZoneURL ¶
NetworkZoneURL returns an *api.URL to a network zone.
func ProfileURL ¶
ProfileURL returns an *api.URL to a profile.
func ProjectURL ¶
ProjectURL returns an *api.URL to a Project.
func StorageBucketURL ¶
func StorageBucketURL(projectName string, location string, storagePoolName string, storageBucketName string) *api.URL
StorageBucketURL returns an *api.URL to a storage bucket.
func StoragePoolURL ¶
StoragePoolURL returns an *api.URL to a storage pool.
func StorageVolumeBackupURL ¶
func StorageVolumeBackupURL(projectName string, location string, poolName string, volumeTypeName string, volumeName, backupName string) *api.URL
StorageVolumeBackupURL returns an *api.URL to a storage volume backup.
Types ¶
type Type ¶
type Type string
Type represents a resource type in LXD that is addressable via the API.
const ( // TypeContainer represents container resources. TypeContainer Type = "container" // TypeImage represents image resources. TypeImage Type = "image" // TypeProfile represents profile resources. TypeProfile Type = "profile" // TypeProject represents project resources. TypeProject Type = "project" // TypeCertificate represents certificate resources. TypeCertificate Type = "certificate" // TypeInstance represents instance resources. TypeInstance Type = "instance" // TypeInstanceBackup represents instance backup resources. TypeInstanceBackup Type = "instance_backup" // TypeInstanceSnapshot represents instance snapshot resources. TypeInstanceSnapshot Type = "instance_snapshot" // TypeNetwork represents network resources. TypeNetwork Type = "network" // TypeNetworkACL represents network acl resources. TypeNetworkACL Type = "network_acl" // TypeClusterMember represents node resources. TypeClusterMember Type = "cluster_member" // TypeOperation represents operation resources. TypeOperation Type = "operation" // TypeStoragePool represents storage pool resources. TypeStoragePool Type = "storage_pool" // TypeStorageVolume represents storage volume resources. TypeStorageVolume Type = "storage_volume" // TypeStorageVolumeBackup represents storage volume backup resources. TypeStorageVolumeBackup Type = "storage_volume_backup" // TypeStorageVolumeSnapshot represents storage volume snapshot resources. TypeStorageVolumeSnapshot Type = "storage_volume_snapshot" // TypeWarning represents warning resources. TypeWarning Type = "warning" // TypeClusterGroup represents cluster group resources. TypeClusterGroup Type = "cluster_group" // TypeStorageBucket represents storage bucket resources. TypeStorageBucket Type = "storage_bucket" // TypeServer represents the top level /1.0 resource. TypeServer Type = "server" // TypeImageAlias represents image alias resources. TypeImageAlias Type = "image_alias" // TypeNetworkZone represents network zone resources. TypeNetworkZone Type = "network_zone" // TypeIdentity represents identity resources. TypeIdentity Type = "identity" // TypeAuthGroup represents authorization group resources. TypeAuthGroup Type = "group" // TypeIdentityProviderGroup represents identity provider group resources. TypeIdentityProviderGroup Type = "identity_provider_group" )
func APIMetricsEntityTypes ¶
func APIMetricsEntityTypes() []Type
APIMetricsEntityTypes returns the list of entity types relevant for the API metrics.
func ParseURL ¶
func ParseURL(u url.URL) (entityType Type, projectName string, location string, pathArguments []string, err error)
ParseURL parses a raw URL string and returns the Type, project, location, and path arguments (mux vars).
Path arguments are returned in the order they are found in the URL. If there is no project query parameter and the Type requires a project, then api.ProjectDefaultName is returned as the project name. The returned location is the value of the "target" query parameter. All returned values are unescaped.
func (Type) RequiresProject ¶
RequiresProject returns true if an entity of the Type can only exist within the context of a project. Operations and warnings may still be project specific but it is not an absolute requirement.