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 MockRendererGetDependencyIDsCall
 - func (c *MockRendererGetDependencyIDsCall) Do(...) *MockRendererGetDependencyIDsCall
 - func (c *MockRendererGetDependencyIDsCall) DoAndReturn(...) *MockRendererGetDependencyIDsCall
 - func (c *MockRendererGetDependencyIDsCall) Return(arg0, arg1 []resources.ID, arg2 error) *MockRendererGetDependencyIDsCall
 
- type MockRendererMockRecorder
 - type MockRendererRenderCall
 - 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
	// Simulated represents whether the environment is a simulated environment.
	Simulated bool
}
    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 MockRendererGetDependencyIDsCall ¶ added in v0.35.0
MockRendererGetDependencyIDsCall wrap *gomock.Call
func (*MockRendererGetDependencyIDsCall) Do ¶ added in v0.35.0
func (c *MockRendererGetDependencyIDsCall) Do(f func(context.Context, v1.DataModelInterface) ([]resources.ID, []resources.ID, error)) *MockRendererGetDependencyIDsCall
Do rewrite *gomock.Call.Do
func (*MockRendererGetDependencyIDsCall) DoAndReturn ¶ added in v0.35.0
func (c *MockRendererGetDependencyIDsCall) DoAndReturn(f func(context.Context, v1.DataModelInterface) ([]resources.ID, []resources.ID, error)) *MockRendererGetDependencyIDsCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockRendererGetDependencyIDsCall) Return ¶ added in v0.35.0
func (c *MockRendererGetDependencyIDsCall) Return(arg0, arg1 []resources.ID, arg2 error) *MockRendererGetDependencyIDsCall
Return rewrite *gomock.Call.Return
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 any) *MockRendererGetDependencyIDsCall
GetDependencyIDs indicates an expected call of GetDependencyIDs.
func (*MockRendererMockRecorder) Render ¶
func (mr *MockRendererMockRecorder) Render(arg0, arg1, arg2 any) *MockRendererRenderCall
Render indicates an expected call of Render.
type MockRendererRenderCall ¶ added in v0.35.0
MockRendererRenderCall wrap *gomock.Call
func (*MockRendererRenderCall) Do ¶ added in v0.35.0
func (c *MockRendererRenderCall) Do(f func(context.Context, v1.DataModelInterface, RenderOptions) (RendererOutput, error)) *MockRendererRenderCall
Do rewrite *gomock.Call.Do
func (*MockRendererRenderCall) DoAndReturn ¶ added in v0.35.0
func (c *MockRendererRenderCall) DoAndReturn(f func(context.Context, v1.DataModelInterface, RenderOptions) (RendererOutput, error)) *MockRendererRenderCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockRendererRenderCall) Return ¶ added in v0.35.0
func (c *MockRendererRenderCall) Return(arg0 RendererOutput, arg1 error) *MockRendererRenderCall
Return rewrite *gomock.Call.Return
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 dependency 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
}