clients

package
v0.26.6 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2023 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Overview

Package clients is a generated GoMock package.

Package clients is a generated GoMock package.

Index

Constants

This section is empty.

Variables

Functions

func Is404Error

func Is404Error(err error) bool

"Is404Error" checks if the given error is a 404 error by checking if it is one of: a ResponseError with an ErrorCode of "NotFound", or a ResponseError with a StatusCode of 404, or an ErrorResponse with an Error Code of "NotFound".

Types

type AWSProvider

type AWSProvider struct {
	// Scope is the target level for deploying the AWS resources.
	Scope string
}

type ApplicationStatus

type ApplicationStatus struct {
	Name          string
	ResourceCount int
	Gateways      []GatewayStatus
}

type ApplicationsManagementClient

type ApplicationsManagementClient interface {
	ListAllResourcesByType(ctx context.Context, resourceType string) ([]generated.GenericResource, error)
	ListAllResourcesOfTypeInApplication(ctx context.Context, applicationName string, resourceType string) ([]generated.GenericResource, error)
	ListAllResourcesByApplication(ctx context.Context, applicationName string) ([]generated.GenericResource, error)
	ListAllResourcesOfTypeInEnvironment(ctx context.Context, environmentName string, resourceType string) ([]generated.GenericResource, error)
	ListAllResourcesByEnvironment(ctx context.Context, environmentName string) ([]generated.GenericResource, error)
	ShowResource(ctx context.Context, resourceType string, resourceName string) (generated.GenericResource, error)
	DeleteResource(ctx context.Context, resourceType string, resourceName string) (bool, error)
	ListApplications(ctx context.Context) ([]corerp.ApplicationResource, error)
	ShowApplication(ctx context.Context, applicationName string) (corerp.ApplicationResource, error)

	// CreateOrUpdateApplication creates or updates an application.
	CreateOrUpdateApplication(ctx context.Context, applicationName string, resource corerp.ApplicationResource) error

	// CreateApplicationIfNotFound creates an application if it does not exist.
	CreateApplicationIfNotFound(ctx context.Context, applicationName string, resource corerp.ApplicationResource) error

	DeleteApplication(ctx context.Context, applicationName string) (bool, error)
	CreateEnvironment(ctx context.Context, envName string, location string, envProperties *corerp.EnvironmentProperties) error

	// ListEnvironmentsInResourceGroup lists all environments in the configured scope (assumes configured scope is a resource group)
	ListEnvironmentsInResourceGroup(ctx context.Context) ([]corerp.EnvironmentResource, error)

	// ListEnvironmentsAll lists all environments across resource groups.
	ListEnvironmentsAll(ctx context.Context) ([]corerp.EnvironmentResource, error)
	GetEnvDetails(ctx context.Context, envName string) (corerp.EnvironmentResource, error)
	DeleteEnv(ctx context.Context, envName string) (bool, error)
	CreateUCPGroup(ctx context.Context, planeType string, planeName string, resourceGroupName string, resourceGroup ucp_v20231001preview.ResourceGroupResource) error
	DeleteUCPGroup(ctx context.Context, planeType string, planeName string, resourceGroupName string) (bool, error)
	ShowUCPGroup(ctx context.Context, planeType string, planeName string, resourceGroupName string) (ucp_v20231001preview.ResourceGroupResource, error)
	ListUCPGroup(ctx context.Context, planeType string, planeName string) ([]ucp_v20231001preview.ResourceGroupResource, error)

	// ShowRecipe shows recipe details including list of all parameters for a given recipe registered to an environment
	ShowRecipe(ctx context.Context, environmentName string, recipe corerp.RecipeGetMetadata) (corerp.RecipeGetMetadataResponse, error)
}

ApplicationsManagementClient is used to interface with management features like listing resources by app, show details of a resource.

type AzureProvider

type AzureProvider struct {
	// Scope is the target level for deploying the Azure resources.
	Scope string
}

type DeploymentClient

type DeploymentClient interface {
	Deploy(ctx context.Context, options DeploymentOptions) (DeploymentResult, error)
}

DeploymentClient is used to deploy ARM-JSON templates (compiled Bicep output).

