resourcegroups

package
v0.41.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 11, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Copyright 2023 The Radius Authors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2023 The Radius Authors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2023 The Radius Authors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

View Source
const (
	ResourceGroupType = "System.Resources/resourceGroups"
)

Variables

This section is empty.

Functions

func NewListResourceGroups

func NewListResourceGroups(opts armrpc_controller.Options) (armrpc_controller.Controller, error)

NewListResourceGroups creates a new controller for listing resource groups.

func NewListResources

NewListResources creates a new controller for listing resources stored in a resource group.

func ValidateDownstream added in v0.29.0

func ValidateDownstream(ctx context.Context, client store.StorageClient, id resources.ID, location string, apiVersion string) (*url.URL, error)

ValidateDownstream can be used to find and validate the downstream URL for a resource. Returns NotFoundError for the case where the plane or resource group does not exist. Returns InvalidError for cases where the data is invalid, like when the resource provider is not configured.

func ValidateLegacyResourceProvider added in v0.41.0

func ValidateLegacyResourceProvider(ctx context.Context, client store.StorageClient, id resources.ID, plane *datamodel.RadiusPlane) (*url.URL, error)

ValidateLegacyResourceProvider validates that the resource provider specified in the id exists. Returns InvalidError if the plane contains invalid data.

func ValidateRadiusPlane added in v0.41.0

func ValidateRadiusPlane(ctx context.Context, client store.StorageClient, id resources.ID) (*datamodel.RadiusPlane, error)

ValidateRadiusPlane validates that the plane specified in the id exists. Returns NotFoundError if the plane does not exist.

func ValidateResourceGroup added in v0.41.0

func ValidateResourceGroup(ctx context.Context, client store.StorageClient, id resources.ID) error

ValidateResourceGroup validates that the resource group specified in the id exists (if applicable). Returns NotFoundError if the resource group does not exist.

func ValidateResourceType added in v0.41.0

func ValidateResourceType(ctx context.Context, client store.StorageClient, id resources.ID, locationName string, apiVersion string) (*url.URL, error)

ValidateResourceType performs semantic validation of a proxy request against registered resource types.

Returns NotFoundError if the resource type does not exist. Returns InvalidError if the request cannot be routed due to an invalid configuration.

Types

type InvalidError added in v0.29.0

type InvalidError struct {
	Message string
}

InvalidError is returned when the data is invalid.

func (*InvalidError) Error added in v0.29.0

func (e *InvalidError) Error() string

Error returns the error message.

func (*InvalidError) Is added in v0.29.0

func (e *InvalidError) Is(err error) bool

Is returns true if the error is a InvalidError.

type ListResourceGroups

ListResourceGroups is the controller implementation to get the list of UCP resource groups.

func (*ListResourceGroups) Run

Run() function extracts the plane type and name from the request URL, queries the storage client for resource groups in the scope of the plane, creates a response with the list of resource groups and returns an OK response with the list of resource groups.

type ListResources

ListResources is the controller implementation to get the list of resources stored in a resource group.

func (*ListResources) Run

Run implements controller.Controller.

type NotFoundError added in v0.29.0

type NotFoundError struct {
	Message string
}

NotFoundError is returned when a resource group or plane is not found.

func (*NotFoundError) Error added in v0.29.0

func (e *NotFoundError) Error() string

Error returns the error message.

func (*NotFoundError) Is added in v0.29.0

func (e *NotFoundError) Is(err error) bool

Is returns true if the error is a NotFoundError.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL