Documentation ¶
Index ¶
- type DataInputBuilder
- type WebhookCertSubjectBuilder
- type WebhookDataInputBuilder
- func (b *WebhookDataInputBuilder) PrepareApplicationAndAppTemplateWithLabels(ctx context.Context, tenant, appID string) (*webhook.ApplicationWithLabels, *webhook.ApplicationTemplateWithLabels, error)
- func (b *WebhookDataInputBuilder) PrepareApplicationMappingsInFormation(ctx context.Context, tenant string, scenario string) (map[string]*webhook.ApplicationWithLabels, ...)
- func (b *WebhookDataInputBuilder) PrepareRuntimeAndRuntimeContextWithLabels(ctx context.Context, tenant, runtimeID string) (*webhook.RuntimeWithLabels, *webhook.RuntimeContextWithLabels, error)
- func (b *WebhookDataInputBuilder) PrepareRuntimeContextWithLabels(ctx context.Context, tenant, runtimeCtxID string) (*webhook.RuntimeContextWithLabels, error)
- func (b *WebhookDataInputBuilder) PrepareRuntimeWithLabels(ctx context.Context, tenant, runtimeID string) (*webhook.RuntimeWithLabels, error)
- func (b *WebhookDataInputBuilder) PrepareRuntimesAndRuntimeContextsMappingsInFormation(ctx context.Context, tenant string, scenario string) (map[string]*webhook.RuntimeWithLabels, ...)
- type WebhookLabelBuilder
- func (b *WebhookLabelBuilder) GetLabelsForObject(ctx context.Context, tenant, objectID string, objectType model.LabelableObject) (map[string]string, error)
- func (b *WebhookLabelBuilder) GetLabelsForObjects(ctx context.Context, tenant string, objectIDs []string, ...) (map[string]map[string]string, error)
- type WebhookTenantBuilder
- func (b *WebhookTenantBuilder) GetTenantForApplicationTemplate(ctx context.Context, tenant string, labels map[string]string) (*webhook.TenantWithLabels, error)
- func (b *WebhookTenantBuilder) GetTenantForObject(ctx context.Context, objectID string, resourceType resource.Type) (*webhook.TenantWithLabels, error)
- func (b *WebhookTenantBuilder) GetTenantsForApplicationTemplates(ctx context.Context, tenant string, labels map[string]map[string]string, ...) (map[string]*webhook.TenantWithLabels, error)
- func (b *WebhookTenantBuilder) GetTenantsForObjects(ctx context.Context, tenant string, objectIDs []string, ...) (map[string]*webhook.TenantWithLabels, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataInputBuilder ¶
type DataInputBuilder interface { PrepareApplicationAndAppTemplateWithLabels(ctx context.Context, tenant, appID string) (*webhook.ApplicationWithLabels, *webhook.ApplicationTemplateWithLabels, error) PrepareRuntimeWithLabels(ctx context.Context, tenant, runtimeID string) (*webhook.RuntimeWithLabels, error) PrepareRuntimeContextWithLabels(ctx context.Context, tenant, runtimeCtxID string) (*webhook.RuntimeContextWithLabels, error) PrepareRuntimeAndRuntimeContextWithLabels(ctx context.Context, tenant, runtimeID string) (*webhook.RuntimeWithLabels, *webhook.RuntimeContextWithLabels, error) PrepareRuntimesAndRuntimeContextsMappingsInFormation(ctx context.Context, tenant string, scenario string) (map[string]*webhook.RuntimeWithLabels, map[string]*webhook.RuntimeContextWithLabels, error) PrepareApplicationMappingsInFormation(ctx context.Context, tenant string, scenario string) (map[string]*webhook.ApplicationWithLabels, map[string]*webhook.ApplicationTemplateWithLabels, error) }
DataInputBuilder is responsible to prepare and build different entity data needed for a webhook input
type WebhookCertSubjectBuilder ¶
type WebhookCertSubjectBuilder struct {
// contains filtered or unexported fields
}
WebhookCertSubjectBuilder takes care to get and build trust details for objects
func NewWebhookCertSubjectBuilder ¶
func NewWebhookCertSubjectBuilder(certSubjectRepository certSubjectRepository) *WebhookCertSubjectBuilder
NewWebhookCertSubjectBuilder creates a WebhookCertSubjectBuilder
func (*WebhookCertSubjectBuilder) GetTrustDetailsForObject ¶
func (b *WebhookCertSubjectBuilder) GetTrustDetailsForObject(ctx context.Context, objectID string) (*webhook.TrustDetails, error)
GetTrustDetailsForObject builds trust details for objects with ID objectID
func (*WebhookCertSubjectBuilder) GetTrustDetailsForObjects ¶
func (b *WebhookCertSubjectBuilder) GetTrustDetailsForObjects(ctx context.Context, objectIDs []string) (map[string]*webhook.TrustDetails, error)
GetTrustDetailsForObjects builds trust details for objects with IDs objectIDs
type WebhookDataInputBuilder ¶
type WebhookDataInputBuilder struct {
// contains filtered or unexported fields
}
WebhookDataInputBuilder take cares to get and build different webhook input data such as application, runtime, runtime contexts
func NewWebhookDataInputBuilder ¶
func NewWebhookDataInputBuilder(applicationRepository applicationRepository, applicationTemplateRepository applicationTemplateRepository, runtimeRepo runtimeRepository, runtimeContextRepo runtimeContextRepository, labelInputBuilder labelInputBuilder, tenantInputBuilder tenantInputBuilder, certSubjectInputBuilder certSubjectInputBuilder) *WebhookDataInputBuilder
NewWebhookDataInputBuilder creates a WebhookDataInputBuilder
func (*WebhookDataInputBuilder) PrepareApplicationAndAppTemplateWithLabels ¶
func (b *WebhookDataInputBuilder) PrepareApplicationAndAppTemplateWithLabels(ctx context.Context, tenant, appID string) (*webhook.ApplicationWithLabels, *webhook.ApplicationTemplateWithLabels, error)
PrepareApplicationAndAppTemplateWithLabels construct ApplicationWithLabels and ApplicationTemplateWithLabels based on tenant and ID
func (*WebhookDataInputBuilder) PrepareApplicationMappingsInFormation ¶
func (b *WebhookDataInputBuilder) PrepareApplicationMappingsInFormation(ctx context.Context, tenant string, scenario string) (map[string]*webhook.ApplicationWithLabels, map[string]*webhook.ApplicationTemplateWithLabels, error)
PrepareApplicationMappingsInFormation constructs: map from application ID to ApplicationWithLabels with entries for each application part of the formation map from applicationTemplate ID to ApplicationTemplateWithLabels with entries for each application template whose child application is part of the formation
func (*WebhookDataInputBuilder) PrepareRuntimeAndRuntimeContextWithLabels ¶
func (b *WebhookDataInputBuilder) PrepareRuntimeAndRuntimeContextWithLabels(ctx context.Context, tenant, runtimeID string) (*webhook.RuntimeWithLabels, *webhook.RuntimeContextWithLabels, error)
PrepareRuntimeAndRuntimeContextWithLabels construct RuntimeWithLabels and RuntimeContextWithLabels based on tenant and runtimeID
func (*WebhookDataInputBuilder) PrepareRuntimeContextWithLabels ¶
func (b *WebhookDataInputBuilder) PrepareRuntimeContextWithLabels(ctx context.Context, tenant, runtimeCtxID string) (*webhook.RuntimeContextWithLabels, error)
PrepareRuntimeContextWithLabels construct RuntimeContextWithLabels based on tenant and runtimeCtxID
func (*WebhookDataInputBuilder) PrepareRuntimeWithLabels ¶
func (b *WebhookDataInputBuilder) PrepareRuntimeWithLabels(ctx context.Context, tenant, runtimeID string) (*webhook.RuntimeWithLabels, error)
PrepareRuntimeWithLabels construct RuntimeWithLabels based on tenant and runtimeID
func (*WebhookDataInputBuilder) PrepareRuntimesAndRuntimeContextsMappingsInFormation ¶
func (b *WebhookDataInputBuilder) PrepareRuntimesAndRuntimeContextsMappingsInFormation(ctx context.Context, tenant string, scenario string) (map[string]*webhook.RuntimeWithLabels, map[string]*webhook.RuntimeContextWithLabels, error)
PrepareRuntimesAndRuntimeContextsMappingsInFormation constructs: map from runtime ID to RuntimeWithLabels with entries for each runtime part of the formation and for each runtime whose child runtime context is part of the formation map from parent runtime ID to RuntimeContextWithLabels with entries for all runtime contexts part of the formation.
type WebhookLabelBuilder ¶
type WebhookLabelBuilder struct {
// contains filtered or unexported fields
}
WebhookLabelBuilder takes care to get and build labels for objects
func NewWebhookLabelBuilder ¶
func NewWebhookLabelBuilder(labelRepository labelRepository) *WebhookLabelBuilder
NewWebhookLabelBuilder creates a WebhookLabelBuilder
func (*WebhookLabelBuilder) GetLabelsForObject ¶
func (b *WebhookLabelBuilder) GetLabelsForObject(ctx context.Context, tenant, objectID string, objectType model.LabelableObject) (map[string]string, error)
GetLabelsForObject builds labels for object with ID objectID
func (*WebhookLabelBuilder) GetLabelsForObjects ¶
func (b *WebhookLabelBuilder) GetLabelsForObjects(ctx context.Context, tenant string, objectIDs []string, objectType model.LabelableObject) (map[string]map[string]string, error)
GetLabelsForObjects builds labels for objects with IDs objectIDs
type WebhookTenantBuilder ¶
type WebhookTenantBuilder struct {
// contains filtered or unexported fields
}
WebhookTenantBuilder takes care to get and build tenants and their labels for objects
func NewWebhookTenantBuilder ¶
func NewWebhookTenantBuilder(labelInputBuilder labelInputBuilder, tenantRepository tenantRepository) *WebhookTenantBuilder
NewWebhookTenantBuilder creates a WebhookTenantBuilder
func (*WebhookTenantBuilder) GetTenantForApplicationTemplate ¶
func (b *WebhookTenantBuilder) GetTenantForApplicationTemplate(ctx context.Context, tenant string, labels map[string]string) (*webhook.TenantWithLabels, error)
GetTenantForApplicationTemplate builds tenant with labels for application template
func (*WebhookTenantBuilder) GetTenantForObject ¶
func (b *WebhookTenantBuilder) GetTenantForObject(ctx context.Context, objectID string, resourceType resource.Type) (*webhook.TenantWithLabels, error)
GetTenantForObject builds tenant with labels for object of type runtime, runtime context or application
func (*WebhookTenantBuilder) GetTenantsForApplicationTemplates ¶
func (b *WebhookTenantBuilder) GetTenantsForApplicationTemplates(ctx context.Context, tenant string, labels map[string]map[string]string, objectIDs []string) (map[string]*webhook.TenantWithLabels, error)
GetTenantsForApplicationTemplates builds tenants with labels for application templates
func (*WebhookTenantBuilder) GetTenantsForObjects ¶
func (b *WebhookTenantBuilder) GetTenantsForObjects(ctx context.Context, tenant string, objectIDs []string, resourceType resource.Type) (map[string]*webhook.TenantWithLabels, error)
GetTenantsForObjects builds tenants with labels for objects of type runtime, runtime context or application