type DeploymentOptions

type DeploymentOptions struct {
	// Template is the text of the ARM-JSON template in string form.
	Template map[string]any

	// Parameters is the set of parameters passed to the deployment.
	Parameters DeploymentParameters

	// Providers are the cloud providers configured on the environment for deployment.
	Providers *Providers

	// ProgressChan is a channel used to signal progress of the deployment operation.
	// The deployment client MUST close the channel if it was provided.
	ProgressChan chan<- ResourceProgress
}

DeploymentOptions is the options passed when deploying an ARM-JSON template.

type DeploymentOutput

type DeploymentOutput struct {
	Type  string `json:"type"`
	Value any    `json:"value"`
}

type DeploymentParameters

type DeploymentParameters = map[string]map[string]any

NOTE: parameters in the template engine follow the structure:

{
  "parameter1Name": {
    "value": ...
  }
}

Each parameter can have additional metadata besides the mandatory 'value' key.

We're really only interested in 'value' and we pass the other metadata through.

The full format is documented here: https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/parameter-files

Note that we're only storing the 'parameters' node of the format described above.

func ShallowCopy

func ShallowCopy(params DeploymentParameters) DeploymentParameters

ShallowCopy creates a shallow copy of the DeploymentParameters object by iterating through the original object and copying each key-value pair into a new object.

type DeploymentResult

type DeploymentResult struct {
	Resources []ucpresources.ID
	Outputs   map[string]DeploymentOutput
}

type DiagnosticsClient

type DiagnosticsClient interface {
	Expose(ctx context.Context, options ExposeOptions) (failed chan error, stop chan struct{}, signals chan os.Signal, err error)
	Logs(ctx context.Context, options LogsOptions) ([]LogStream, error)
	GetPublicEndpoint(ctx context.Context, options EndpointOptions) (*string, error)
}

DiagnosticsClient is used to interface with diagnostics features like logs and port-forwards.

type EndpointOptions

type EndpointOptions struct {
	ResourceID ucpresources.ID
}

type ExposeOptions

type ExposeOptions struct {
	Application string
	Resource    string
	Port        int
	RemotePort  int
	Replica     string
}

type GatewayStatus

type GatewayStatus struct {
	Name     string
	Endpoint string
}

type LogStream

type LogStream struct {
	Name   string
	Stream io.ReadCloser
}

type LogsOptions

type LogsOptions struct {
	Application string
	Resource    string
	Follow      bool
	Container   string
	Replica     string
}

type MockApplicationsManagementClient

type MockApplicationsManagementClient struct {
	// contains filtered or unexported fields
}

MockApplicationsManagementClient is a mock of ApplicationsManagementClient interface.

func NewMockApplicationsManagementClient

func NewMockApplicationsManagementClient(ctrl *gomock.Controller) *MockApplicationsManagementClient

NewMockApplicationsManagementClient creates a new mock instance.

func (*MockApplicationsManagementClient) CreateApplicationIfNotFound

func (m *MockApplicationsManagementClient) CreateApplicationIfNotFound(arg0 context.Context, arg1 string, arg2 v20231001preview.ApplicationResource) error

CreateApplicationIfNotFound mocks base method.

func (*MockApplicationsManagementClient) CreateEnvironment

CreateEnvironment mocks base method.

func (*MockApplicationsManagementClient) CreateOrUpdateApplication

func (m *MockApplicationsManagementClient) CreateOrUpdateApplication(arg0 context.Context, arg1 string, arg2 v20231001preview.ApplicationResource) error

CreateOrUpdateApplication mocks base method.

func (*MockApplicationsManagementClient) CreateUCPGroup

CreateUCPGroup mocks base method.

func (*MockApplicationsManagementClient) DeleteApplication

func (m *MockApplicationsManagementClient) DeleteApplication(arg0 context.Context, arg1 string) (bool, error)

DeleteApplication mocks base method.

func (*MockApplicationsManagementClient) DeleteEnv

func (m *MockApplicationsManagementClient) DeleteEnv(arg0 context.Context, arg1 string) (bool, error)

DeleteEnv mocks base method.

func (*MockApplicationsManagementClient) DeleteResource

