Documentation ¶
Index ¶
- Constants
- func NewConverter(webhook WebhookConverter) *converter
- func NewRepository(conv EntityConverter) *pgRepository
- func NewService(repo runtimeRepository, labelRepo labelRepository, labelService labelService, ...) *service
- type BundleInstanceAuthService
- type EntityConverter
- type EventingService
- type OAuth20Service
- type Resolver
- func (r *Resolver) Auths(ctx context.Context, obj *graphql.Runtime) ([]*graphql.RuntimeSystemAuth, error)
- func (r *Resolver) DeleteRuntime(ctx context.Context, id string) (*graphql.Runtime, error)
- func (r *Resolver) DeleteRuntimeLabel(ctx context.Context, runtimeID string, key string) (*graphql.Label, error)
- func (r *Resolver) EventingConfiguration(ctx context.Context, obj *graphql.Runtime) (*graphql.RuntimeEventingConfiguration, error)
- func (r *Resolver) GetLabel(ctx context.Context, runtimeID string, key string) (*graphql.Labels, error)
- func (r *Resolver) Labels(ctx context.Context, obj *graphql.Runtime, key *string) (graphql.Labels, error)
- func (r *Resolver) RegisterRuntime(ctx context.Context, in graphql.RuntimeRegisterInput) (*graphql.Runtime, error)
- func (r *Resolver) Runtime(ctx context.Context, id string) (*graphql.Runtime, error)
- func (r *Resolver) RuntimeByTokenIssuer(ctx context.Context, issuer string) (*graphql.Runtime, error)
- func (r *Resolver) RuntimeContext(ctx context.Context, obj *graphql.Runtime, id string) (*graphql.RuntimeContext, error)
- func (r *Resolver) RuntimeContexts(ctx context.Context, obj *graphql.Runtime, first *int, ...) (*graphql.RuntimeContextPage, error)
- func (r *Resolver) RuntimeContextsDataLoader(keys []dataloader.ParamRuntimeContext) ([]*graphql.RuntimeContextPage, []error)
- func (r *Resolver) Runtimes(ctx context.Context, filter []*graphql.LabelFilter, first *int, ...) (*graphql.RuntimePage, error)
- func (r *Resolver) SetRuntimeLabel(ctx context.Context, runtimeID string, key string, value interface{}) (*graphql.Label, error)
- func (r *Resolver) UpdateRuntime(ctx context.Context, id string, in graphql.RuntimeUpdateInput) (*graphql.Runtime, error)
- func (r *Resolver) Webhooks(ctx context.Context, obj *graphql.Runtime) ([]*graphql.Webhook, error)
- type Runtime
- type RuntimeCollection
- type RuntimeContextConverter
- type RuntimeContextService
- type RuntimeConverter
- type RuntimeService
- type ScenarioAssignmentService
- type ScenariosFilterSanitizer
- type SelfRegisterManager
- type SubscriptionService
- type SystemAuthConverter
- type SystemAuthService
- type TenantFetcher
- type WebhookConverter
- type WebhookService
Constants ¶
const ( // IsNormalizedLabel represents the label that is used to mark a runtime as normalized IsNormalizedLabel = "isNormalized" // RegionLabelKey is the key of the tenant label for region. RegionLabelKey = "region" )
Variables ¶
This section is empty.
Functions ¶
func NewConverter ¶
func NewConverter(webhook WebhookConverter) *converter
NewConverter missing godoc
func NewRepository ¶
func NewRepository(conv EntityConverter) *pgRepository
NewRepository missing godoc
func NewService ¶
func NewService(repo runtimeRepository, labelRepo labelRepository, labelService labelService, uidService uidService, formationService formationService, tenantService tenantService, webhookService WebhookService, runtimeContextService RuntimeContextService, protectedLabelPattern, immutableLabelPattern, runtimeTypeLabelKey, kymaRuntimeTypeLabelValue, kymaApplicationNamespaceValue, kymaAdapterWebhookMode, kymaAdapterWebhookType, kymaAdapterWebhookURLTemplate, kymaAdapterWebhookInputTemplate, kymaAdapterWebhookHeaderTemplate, kymaAdapterWebhookOutputTemplate string) *service
NewService missing godoc
Types ¶
type BundleInstanceAuthService ¶
type BundleInstanceAuthService interface { ListByRuntimeID(ctx context.Context, runtimeID string) ([]*model.BundleInstanceAuth, error) Update(ctx context.Context, instanceAuth *model.BundleInstanceAuth) error }
BundleInstanceAuthService missing godoc
type EntityConverter ¶
type EntityConverter interface { ToEntity(in *model.Runtime) (*Runtime, error) FromEntity(entity *Runtime) *model.Runtime }
EntityConverter missing godoc
type EventingService ¶
type EventingService interface {
GetForRuntime(ctx context.Context, runtimeID uuid.UUID) (*model.RuntimeEventingConfiguration, error)
}
EventingService missing godoc
type OAuth20Service ¶
type OAuth20Service interface {
DeleteMultipleClientCredentials(ctx context.Context, auths []pkgmodel.SystemAuth) error
}
OAuth20Service missing godoc
type Resolver ¶
type Resolver struct {
// contains filtered or unexported fields
}
Resolver missing godoc
func NewResolver ¶
func NewResolver(transact persistence.Transactioner, runtimeService RuntimeService, scenarioAssignmentService ScenarioAssignmentService, sysAuthSvc SystemAuthService, oAuthSvc OAuth20Service, conv RuntimeConverter, sysAuthConv SystemAuthConverter, eventingSvc EventingService, bundleInstanceAuthSvc BundleInstanceAuthService, selfRegManager SelfRegisterManager, uidService uidService, subscriptionSvc SubscriptionService, runtimeContextService RuntimeContextService, runtimeContextConverter RuntimeContextConverter, webhookService WebhookService, webhookConverter WebhookConverter, fetcher TenantFetcher, formationSvc formationService, tenantSvc tenantSvc, asaEngine asaEngine) *Resolver
NewResolver missing godoc
func (*Resolver) Auths ¶
func (r *Resolver) Auths(ctx context.Context, obj *graphql.Runtime) ([]*graphql.RuntimeSystemAuth, error)
Auths missing godoc
func (*Resolver) DeleteRuntime ¶
DeleteRuntime missing godoc
func (*Resolver) DeleteRuntimeLabel ¶
func (r *Resolver) DeleteRuntimeLabel(ctx context.Context, runtimeID string, key string) (*graphql.Label, error)
DeleteRuntimeLabel missing godoc
func (*Resolver) EventingConfiguration ¶
func (r *Resolver) EventingConfiguration(ctx context.Context, obj *graphql.Runtime) (*graphql.RuntimeEventingConfiguration, error)
EventingConfiguration missing godoc
func (*Resolver) GetLabel ¶
func (r *Resolver) GetLabel(ctx context.Context, runtimeID string, key string) (*graphql.Labels, error)
GetLabel missing godoc
func (*Resolver) Labels ¶
func (r *Resolver) Labels(ctx context.Context, obj *graphql.Runtime, key *string) (graphql.Labels, error)
Labels missing godoc
func (*Resolver) RegisterRuntime ¶
func (r *Resolver) RegisterRuntime(ctx context.Context, in graphql.RuntimeRegisterInput) (*graphql.Runtime, error)
RegisterRuntime missing godoc
func (*Resolver) RuntimeByTokenIssuer ¶
func (r *Resolver) RuntimeByTokenIssuer(ctx context.Context, issuer string) (*graphql.Runtime, error)
RuntimeByTokenIssuer returns a Runtime by a token issuer
func (*Resolver) RuntimeContext ¶
func (r *Resolver) RuntimeContext(ctx context.Context, obj *graphql.Runtime, id string) (*graphql.RuntimeContext, error)
RuntimeContext missing godoc
func (*Resolver) RuntimeContexts ¶
func (r *Resolver) RuntimeContexts(ctx context.Context, obj *graphql.Runtime, first *int, after *graphql.PageCursor) (*graphql.RuntimeContextPage, error)
RuntimeContexts retrieves a page of RuntimeContexts for the specified Runtime
func (*Resolver) RuntimeContextsDataLoader ¶
func (r *Resolver) RuntimeContextsDataLoader(keys []dataloader.ParamRuntimeContext) ([]*graphql.RuntimeContextPage, []error)
RuntimeContextsDataLoader retrieves a page of RuntimeContexts for each Runtime ID in the keys argument
func (*Resolver) Runtimes ¶
func (r *Resolver) Runtimes(ctx context.Context, filter []*graphql.LabelFilter, first *int, after *graphql.PageCursor) (*graphql.RuntimePage, error)
Runtimes missing godoc TODO: Proper error handling
func (*Resolver) SetRuntimeLabel ¶
func (r *Resolver) SetRuntimeLabel(ctx context.Context, runtimeID string, key string, value interface{}) (*graphql.Label, error)
SetRuntimeLabel missing godoc
type Runtime ¶
type Runtime struct { ID string `db:"id"` Name string `db:"name"` Description sql.NullString `db:"description"` StatusCondition string `db:"status_condition"` StatusTimestamp time.Time `db:"status_timestamp"` CreationTimestamp time.Time `db:"creation_timestamp"` ApplicationNamespace sql.NullString `db:"application_namespace"` }
Runtime struct represents database entity for Runtime
func (*Runtime) DecorateWithTenantID ¶
DecorateWithTenantID decorates the entity with the given tenant ID.
type RuntimeContextConverter ¶
type RuntimeContextConverter interface { ToGraphQL(in *model.RuntimeContext) *graphql.RuntimeContext MultipleToGraphQL(in []*model.RuntimeContext) []*graphql.RuntimeContext }
RuntimeContextConverter missing godoc
type RuntimeContextService ¶
type RuntimeContextService interface { GetForRuntime(ctx context.Context, id, runtimeID string) (*model.RuntimeContext, error) ListByRuntimeIDs(ctx context.Context, runtimeIDs []string, pageSize int, cursor string) ([]*model.RuntimeContextPage, error) ListAllForRuntime(ctx context.Context, runtimeID string) ([]*model.RuntimeContext, error) Delete(ctx context.Context, id string) error }
RuntimeContextService missing godoc
type RuntimeConverter ¶
type RuntimeConverter interface { ToGraphQL(in *model.Runtime) *graphql.Runtime MultipleToGraphQL(in []*model.Runtime) []*graphql.Runtime RegisterInputFromGraphQL(in graphql.RuntimeRegisterInput) (model.RuntimeRegisterInput, error) UpdateInputFromGraphQL(in graphql.RuntimeUpdateInput) model.RuntimeUpdateInput }
RuntimeConverter missing godoc
type RuntimeService ¶
type RuntimeService interface { CreateWithMandatoryLabels(ctx context.Context, in model.RuntimeRegisterInput, id string, mandatoryLabels map[string]interface{}) error Update(ctx context.Context, id string, in model.RuntimeUpdateInput) error Get(ctx context.Context, id string) (*model.Runtime, error) GetByTokenIssuer(ctx context.Context, issuer string) (*model.Runtime, error) GetByFilters(ctx context.Context, filters []*labelfilter.LabelFilter) (*model.Runtime, error) Delete(ctx context.Context, id string) error List(ctx context.Context, filter []*labelfilter.LabelFilter, pageSize int, cursor string) (*model.RuntimePage, error) SetLabel(ctx context.Context, label *model.LabelInput) error GetLabel(ctx context.Context, runtimeID string, key string) (*model.Label, error) ListLabels(ctx context.Context, runtimeID string) (map[string]*model.Label, error) DeleteLabel(ctx context.Context, runtimeID string, key string) error UnsafeExtractModifiableLabels(labels map[string]interface{}) (map[string]interface{}, error) }
RuntimeService missing godoc
type ScenarioAssignmentService ¶
type ScenarioAssignmentService interface { GetForScenarioName(ctx context.Context, scenarioName string) (*model.AutomaticScenarioAssignment, error) ListForScenarioNames(ctx context.Context, scenarioNames []string) ([]*model.AutomaticScenarioAssignment, error) }
ScenarioAssignmentService missing godoc
type ScenariosFilterSanitizer ¶
type ScenariosFilterSanitizer interface {
RemoveScenarioFilter(ctx context.Context, tenant string, filters []*labelfilter.LabelFilter, objectType model.FormationAssignmentType, isGlobal bool, listerFunc filtersanitizer.ObjectIDListerFunc, globalListerFunc filtersanitizer.ObjectIDListerFuncGlobal) (bool, []string, []*labelfilter.LabelFilter, error)
}
ScenariosFilterSanitizer missing godoc
type SelfRegisterManager ¶
type SelfRegisterManager interface { PrepareForSelfRegistration(ctx context.Context, resourceType resource.Type, labels map[string]interface{}, id string, validate func() error) (map[string]interface{}, error) CleanupSelfRegistration(ctx context.Context, selfRegisterLabelValue, region string) error GetSelfRegDistinguishingLabelKey() string }
SelfRegisterManager missing godoc
type SubscriptionService ¶
type SubscriptionService interface { SubscribeTenantToRuntime(ctx context.Context, providerID, subaccountTenantID, providerSubaccountID, consumerTenantID, region, subscriptionAppName, subscriptionID string) (bool, error) UnsubscribeTenantFromRuntime(ctx context.Context, providerID, subaccountTenantID, providerSubaccountID, consumerTenantID, region, subscriptionID string) (bool, error) }
SubscriptionService is responsible for service layer operations for subscribing a tenant to a runtime
type SystemAuthConverter ¶
type SystemAuthConverter interface {
ToGraphQL(in *pkgmodel.SystemAuth) (graphql.SystemAuth, error)
}
SystemAuthConverter missing godoc
type SystemAuthService ¶
type SystemAuthService interface {
ListForObject(ctx context.Context, objectType pkgmodel.SystemAuthReferenceObjectType, objectID string) ([]pkgmodel.SystemAuth, error)
}
SystemAuthService missing godoc
type TenantFetcher ¶
type TenantFetcher interface {
FetchOnDemand(ctx context.Context, tenant, parentTenant string) error
}
TenantFetcher calls an API which fetches details for the given tenant from an external tenancy service, stores the tenant in the Compass DB and returns 200 OK if the tenant was successfully created.
type WebhookConverter ¶
type WebhookConverter interface { MultipleToGraphQL(in []*model.Webhook) ([]*graphql.Webhook, error) MultipleInputFromGraphQL(in []*graphql.WebhookInput) ([]*model.WebhookInput, error) }
WebhookConverter missing godoc
type WebhookService ¶
type WebhookService interface { ListForRuntime(ctx context.Context, runtimeID string) ([]*model.Webhook, error) Create(ctx context.Context, owningResourceID string, in model.WebhookInput, objectType model.WebhookReferenceObjectType) (string, error) }
WebhookService missing godoc