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
- func NewListPlanes(opts armrpc_controller.Options) (armrpc_controller.Controller, error)
- func NewListPlanesByType(opts armrpc_controller.Options) (armrpc_controller.Controller, error)
- func NewProxyController(opts armrpc_controller.Options) (armrpc_controller.Controller, error)
- type ListPlanes
- type ListPlanesByType
- type ProxyController
Constants ¶
const (
PlanesPath = "/planes"
)
const (
ResourceTypeName = "System.Resources/planes"
)
Variables ¶
This section is empty.
Functions ¶
func NewListPlanes ¶
func NewListPlanes(opts armrpc_controller.Options) (armrpc_controller.Controller, error)
NewListPlanes creates a new controller for listing for the Plane resource type.
func NewListPlanesByType ¶
func NewListPlanesByType(opts armrpc_controller.Options) (armrpc_controller.Controller, error)
NewListPlanesByType creates a new controller for listing planes by type and returns it, or an error if the controller cannot be created.
func NewProxyController ¶
func NewProxyController(opts armrpc_controller.Options) (armrpc_controller.Controller, error)
NewProxyController creates a new ProxyPlane controller with the given options and returns it, or returns an error if the controller cannot be created.
Types ¶
type ListPlanes ¶
ListPlanes is the controller implementation to get the list of UCP planes.
func (*ListPlanes) Run ¶
func (e *ListPlanes) Run(ctx context.Context, w http.ResponseWriter, req *http.Request) (armrpc_rest.Response, error)
Run() queries the storage client for planes in a given scope, creates a response with the results, and returns an OKResponse with the response. If an error occurs, it is returned.
type ListPlanesByType ¶
ListPlanesByType is the controller implementation to get the list of UCP planes.
func (*ListPlanesByType) Run ¶
func (e *ListPlanesByType) Run(ctx context.Context, w http.ResponseWriter, req *http.Request) (armrpc_rest.Response, error)
ListPlanesByType takes in a request object and returns a list of planes of a given type from the storage client. If an error occurs, it returns an error.
type ProxyController ¶
ProxyController is the controller implementation to proxy requests to appropriate RP or URL.
func (*ProxyController) Run ¶
func (p *ProxyController) Run(ctx context.Context, w http.ResponseWriter, req *http.Request) (armrpc_rest.Response, error)
Run() takes in a request object and context, looks up the plane and resource provider associated with the request, and proxies the request to the appropriate resource provider.