func (m *MockApplicationsManagementClient) DeleteResource(arg0 context.Context, arg1, arg2 string) (bool, error)

DeleteResource mocks base method.

func (*MockApplicationsManagementClient) DeleteUCPGroup

func (m *MockApplicationsManagementClient) DeleteUCPGroup(arg0 context.Context, arg1, arg2, arg3 string) (bool, error)

DeleteUCPGroup mocks base method.

func (*MockApplicationsManagementClient) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockApplicationsManagementClient) GetEnvDetails

GetEnvDetails mocks base method.

func (*MockApplicationsManagementClient) ListAllResourcesByApplication

func (m *MockApplicationsManagementClient) ListAllResourcesByApplication(arg0 context.Context, arg1 string) ([]generated.GenericResource, error)

ListAllResourcesByApplication mocks base method.

func (*MockApplicationsManagementClient) ListAllResourcesByEnvironment

func (m *MockApplicationsManagementClient) ListAllResourcesByEnvironment(arg0 context.Context, arg1 string) ([]generated.GenericResource, error)

ListAllResourcesByEnvironment mocks base method.

func (*MockApplicationsManagementClient) ListAllResourcesByType

func (m *MockApplicationsManagementClient) ListAllResourcesByType(arg0 context.Context, arg1 string) ([]generated.GenericResource, error)

ListAllResourcesByType mocks base method.

func (*MockApplicationsManagementClient) ListAllResourcesOfTypeInApplication

func (m *MockApplicationsManagementClient) ListAllResourcesOfTypeInApplication(arg0 context.Context, arg1, arg2 string) ([]generated.GenericResource, error)

ListAllResourcesOfTypeInApplication mocks base method.

func (*MockApplicationsManagementClient) ListAllResourcesOfTypeInEnvironment

func (m *MockApplicationsManagementClient) ListAllResourcesOfTypeInEnvironment(arg0 context.Context, arg1, arg2 string) ([]generated.GenericResource, error)

ListAllResourcesOfTypeInEnvironment mocks base method.

func (*MockApplicationsManagementClient) ListApplications

ListApplications mocks base method.

func (*MockApplicationsManagementClient) ListEnvironmentsAll

ListEnvironmentsAll mocks base method.

func (*MockApplicationsManagementClient) ListEnvironmentsInResourceGroup

func (m *MockApplicationsManagementClient) ListEnvironmentsInResourceGroup(arg0 context.Context) ([]v20231001preview.EnvironmentResource, error)

ListEnvironmentsInResourceGroup mocks base method.

func (*MockApplicationsManagementClient) ListUCPGroup

ListUCPGroup mocks base method.

func (*MockApplicationsManagementClient) ShowApplication

ShowApplication mocks base method.

func (*MockApplicationsManagementClient) ShowRecipe

ShowRecipe mocks base method.

func (*MockApplicationsManagementClient) ShowResource

ShowResource mocks base method.

func (*MockApplicationsManagementClient) ShowUCPGroup

ShowUCPGroup mocks base method.

type MockApplicationsManagementClientMockRecorder

type MockApplicationsManagementClientMockRecorder struct {
	// contains filtered or unexported fields
}

MockApplicationsManagementClientMockRecorder is the mock recorder for MockApplicationsManagementClient.

func (*MockApplicationsManagementClientMockRecorder) CreateApplicationIfNotFound

func (mr *MockApplicationsManagementClientMockRecorder) CreateApplicationIfNotFound(arg0, arg1, arg2 interface{}) *gomock.Call

CreateApplicationIfNotFound indicates an expected call of CreateApplicationIfNotFound.

func (*MockApplicationsManagementClientMockRecorder) CreateEnvironment

func (mr *MockApplicationsManagementClientMockRecorder) CreateEnvironment(arg0, arg1, arg2, arg3 interface{}) *gomock.Call

CreateEnvironment indicates an expected call of CreateEnvironment.

func (*MockApplicationsManagementClientMockRecorder) CreateOrUpdateApplication

func (mr *MockApplicationsManagementClientMockRecorder) CreateOrUpdateApplication(arg0, arg1, arg2 interface{}) *gomock.Call

