Documentation ¶
Index ¶
- func NewConverter(authConverter AuthConverter) *converter
- func NewRepository(conv EntityConverter) *repository
- func NewService(repo WebhookRepository, appRepo ApplicationRepository, uidSvc UIDService, ...) *service
- type ApplicationRepository
- type ApplicationService
- type ApplicationTemplateService
- type AuthConverter
- type Collection
- type Entity
- type EntityConverter
- type OwningResource
- type Resolver
- func (r *Resolver) AddWebhook(ctx context.Context, applicationID *string, applicationTemplateID *string, ...) (*graphql.Webhook, error)
- func (r *Resolver) DeleteWebhook(ctx context.Context, webhookID string) (*graphql.Webhook, error)
- func (r *Resolver) UpdateWebhook(ctx context.Context, webhookID string, in graphql.WebhookInput) (*graphql.Webhook, error)
- type TenantService
- type UIDService
- type WebhookConverter
- type WebhookRepository
- type WebhookService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewConverter ¶
func NewConverter(authConverter AuthConverter) *converter
NewConverter missing godoc
func NewRepository ¶
func NewRepository(conv EntityConverter) *repository
NewRepository missing godoc
func NewService ¶
func NewService(repo WebhookRepository, appRepo ApplicationRepository, uidSvc UIDService, tenantSvc TenantService, tenantMappingConfig map[string]interface{}, tenantMappingCallbackURL string) *service
NewService missing godoc
Types ¶
type ApplicationRepository ¶
type ApplicationRepository interface {
GetGlobalByID(ctx context.Context, id string) (*model.Application, error)
}
ApplicationRepository missing godoc
type ApplicationService ¶
ApplicationService missing godoc
type ApplicationTemplateService ¶
ApplicationTemplateService missing godoc
type AuthConverter ¶
type AuthConverter interface { ToGraphQL(in *model.Auth) (*graphql.Auth, error) InputFromGraphQL(in *graphql.AuthInput) (*model.AuthInput, error) }
AuthConverter missing godoc
type Collection ¶
type Collection []Entity
Collection is a collection of webhook entities.
func (Collection) Len ¶
func (c Collection) Len() int
Len returns the number of entities in the collection.
type Entity ¶
type Entity struct { ID string `db:"id"` ApplicationID sql.NullString `db:"app_id"` ApplicationTemplateID sql.NullString `db:"app_template_id"` RuntimeID sql.NullString `db:"runtime_id"` IntegrationSystemID sql.NullString `db:"integration_system_id"` FormationTemplateID sql.NullString `db:"formation_template_id"` CollectionIDKey sql.NullString `db:"correlation_id_key"` Type string `db:"type"` Mode sql.NullString `db:"mode"` URL sql.NullString `db:"url"` ProxyURL sql.NullString `db:"proxy_url"` Auth sql.NullString `db:"auth"` RetryInterval sql.NullInt32 `db:"retry_interval"` Timeout sql.NullInt32 `db:"timeout"` URLTemplate sql.NullString `db:"url_template"` InputTemplate sql.NullString `db:"input_template"` HeaderTemplate sql.NullString `db:"header_template"` OutputTemplate sql.NullString `db:"output_template"` StatusTemplate sql.NullString `db:"status_template"` CreatedAt *time.Time `db:"created_at"` }
Entity is a webhook entity.
func (*Entity) DecorateWithTenantID ¶
DecorateWithTenantID decorates the entity with the given tenant ID.
type EntityConverter ¶
type EntityConverter interface { FromEntity(in *Entity) (*model.Webhook, error) ToEntity(in *model.Webhook) (*Entity, error) }
EntityConverter missing godoc
type Resolver ¶
type Resolver struct {
// contains filtered or unexported fields
}
Resolver missing godoc
func NewResolver ¶
func NewResolver(transact persistence.Transactioner, webhookSvc WebhookService, applicationService ApplicationService, appTemplateService ApplicationTemplateService, runtimeService runtimeService, formationTemplateService formationTemplateService, webhookConverter WebhookConverter) *Resolver
NewResolver missing godoc
func (*Resolver) AddWebhook ¶
func (r *Resolver) AddWebhook(ctx context.Context, applicationID *string, applicationTemplateID *string, runtimeID *string, formationTemplateID *string, in graphql.WebhookInput) (*graphql.Webhook, error)
AddWebhook missing godoc
func (*Resolver) DeleteWebhook ¶
DeleteWebhook missing godoc
type TenantService ¶
type TenantService interface {
ExtractTenantIDForTenantScopedFormationTemplates(ctx context.Context) (string, error)
}
TenantService is responsible for service-layer tenant operations
type WebhookConverter ¶
type WebhookConverter interface { ToGraphQL(in *model.Webhook) (*graphql.Webhook, error) MultipleToGraphQL(in []*model.Webhook) ([]*graphql.Webhook, error) InputFromGraphQL(in *graphql.WebhookInput) (*model.WebhookInput, error) MultipleInputFromGraphQL(in []*graphql.WebhookInput) ([]*model.WebhookInput, error) }
WebhookConverter missing godoc
type WebhookRepository ¶
type WebhookRepository interface { GetByID(ctx context.Context, tenant, id string, objectType model.WebhookReferenceObjectType) (*model.Webhook, error) GetByIDGlobal(ctx context.Context, id string) (*model.Webhook, error) GetByIDAndWebhookTypeGlobal(ctx context.Context, objectID string, objectType model.WebhookReferenceObjectType, webhookType model.WebhookType) (*model.Webhook, error) ListByReferenceObjectID(ctx context.Context, tenant, objID string, objType model.WebhookReferenceObjectType) ([]*model.Webhook, error) ListByReferenceObjectIDGlobal(ctx context.Context, objID string, objType model.WebhookReferenceObjectType) ([]*model.Webhook, error) ListByWebhookType(ctx context.Context, webhookType model.WebhookType) ([]*model.Webhook, error) ListByTypeAndLabelFilter(ctx context.Context, webhookType model.WebhookType, filter []*labelfilter.LabelFilter) ([]*model.Webhook, error) ListByApplicationTemplateID(ctx context.Context, applicationTemplateID string) ([]*model.Webhook, error) Create(ctx context.Context, tenant string, item *model.Webhook) error Update(ctx context.Context, tenant string, item *model.Webhook) error Delete(ctx context.Context, id string) error }
WebhookRepository missing godoc
type WebhookService ¶
type WebhookService interface { Get(ctx context.Context, id string, objectType model.WebhookReferenceObjectType) (*model.Webhook, error) GetByIDAndWebhookTypeGlobal(ctx context.Context, objectID string, objectType model.WebhookReferenceObjectType, webhookType model.WebhookType) (*model.Webhook, error) ListAllApplicationWebhooks(ctx context.Context, applicationID string) ([]*model.Webhook, error) ListForRuntime(ctx context.Context, runtimeID string) ([]*model.Webhook, error) ListForApplication(ctx context.Context, applicationID string) ([]*model.Webhook, error) ListForApplicationGlobal(ctx context.Context, applicationID string) ([]*model.Webhook, error) ListForApplicationTemplate(ctx context.Context, applicationTemplateID string) ([]*model.Webhook, error) ListByWebhookType(ctx context.Context, webhookType model.WebhookType) ([]*model.Webhook, error) EnrichWebhooksWithTenantMappingWebhooks(in []*graphql.WebhookInput) ([]*graphql.WebhookInput, error) Create(ctx context.Context, resourceID string, in model.WebhookInput, objectType model.WebhookReferenceObjectType) (string, error) Update(ctx context.Context, id string, in model.WebhookInput, objectType model.WebhookReferenceObjectType) error Delete(ctx context.Context, id string, objectType model.WebhookReferenceObjectType) error }
WebhookService missing godoc