Documentation
¶
Index ¶
- func NewConverter(version VersionConverter, aspectConverter AspectConverter) *converter
- func NewRepository(conv IntegrationDependencyConverter) *pgRepository
- func NewService(repo IntegrationDependencyRepository, uidService UIDService) *service
- type ApplicationService
- type ApplicationTemplateService
- type AspectConverter
- type AspectEventResourceService
- type AspectService
- type Entity
- type IntegrationDepConverter
- type IntegrationDependencyCollection
- type IntegrationDependencyConverter
- type IntegrationDependencyRepository
- type IntegrationDependencyService
- type PackageService
- type Resolver
- type UIDService
- type VersionConverter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewConverter ¶
func NewConverter(version VersionConverter, aspectConverter AspectConverter) *converter
NewConverter returns a new Converter that can later be used to make the conversions between the service and repository layer representations of a Compass Integration Dependency.
func NewRepository ¶
func NewRepository(conv IntegrationDependencyConverter) *pgRepository
NewRepository returns a new entity responsible for repo-layer IntegrationDependencies operations.
func NewService ¶
func NewService(repo IntegrationDependencyRepository, uidService UIDService) *service
NewService returns a new object responsible for service-layer Integration Dependency operations.
Types ¶
type ApplicationService ¶
type ApplicationService interface {
Get(ctx context.Context, id string) (*model.Application, error)
}
ApplicationService is responsible for the service-layer Application operations.
type ApplicationTemplateService ¶
type ApplicationTemplateService interface {
Get(ctx context.Context, id string) (*model.ApplicationTemplate, error)
}
ApplicationTemplateService is responsible for the service-layer Application Template operations.
type AspectConverter ¶
type AspectConverter interface { MultipleToGraphQL(in []*model.Aspect, aspectEventResourcesByAspectID map[string][]*model.AspectEventResource) ([]*graphql.Aspect, error) MultipleInputFromGraphQL(in []*graphql.AspectInput) ([]*model.AspectInput, error) }
AspectConverter converts Aspects between the model.Aspect service-layer representation and the graphql-layer representation graphql.Aspect.
type AspectEventResourceService ¶
type AspectEventResourceService interface { Create(ctx context.Context, resourceType resource.Type, resourceID string, aspectID string, in model.AspectEventResourceInput) (string, error) ListByAspectID(ctx context.Context, aspectID string) ([]*model.AspectEventResource, error) }
AspectEventResourceService is responsible for the service-layer Aspect Event Resource operations.
type AspectService ¶
type AspectService interface { Create(ctx context.Context, resourceType resource.Type, resourceID string, integrationDependencyID string, in model.AspectInput) (string, error) ListByIntegrationDependencyID(ctx context.Context, integrationDependencyID string) ([]*model.Aspect, error) }
AspectService is responsible for the service-layer Aspect operations.
type Entity ¶
type Entity struct { ApplicationID sql.NullString `db:"app_id"` ApplicationTemplateVersionID sql.NullString `db:"app_template_version_id"` OrdID sql.NullString `db:"ord_id"` LocalTenantID sql.NullString `db:"local_tenant_id"` CorrelationIDs sql.NullString `db:"correlation_ids"` Title string `db:"title"` ShortDescription sql.NullString `db:"short_description"` Description sql.NullString `db:"description"` PackageID sql.NullString `db:"package_id"` LastUpdate sql.NullString `db:"last_update"` Visibility string `db:"visibility"` ReleaseStatus sql.NullString `db:"release_status"` SunsetDate sql.NullString `db:"sunset_date"` Successors sql.NullString `db:"successors"` Mandatory sql.NullBool `db:"mandatory"` RelatedIntegrationDependencies sql.NullString `db:"related_integration_dependencies"` Links sql.NullString `db:"links"` Tags sql.NullString `db:"tags"` Labels sql.NullString `db:"labels"` DocumentationLabels sql.NullString `db:"documentation_labels"` ResourceHash sql.NullString `db:"resource_hash"` *repo.BaseEntity version.Version }
Entity is a representation of an Integration Dependency in the database.
func (*Entity) DecorateWithTenantID ¶
DecorateWithTenantID decorates the entity with the given tenant ID.
type IntegrationDepConverter ¶
type IntegrationDepConverter interface { ToGraphQL(in *model.IntegrationDependency, aspects []*model.Aspect, aspectEventResourcesByAspectID map[string][]*model.AspectEventResource) (*graphql.IntegrationDependency, error) InputFromGraphQL(in *graphql.IntegrationDependencyInput) (*model.IntegrationDependencyInput, error) }
IntegrationDepConverter converts Integration Dependencies between the model.IntegrationDependency service-layer representation and the graphql-layer representation.
type IntegrationDependencyCollection ¶
type IntegrationDependencyCollection []Entity
IntegrationDependencyCollection is an array of Entities
func (IntegrationDependencyCollection) Len ¶
func (r IntegrationDependencyCollection) Len() int
Len returns the length of the collection
type IntegrationDependencyConverter ¶
type IntegrationDependencyConverter interface { FromEntity(entity *Entity) *model.IntegrationDependency ToEntity(integrationDependencyModel *model.IntegrationDependency) *Entity }
IntegrationDependencyConverter converts IntegrationDependencies between the model.IntegrationDependency service-layer representation and the repo-layer representation Entity.
type IntegrationDependencyRepository ¶
type IntegrationDependencyRepository interface { GetByID(ctx context.Context, tenantID, id string) (*model.IntegrationDependency, error) GetByIDGlobal(ctx context.Context, id string) (*model.IntegrationDependency, error) ListByResourceID(ctx context.Context, tenantID string, resourceType resource.Type, resourceID string) ([]*model.IntegrationDependency, error) ListByApplicationIDs(ctx context.Context, tenantID string, applicationIDs []string, pageSize int, cursor string) ([]*model.IntegrationDependencyPage, error) Create(ctx context.Context, tenant string, item *model.IntegrationDependency) error CreateGlobal(ctx context.Context, item *model.IntegrationDependency) error Update(ctx context.Context, tenant string, item *model.IntegrationDependency) error UpdateGlobal(ctx context.Context, item *model.IntegrationDependency) error Delete(ctx context.Context, tenantID string, id string) error DeleteGlobal(ctx context.Context, id string) error }
IntegrationDependencyRepository is responsible for the repo-layer Integration Dependency operations.
type IntegrationDependencyService ¶
type IntegrationDependencyService interface { Create(ctx context.Context, resourceType resource.Type, resourceID string, packageID *string, in model.IntegrationDependencyInput, integrationDependencyHash uint64) (string, error) ListByPackageID(ctx context.Context, packageID string) ([]*model.IntegrationDependency, error) Get(ctx context.Context, id string) (*model.IntegrationDependency, error) Delete(ctx context.Context, resourceType resource.Type, id string) error }
IntegrationDependencyService is responsible for the service-layer Integration Dependency operations.
type PackageService ¶
type PackageService interface { Create(ctx context.Context, resourceType resource.Type, resourceID string, in model.PackageInput, pkgHash uint64) (string, error) ListByApplicationID(ctx context.Context, appID string) ([]*model.Package, error) Delete(ctx context.Context, resourceType resource.Type, id string) error Get(ctx context.Context, id string) (*model.Package, error) }
PackageService is responsible for the service-layer Package operations.
type Resolver ¶
type Resolver struct {
// contains filtered or unexported fields
}
Resolver is an object responsible for resolver-layer Integration Dependency operations
func NewResolver ¶
func NewResolver(transact persistence.Transactioner, integrationDependencySvc IntegrationDependencyService, integrationDependencyConverter IntegrationDepConverter, aspectSvc AspectService, aspectEventResourceSvc AspectEventResourceService, appSvc ApplicationService, appTemplateSvc ApplicationTemplateService, packageSvc PackageService) *Resolver
NewResolver returns a new object responsible for resolver-layer Integration Dependency operations.
func (*Resolver) AddIntegrationDependencyToApplication ¶
func (r *Resolver) AddIntegrationDependencyToApplication(ctx context.Context, appID string, in graphql.IntegrationDependencyInput) (*graphql.IntegrationDependency, error)
AddIntegrationDependencyToApplication adds an Integration Dependency in the context of an Application.
func (*Resolver) DeleteIntegrationDependency ¶
func (r *Resolver) DeleteIntegrationDependency(ctx context.Context, id string) (*graphql.IntegrationDependency, error)
DeleteIntegrationDependency deletes an Integration Dependency by its ID.
type UIDService ¶
type UIDService interface {
Generate() string
}
UIDService is responsible for generating GUIDs, which will be used as internal integration dependency IDs when they are created.
type VersionConverter ¶
type VersionConverter interface { ToGraphQL(in *model.Version) *graphql.Version InputFromGraphQL(in *graphql.VersionInput) *model.VersionInput FromEntity(version version.Version) *model.Version ToEntity(version model.Version) version.Version }
VersionConverter converts Version between model.Version, graphql.Version and repo-layer version.Version