CreateOrUpdateApplication indicates an expected call of CreateOrUpdateApplication.

func (*MockApplicationsManagementClientMockRecorder) CreateUCPGroup

func (mr *MockApplicationsManagementClientMockRecorder) CreateUCPGroup(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call

CreateUCPGroup indicates an expected call of CreateUCPGroup.

func (*MockApplicationsManagementClientMockRecorder) DeleteApplication

func (mr *MockApplicationsManagementClientMockRecorder) DeleteApplication(arg0, arg1 interface{}) *gomock.Call

DeleteApplication indicates an expected call of DeleteApplication.

func (*MockApplicationsManagementClientMockRecorder) DeleteEnv

func (mr *MockApplicationsManagementClientMockRecorder) DeleteEnv(arg0, arg1 interface{}) *gomock.Call

DeleteEnv indicates an expected call of DeleteEnv.

func (*MockApplicationsManagementClientMockRecorder) DeleteResource

func (mr *MockApplicationsManagementClientMockRecorder) DeleteResource(arg0, arg1, arg2 interface{}) *gomock.Call

DeleteResource indicates an expected call of DeleteResource.

func (*MockApplicationsManagementClientMockRecorder) DeleteUCPGroup

func (mr *MockApplicationsManagementClientMockRecorder) DeleteUCPGroup(arg0, arg1, arg2, arg3 interface{}) *gomock.Call

DeleteUCPGroup indicates an expected call of DeleteUCPGroup.

func (*MockApplicationsManagementClientMockRecorder) GetEnvDetails

func (mr *MockApplicationsManagementClientMockRecorder) GetEnvDetails(arg0, arg1 interface{}) *gomock.Call

GetEnvDetails indicates an expected call of GetEnvDetails.

func (*MockApplicationsManagementClientMockRecorder) ListAllResourcesByApplication

func (mr *MockApplicationsManagementClientMockRecorder) ListAllResourcesByApplication(arg0, arg1 interface{}) *gomock.Call

ListAllResourcesByApplication indicates an expected call of ListAllResourcesByApplication.

func (*MockApplicationsManagementClientMockRecorder) ListAllResourcesByEnvironment

func (mr *MockApplicationsManagementClientMockRecorder) ListAllResourcesByEnvironment(arg0, arg1 interface{}) *gomock.Call

ListAllResourcesByEnvironment indicates an expected call of ListAllResourcesByEnvironment.

func (*MockApplicationsManagementClientMockRecorder) ListAllResourcesByType

func (mr *MockApplicationsManagementClientMockRecorder) ListAllResourcesByType(arg0, arg1 interface{}) *gomock.Call

ListAllResourcesByType indicates an expected call of ListAllResourcesByType.

func (*MockApplicationsManagementClientMockRecorder) ListAllResourcesOfTypeInApplication

func (mr *MockApplicationsManagementClientMockRecorder) ListAllResourcesOfTypeInApplication(arg0, arg1, arg2 interface{}) *gomock.Call

ListAllResourcesOfTypeInApplication indicates an expected call of ListAllResourcesOfTypeInApplication.

func (*MockApplicationsManagementClientMockRecorder) ListAllResourcesOfTypeInEnvironment

func (mr *MockApplicationsManagementClientMockRecorder) ListAllResourcesOfTypeInEnvironment(arg0, arg1, arg2 interface{}) *gomock.Call

ListAllResourcesOfTypeInEnvironment indicates an expected call of ListAllResourcesOfTypeInEnvironment.

func (*MockApplicationsManagementClientMockRecorder) ListApplications

func (mr *MockApplicationsManagementClientMockRecorder) ListApplications(arg0 interface{}) *gomock.Call

ListApplications indicates an expected call of ListApplications.

func (*MockApplicationsManagementClientMockRecorder) ListEnvironmentsAll

func (mr *MockApplicationsManagementClientMockRecorder) ListEnvironmentsAll(arg0 interface{}) *gomock.Call

ListEnvironmentsAll indicates an expected call of ListEnvironmentsAll.

func (*MockApplicationsManagementClientMockRecorder) ListEnvironmentsInResourceGroup

func (mr *MockApplicationsManagementClientMockRecorder) ListEnvironmentsInResourceGroup(arg0 interface{}) *gomock.Call

ListEnvironmentsInResourceGroup indicates an expected call of ListEnvironmentsInResourceGroup.

func (*MockApplicationsManagementClientMockRecorder) ListUCPGroup

func (mr *MockApplicationsManagementClientMockRecorder) ListUCPGroup(arg0, arg1, arg2 interface{}) *gomock.Call

ListUCPGroup indicates an expected call of ListUCPGroup.

func (*MockApplicationsManagementClientMockRecorder) ShowApplication

func (mr *MockApplicationsManagementClientMockRecorder) ShowApplication(arg0, arg1 interface{}) *gomock.Call

ShowApplication indicates an expected call of ShowApplication.

func (*MockApplicationsManagementClientMockRecorder) ShowRecipe

func (mr *MockApplicationsManagementClientMockRecorder) ShowRecipe(arg0, arg1, arg2 interface{}) *gomock.Call

ShowRecipe indicates an expected call of ShowRecipe.

func (*MockApplicationsManagementClientMockRecorder) ShowResource

func (mr *MockApplicationsManagementClientMockRecorder) ShowResource(arg0, arg1, arg2 interface{}) *gomock.Call

ShowResource indicates an expected call of ShowResource.

func (*MockApplicationsManagementClientMockRecorder) ShowUCPGroup

func (mr *MockApplicationsManagementClientMockRecorder) ShowUCPGroup(arg0, arg1, arg2, arg3 interface{}) *gomock.Call

ShowUCPGroup indicates an expected call of ShowUCPGroup.

type MockDiagnosticsClient

type MockDiagnosticsClient struct {
	// contains filtered or unexported fields
}

MockDiagnosticsClient is a mock of DiagnosticsClient interface.

func NewMockDiagnosticsClient

func NewMockDiagnosticsClient(ctrl *gomock.Controller) *MockDiagnosticsClient

NewMockDiagnosticsClient creates a new mock instance.

func (*MockDiagnosticsClient) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockDiagnosticsClient) Expose

