Documentation ¶
Overview ¶
Package renderers is a generated GoMock package.
Index ¶
- Constants
- func GetAnnotations(options RenderOptions) map[string]string
- func GetLabels(options RenderOptions, applicationName string, resourceName string, ...) map[string]string
- type ApplicationOptions
- type EnvironmentOptions
- type GatewayOptions
- type MockRenderer
- func (m *MockRenderer) EXPECT() *MockRendererMockRecorder
- func (m *MockRenderer) GetDependencyIDs(arg0 context.Context, arg1 v1.DataModelInterface) ([]resources.ID, []resources.ID, error)
- func (m *MockRenderer) Render(arg0 context.Context, arg1 v1.DataModelInterface, arg2 RenderOptions) (RendererOutput, error)
- type MockRendererMockRecorder
- type RenderOptions
- type Renderer
- type RendererDependency
- type RendererOutput
Constants ¶
const ( // DefaultPort represents the default port of HTTP endpoint. DefaultPort int32 = 80 // DefaultSecurePort represents the default port of HTTPS endpoint. DefaultSecurePort int32 = 443 )
Variables ¶
This section is empty.
Functions ¶
func GetAnnotations ¶
func GetAnnotations(options RenderOptions) map[string]string
GetAnnotations returns the merged annotations from Environment and Application KubernetesMetadata.
Types ¶
type ApplicationOptions ¶
type ApplicationOptions struct { // KubernetesMetadata represents the Application KubernetesMetadata extension. KubernetesMetadata *datamodel.KubeMetadataExtension }
ApplicationOptions represents the options for the linked application resource.
type EnvironmentOptions ¶
type EnvironmentOptions struct { // Namespace represents the Kubernetes namespace. Namespace string // Providers represents the cloud provider's configurations. CloudProviders *datamodel.Providers // Gateway represents the gateway options. Gateway GatewayOptions // Identity represents identity of the environment. Identity *rpv1.IdentitySettings // KubernetesMetadata represents the Environment KubernetesMetadata extension. KubernetesMetadata *datamodel.KubeMetadataExtension }
EnvironmentOptions represents the options for the linked environment resource.
type GatewayOptions ¶
type MockRenderer ¶
type MockRenderer struct {
// contains filtered or unexported fields
}
MockRenderer is a mock of Renderer interface.
func NewMockRenderer ¶
func NewMockRenderer(ctrl *gomock.Controller) *MockRenderer
NewMockRenderer creates a new mock instance.
func (*MockRenderer) EXPECT ¶
func (m *MockRenderer) EXPECT() *MockRendererMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockRenderer) GetDependencyIDs ¶
func (m *MockRenderer) GetDependencyIDs(arg0 context.Context, arg1 v1.DataModelInterface) ([]resources.ID, []resources.ID, error)
GetDependencyIDs mocks base method.
func (*MockRenderer) Render ¶
func (m *MockRenderer) Render(arg0 context.Context, arg1 v1.DataModelInterface, arg2 RenderOptions) (RendererOutput, error)
Render mocks base method.
type MockRendererMockRecorder ¶
type MockRendererMockRecorder struct {
// contains filtered or unexported fields
}
MockRendererMockRecorder is the mock recorder for MockRenderer.
func (*MockRendererMockRecorder) GetDependencyIDs ¶
func (mr *MockRendererMockRecorder) GetDependencyIDs(arg0, arg1 interface{}) *gomock.Call
GetDependencyIDs indicates an expected call of GetDependencyIDs.
func (*MockRendererMockRecorder) Render ¶
func (mr *MockRendererMockRecorder) Render(arg0, arg1, arg2 interface{}) *gomock.Call
Render indicates an expected call of Render.
type RenderOptions ¶
type RenderOptions struct { Dependencies map[string]RendererDependency Environment EnvironmentOptions Application ApplicationOptions }
type Renderer ¶
type Renderer interface { GetDependencyIDs(ctx context.Context, resource v1.DataModelInterface) (radiusResourceIDs []resources.ID, azureResourceIDs []resources.ID, err error) Render(ctx context.Context, resource v1.DataModelInterface, options RenderOptions) (RendererOutput, error) }
type RendererDependency ¶
type RendererDependency struct { // ResourceID is the resource ID of the Radius resource that is the dependency. ResourceID resources.ID // Resource is the datamodel of depedency resource. Resource v1.DataModelInterface // ComputedValues is a map of the computed values and secrets of the dependency. ComputedValues map[string]any // OutputResources is a map of the output resource IDs of the dependency. The map is keyed on the LocalID of the output resource. OutputResources map[string]resources.ID }
Represents a dependency of the resource currently being rendered. Currently dependencies are always Radius resources.
type RendererOutput ¶
type RendererOutput struct { Resources []rpv1.OutputResource ComputedValues map[string]rpv1.ComputedValueReference SecretValues map[string]rpv1.SecretValueReference // RadiusResource is the original Radius resource model. RadiusResource v1.DataModelInterface }