Documentation
¶
Index ¶
- func ApplyRequestBody(requestMethod string, body []byte, v any) error
- func IsValidHostedClusterControlPlaneSize(s string) bool
- func LeafTypeName(rt azcorearm.ResourceType) string
- func ListProvisioningStates() iter.Seq[coreapi.ProvisioningState]
- func ListSubscriptionStates() iter.Seq[coreapi.SubscriptionState]
- func ToClusterResourceID(subscriptionName, resourceGroupName, clusterName string) (*azcorearm.ResourceID, error)
- func ToClusterResourceIDString(subscriptionName, resourceGroupName, clusterName string) string
- func ToDenyAssignmentResourceID(subscriptionID, resourceGroupName, denyAssignmentName string) (*azcorearm.ResourceID, error)
- func ToDenyAssignmentResourceIDString(subscriptionID, resourceGroupName, denyAssignmentName string) string
- func ToExternalAuthResourceID(subscriptionName, resourceGroupName, clusterName, externalAuthName string) (*azcorearm.ResourceID, error)
- func ToExternalAuthResourceIDString(subscriptionName, resourceGroupName, clusterName, externalAuthName string) string
- func ToManagementClusterContentResourceIDString(...) string
- func ToNodePoolResourceID(subscriptionName, resourceGroupName, clusterName, nodePoolName string) (*azcorearm.ResourceID, error)
- func ToNodePoolResourceIDString(subscriptionName, resourceGroupName, clusterName, nodePoolName string) string
- func ToOperationResourceIDString(subscriptionName, operationName string) string
- func ToResourceGroupResourceID(subscriptionID, resourceGroupName string) (*azcorearm.ResourceID, error)
- func ToResourceGroupResourceIDString(subscriptionName, resourceGroupName string) string
- func ToServiceProviderClusterResourceIDString(subscriptionName, resourceGroupName, clusterName string) string
- func ToServiceProviderNodePoolResourceIDString(subscriptionName, resourceGroupName, clusterName, nodePoolName string) string
- func ToSubscriptionResourceID(subscriptionName string) (*azcorearm.ResourceID, error)
- func ToSubscriptionResourceIDString(subscriptionName string) string
- func ToSystemAdminCredentialRequestResourceID(subscriptionName, resourceGroupName, clusterName, credentialName string) (*azcorearm.ResourceID, error)
- func ToSystemAdminCredentialRequestResourceIDString(subscriptionName, resourceGroupName, clusterName, credentialName string) string
- func ToSystemAdminCredentialRevocationResourceID(subscriptionName, resourceGroupName, clusterName, revocationName string) (*azcorearm.ResourceID, error)
- func ToSystemAdminCredentialRevocationResourceIDString(subscriptionName, resourceGroupName, clusterName, revocationName string) string
- func UnmarshalDeploymentPreflight(data []byte) (*coreapi.DeploymentPreflight, error)
- func WriteCloudError(w http.ResponseWriter, err *coreapi.CloudError)
- func WriteConflictError(w http.ResponseWriter, resourceID *azcorearm.ResourceID, format string, ...)
- func WriteDeploymentPreflightResponse(w http.ResponseWriter, preflightErrors []coreapi.CloudErrorBody)
- func WriteError(w http.ResponseWriter, statusCode int, code, target, format string, ...)
- func WriteInternalServerError(w http.ResponseWriter)
- func WriteInvalidRequestContentError(w http.ResponseWriter, err error)
- func WriteJSONResponse(writer http.ResponseWriter, statusCode int, body any) (int, error)
- func WriteResourceNotFoundError(w http.ResponseWriter, resourceID *azcorearm.ResourceID)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyRequestBody ¶
ApplyRequestBody applies a JSON request body to the value pointed to by v. If the request method is PATCH, the request body is applied to v using JSON Merge Patch (RFC 7396) semantics. Otherwise the request body is unmarshalled directly to v.
func IsValidHostedClusterControlPlaneSize ¶
IsValidHostedClusterControlPlaneSize reports whether s names a known tier.
func LeafTypeName ¶
func LeafTypeName(rt azcorearm.ResourceType) string
LeafTypeName returns the trailing segment of an ARM ResourceType (the part after the last slash). Using it in the per-level helpers prevents callers from accidentally embedding the full `namespace/type/...` form twice in the same ID — see the original ToServiceProviderNodePoolResourceIDString bug.
func ListProvisioningStates ¶
func ListProvisioningStates() iter.Seq[coreapi.ProvisioningState]
ListProvisioningStates returns an iterator that yields all recognized ProvisioningState values. This function is intended as a test aid.
func ListSubscriptionStates ¶
func ListSubscriptionStates() iter.Seq[coreapi.SubscriptionState]
ListSubscriptionStates returns an iterator that yields all recognized SubscriptionState values. This function is intended as a test aid.
func ToClusterResourceID ¶
func ToClusterResourceID(subscriptionName, resourceGroupName, clusterName string) (*azcorearm.ResourceID, error)
func ToDenyAssignmentResourceID ¶
func ToDenyAssignmentResourceID(subscriptionID, resourceGroupName, denyAssignmentName string) (*azcorearm.ResourceID, error)
func ToExternalAuthResourceID ¶
func ToExternalAuthResourceID(subscriptionName, resourceGroupName, clusterName, externalAuthName string) (*azcorearm.ResourceID, error)
func ToNodePoolResourceID ¶
func ToNodePoolResourceID(subscriptionName, resourceGroupName, clusterName, nodePoolName string) (*azcorearm.ResourceID, error)
func ToResourceGroupResourceID ¶
func ToResourceGroupResourceID(subscriptionID, resourceGroupName string) (*azcorearm.ResourceID, error)
func ToSubscriptionResourceID ¶
func ToSubscriptionResourceID(subscriptionName string) (*azcorearm.ResourceID, error)
func ToSystemAdminCredentialRequestResourceID ¶
func ToSystemAdminCredentialRequestResourceID(subscriptionName, resourceGroupName, clusterName, credentialName string) (*azcorearm.ResourceID, error)
func ToSystemAdminCredentialRevocationResourceID ¶
func ToSystemAdminCredentialRevocationResourceID(subscriptionName, resourceGroupName, clusterName, revocationName string) (*azcorearm.ResourceID, error)
func UnmarshalDeploymentPreflight ¶
func UnmarshalDeploymentPreflight(data []byte) (*coreapi.DeploymentPreflight, error)
UnmarshalDeploymentPreflight unmarshals JSON-encoded data and returns either a DeploymentPreflight instance or an appropriate CloudError with a 200 OK HTTP status code.
func WriteCloudError ¶
func WriteCloudError(w http.ResponseWriter, err *coreapi.CloudError)
WriteCloudError writes a CloudError to the given ResponseWriter
func WriteConflictError ¶
func WriteConflictError(w http.ResponseWriter, resourceID *azcorearm.ResourceID, format string, a ...interface{})
WriteConflictError writes a conflict error to the given ResponseWriter
func WriteDeploymentPreflightResponse ¶
func WriteDeploymentPreflightResponse(w http.ResponseWriter, preflightErrors []coreapi.CloudErrorBody)
WriteDeploymentPreflightResponse writes an appropriately structured response body to a deployment preflight request using the given error slice. An empty error slice indicates successful validation.
func WriteError ¶
func WriteError(w http.ResponseWriter, statusCode int, code, target, format string, a ...interface{})
WriteError constructs and writes a CloudError to the given ResponseWriter
func WriteInternalServerError ¶
func WriteInternalServerError(w http.ResponseWriter)
WriteInternalServerError writes an internal server error to the given ResponseWriter
func WriteInvalidRequestContentError ¶
func WriteInvalidRequestContentError(w http.ResponseWriter, err error)
WriteInvalidRequestContentError writes an invalid request content error to the given ResponseWriter
func WriteJSONResponse ¶
WriteJSONResponse writes a JSON response body to the http.ResponseWriter in the proper sequence: first setting Content-Type to "application/json", then setting the HTTP status code, and finally writing a JSON encoding of body.
The function accepts anything for the body argument that can be marshalled to JSON. One special case, however, is a byte slice. A byte slice will be written verbatim with the expectation that it was produced by Marshal.
func WriteResourceNotFoundError ¶
func WriteResourceNotFoundError(w http.ResponseWriter, resourceID *azcorearm.ResourceID)
WriteResourceNotFoundError writes a nonexistent resource error to the given ResponseWriter
Types ¶
This section is empty.