func (m *MockDiagnosticsClient) Expose(arg0 context.Context, arg1 ExposeOptions) (chan error, chan struct{}, chan os.Signal, error)

Expose mocks base method.

func (*MockDiagnosticsClient) GetPublicEndpoint

func (m *MockDiagnosticsClient) GetPublicEndpoint(arg0 context.Context, arg1 EndpointOptions) (*string, error)

GetPublicEndpoint mocks base method.

func (*MockDiagnosticsClient) Logs

Logs mocks base method.

type MockDiagnosticsClientMockRecorder

type MockDiagnosticsClientMockRecorder struct {
	// contains filtered or unexported fields
}

MockDiagnosticsClientMockRecorder is the mock recorder for MockDiagnosticsClient.

func (*MockDiagnosticsClientMockRecorder) Expose

func (mr *MockDiagnosticsClientMockRecorder) Expose(arg0, arg1 interface{}) *gomock.Call

Expose indicates an expected call of Expose.

func (*MockDiagnosticsClientMockRecorder) GetPublicEndpoint

func (mr *MockDiagnosticsClientMockRecorder) GetPublicEndpoint(arg0, arg1 interface{}) *gomock.Call

GetPublicEndpoint indicates an expected call of GetPublicEndpoint.

func (*MockDiagnosticsClientMockRecorder) Logs

func (mr *MockDiagnosticsClientMockRecorder) Logs(arg0, arg1 interface{}) *gomock.Call

Logs indicates an expected call of Logs.

type Providers

type Providers struct {
	// Azure provider information. This field is optional.
	Azure *AzureProvider
	// AWS provider information. This field is optional.
	AWS *AWSProvider
	// Radius provider information.
	Radius *RadiusProvider
}

type RadiusProvider

type RadiusProvider struct {
	// Currently, we must provide an environment ID for deploying applications.
	EnvironmentID string
	// ApplicationID is the ID of the application to be deployed. This is optional.
	ApplicationID string
}

type ResourceProgress

type ResourceProgress struct {
	Resource ucpresources.ID
	Status   ResourceStatus
}

type ResourceStatus

type ResourceStatus string
const (
	StatusStarted   ResourceStatus = "Started"
	StatusFailed    ResourceStatus = "Failed"
	StatusCompleted ResourceStatus = "Completed"
)

type UCPApplicationsManagementClient

type UCPApplicationsManagementClient struct {
	RootScope     string
	ClientOptions *arm.ClientOptions
}

func (*UCPApplicationsManagementClient) CreateApplicationIfNotFound

func (amc *UCPApplicationsManagementClient) CreateApplicationIfNotFound(ctx context.Context, applicationName string, resource corerpv20231001.ApplicationResource) error

CreateApplicationIfNotFound checks if an application exists and creates it if it does not exist, returning an error if any occurs.

func (*UCPApplicationsManagementClient) CreateEnvironment

func (amc *UCPApplicationsManagementClient) CreateEnvironment(ctx context.Context, envName string, location string, envProperties *corerpv20231001.EnvironmentProperties) error

CreateEnvironment creates or updates an environment with the given name, location and properties, and returns an error if one occurs.

func (*UCPApplicationsManagementClient) CreateOrUpdateApplication

func (amc *UCPApplicationsManagementClient) CreateOrUpdateApplication(ctx context.Context, applicationName string, resource corerpv20231001.ApplicationResource) error

CreateOrUpdateApplication creates or updates an application resource in Azure using the given application name and resource. It returns an error if the creation or update fails.

func (*UCPApplicationsManagementClient) CreateUCPGroup

func (amc *UCPApplicationsManagementClient) CreateUCPGroup(ctx context.Context, planeType string, planeName string, resourceGroupName string, resourceGroup ucpv20231001.ResourceGroupResource) error

CreateUCPGroup creates a new resource group in the specified plane type and plane name using the provided resource group resource and returns an error if one occurs.

func (*UCPApplicationsManagementClient) DeleteApplication

func (amc *UCPApplicationsManagementClient) DeleteApplication(ctx context.Context, applicationName string) (bool, error)

DeleteApplication deletes an application and all its associated resources, and returns an error if any of the operations fail.

func (*UCPApplicationsManagementClient) DeleteEnv

func (amc *UCPApplicationsManagementClient) DeleteEnv(ctx context.Context, envName string) (bool, error)

DeleteEnv function checks if there are any applications associated with the given environment, deletes them if found, and then deletes the environment itself. It returns a boolean and an error if one occurs.

func (*UCPApplicationsManagementClient) DeleteResource

func (amc *UCPApplicationsManagementClient) DeleteResource(ctx context.Context, resourceType string, resourceName string) (bool, error)

DeleteResource creates a new client, sends a delete request to the resource, polls until the request is completed, and returns a boolean indicating whether the resource was successfully deleted or not, and an error if one occurred.

func (*UCPApplicationsManagementClient) DeleteUCPGroup

func (amc *UCPApplicationsManagementClient) DeleteUCPGroup(ctx context.Context, planeType string, planeName string, resourceGroupName string) (bool, error)

DeleteUCPGroup attempts to delete a UCP resource group using the provided plane type, plane name and resource group name, and returns a boolean indicating success or failure and an error if one occurs.

func (*UCPApplicationsManagementClient) GetEnvDetails

GetEnvDetails attempts to retrieve an environment resource from an environment client, and returns the environment resource or an error if unsuccessful.

func (*UCPApplicationsManagementClient) ListAllResourcesByApplication

func (amc *UCPApplicationsManagementClient) ListAllResourcesByApplication(ctx context.Context, applicationName string) ([]generated.GenericResource, error)

ListAllResourcesByApplication takes in a context and an application name and returns a slice of GenericResources and an error if one occurs.

func (*UCPApplicationsManagementClient) ListAllResourcesByEnvironment

func (amc *UCPApplicationsManagementClient) ListAllResourcesByEnvironment(ctx context.Context, environmentName string) ([]generated.GenericResource, error)

ListAllResourcesByEnvironment iterates through a list of resource types and calls ListAllResourcesOfTypeInEnvironment for each one, appending the results to a slice of GenericResources and returning it. If an error is encountered, it is returned.

func (*UCPApplicationsManagementClient) ListAllResourcesByType

func (amc *UCPApplicationsManagementClient) ListAllResourcesByType(ctx context.Context, resourceType string) ([]generated.GenericResource, error)

ListAllResourcesByType retrieves a list of all resources of a given type from the root scope, and returns them in a slice of GenericResource objects, or an error if one occurs.

func (*UCPApplicationsManagementClient) ListAllResourcesOfTypeInApplication

func (amc *UCPApplicationsManagementClient) ListAllResourcesOfTypeInApplication(ctx context.Context, applicationName string, resourceType string) ([]generated.GenericResource, error)

ListAllResourcesOfTypeInApplication takes in a context, an application name and a resource type and returns a slice of GenericResources and an error if one occurs.

func (*UCPApplicationsManagementClient) ListAllResourcesOfTypeInEnvironment

func (amc *UCPApplicationsManagementClient) ListAllResourcesOfTypeInEnvironment(ctx context.Context, environmentName string, resourceType string) ([]generated.GenericResource, error)

ListAllResourcesOfTypeInEnvironment takes in a context, an environment name and a resource type and returns a slice of GenericResources and an error if one occurs.

func (*UCPApplicationsManagementClient) ListApplications

ListApplications() retrieves a list of ApplicationResource objects from the Azure API and returns them in a slice, or an error if one occurs.

func (*UCPApplicationsManagementClient) ListApplicationsByEnv

func (amc *UCPApplicationsManagementClient) ListApplicationsByEnv(ctx context.Context, envName string) ([]corerpv20231001.ApplicationResource, error)

ListApplicationsByEnv takes in a context and an environment name and returns a slice of ApplicationResource objects and an error if one occurs.

func (*UCPApplicationsManagementClient) ListEnvironmentsAll

ListEnvironmentsAll queries the scope for all environment resources and returns a slice of environment resources or an error if one occurs.

func (*UCPApplicationsManagementClient) ListEnvironmentsInResourceGroup

func (amc *UCPApplicationsManagementClient) ListEnvironmentsInResourceGroup(ctx context.Context) ([]corerpv20231001.EnvironmentResource, error)

ListEnvironmentsInResourceGroup creates a list of environment resources by paging through the list of environments in the resource group and appending each environment to the list. It returns the list of environment resources or an error if one occurs.

func (*UCPApplicationsManagementClient) ListUCPGroup

func (amc *UCPApplicationsManagementClient) ListUCPGroup(ctx context.Context, planeType string, planeName string) ([]ucpv20231001.ResourceGroupResource, error)

ListUCPGroup is a function that retrieves a list of resource groups from the UCP API and returns them as a slice of ResourceGroupResource objects. It may return an error if there is an issue with the API request.

func (*UCPApplicationsManagementClient) ShowApplication

func (amc *UCPApplicationsManagementClient) ShowApplication(ctx context.Context, applicationName string) (corerpv20231001.ApplicationResource, error)

ShowApplication creates a new ApplicationsClient, attempts to get an application resource from the Azure Cognitive Search service, and returns the resource or an error if one occurs.

func (*UCPApplicationsManagementClient) ShowRecipe

ShowRecipe creates a new EnvironmentsClient, gets the recipe metadata from the environment, and returns the EnvironmentRecipeProperties or an error if one occurs.

func (*UCPApplicationsManagementClient) ShowResource

func (amc *UCPApplicationsManagementClient) ShowResource(ctx context.Context, resourceType string, resourceName string) (generated.GenericResource, error)

ShowResource creates a new client for a given resource type and attempts to retrieve the resource with the given name, returning the resource or an error if one occurs.

func (*UCPApplicationsManagementClient) ShowUCPGroup

func (amc *UCPApplicationsManagementClient) ShowUCPGroup(ctx context.Context, planeType string, planeName string, resourceGroupName string) (ucpv20231001.ResourceGroupResource, error)

ShowUCPGroup is a function that retrieves a resource group from the Azure Resource Manager using the given plane type, plane name and resource group name, and returns the resource group resource or an error if one occurs.

Jump to

Keyboard shortcuts

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