bundle

package
v0.0.0-...-a423d60 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 4, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConverter

func NewConverter(auth AuthConverter, api APIConverter, event EventConverter, document DocumentConverter) *converter

NewConverter missing godoc

func NewRepository

func NewRepository(conv EntityConverter) *pgRepository

NewRepository missing godoc

func NewService

func NewService(bndlRepo BundleRepository, apiSvc APIService, eventSvc EventService, documentSvc DocumentService, biaSvc BundleInstanceAuthService, uidService UIDService) *service

NewService missing godoc

Types

type APIConverter

type APIConverter interface {
	ToGraphQL(in *model.APIDefinition, spec *model.Spec, bundleRef *model.BundleReference) (*graphql.APIDefinition, error)
	MultipleToGraphQL(in []*model.APIDefinition, bundleRefs []*model.BundleReference) ([]*graphql.APIDefinition, error)
	MultipleInputFromGraphQL(in []*graphql.APIDefinitionInput) ([]*model.APIDefinitionInput, []*model.SpecInput, error)
}

APIConverter missing godoc

type APIService

type APIService interface {
	ListByBundleIDs(ctx context.Context, bundleIDs []string, pageSize int, cursor string) ([]*model.APIDefinitionPage, error)
	GetForBundle(ctx context.Context, id string, bundleID string) (*model.APIDefinition, error)
	CreateInBundle(ctx context.Context, resourceType resource.Type, resourceID string, bundleID string, in model.APIDefinitionInput, spec *model.SpecInput) (string, error)
	DeleteAllByBundleID(ctx context.Context, bundleID string) error
}

APIService missing godoc

type ApplicationService

type ApplicationService interface {
	UpdateBaseURL(ctx context.Context, appID, targetURL string) error
}

ApplicationService is responsible for the service-layer Application operations.

type AuthConverter

type AuthConverter interface {
	ToGraphQL(in *model.Auth) (*graphql.Auth, error)
	InputFromGraphQL(in *graphql.AuthInput) (*model.AuthInput, error)
}

AuthConverter missing godoc

type BundleCollection

type BundleCollection []Entity

BundleCollection missing godoc

func (BundleCollection) Len

func (r BundleCollection) Len() int

Len missing godoc

type BundleConverter

type BundleConverter interface {
	ToGraphQL(in *model.Bundle) (*graphql.Bundle, error)
	CreateInputFromGraphQL(in graphql.BundleCreateInput) (model.BundleCreateInput, error)
	UpdateInputFromGraphQL(in graphql.BundleUpdateInput) (*model.BundleUpdateInput, error)
}

BundleConverter missing godoc

type BundleInstanceAuthConverter

type BundleInstanceAuthConverter interface {
	ToGraphQL(in *model.BundleInstanceAuth) (*graphql.BundleInstanceAuth, error)
	MultipleToGraphQL(in []*model.BundleInstanceAuth) ([]*graphql.BundleInstanceAuth, error)
}

BundleInstanceAuthConverter missing godoc

type BundleInstanceAuthService

type BundleInstanceAuthService interface {
	GetForBundle(ctx context.Context, id string, bundleID string) (*model.BundleInstanceAuth, error)
	ListByRuntimeID(ctx context.Context, runtimeID string) ([]*model.BundleInstanceAuth, error)
	List(ctx context.Context, id string) ([]*model.BundleInstanceAuth, error)
}

BundleInstanceAuthService missing godoc

type BundleReferenceService

type BundleReferenceService interface {
	GetForBundle(ctx context.Context, objectType model.BundleReferenceObjectType, objectID, bundleID *string) (*model.BundleReference, error)
	ListByBundleIDs(ctx context.Context, objectType model.BundleReferenceObjectType, bundleIDs []string, pageSize int, cursor string) ([]*model.BundleReference, map[string]int, error)
}

BundleReferenceService missing godoc

type BundleRepository

type BundleRepository interface {
	Create(ctx context.Context, tenant string, item *model.Bundle) error
	CreateGlobal(ctx context.Context, model *model.Bundle) error
	Update(ctx context.Context, tenant string, item *model.Bundle) error
	UpdateGlobal(ctx context.Context, model *model.Bundle) error
	Delete(ctx context.Context, tenant, id string) error
	DeleteGlobal(ctx context.Context, id string) error
	Exists(ctx context.Context, tenant, id string) (bool, error)
	GetByID(ctx context.Context, tenant, id string) (*model.Bundle, error)
	GetByIDGlobal(ctx context.Context, id string) (*model.Bundle, error)
	GetForApplication(ctx context.Context, tenant string, id string, applicationID string) (*model.Bundle, error)
	ListByResourceIDNoPaging(ctx context.Context, tenantID, appID string, resourceType resource.Type) ([]*model.Bundle, error)
	ListByApplicationIDs(ctx context.Context, tenantID string, applicationIDs []string, pageSize int, cursor string) ([]*model.BundlePage, error)
}

BundleRepository missing godoc

type BundleService

type BundleService interface {
	Create(ctx context.Context, resourceType resource.Type, resourceID string, in model.BundleCreateInput) (string, error)
	Update(ctx context.Context, resourceType resource.Type, id string, in model.BundleUpdateInput) error
	Delete(ctx context.Context, resourceType resource.Type, id string) error
	Get(ctx context.Context, id string) (*model.Bundle, error)
}

BundleService missing godoc

type DocumentConverter

type DocumentConverter interface {
	ToGraphQL(in *model.Document) *graphql.Document
	MultipleToGraphQL(in []*model.Document) []*graphql.Document
	MultipleInputFromGraphQL(in []*graphql.DocumentInput) ([]*model.DocumentInput, error)
}

DocumentConverter missing godoc

type DocumentService

type DocumentService interface {
	GetForBundle(ctx context.Context, id string, bundleID string) (*model.Document, error)
	CreateInBundle(ctx context.Context, resourceType resource.Type, resourceID string, bundleID string, in model.DocumentInput) (string, error)
	ListByBundleIDs(ctx context.Context, bundleIDs []string, pageSize int, cursor string) ([]*model.DocumentPage, error)
}

DocumentService missing godoc

type Entity

type Entity struct {
	ApplicationID                 sql.NullString `db:"app_id"`
	ApplicationTemplateVersionID  sql.NullString `db:"app_template_version_id"`
	Name                          string         `db:"name"`
	Description                   sql.NullString `db:"description"`
	InstanceAuthRequestJSONSchema sql.NullString `db:"instance_auth_request_json_schema"`
	Version                       sql.NullString `db:"version"`
	ResourceHash                  sql.NullString `db:"resource_hash"`
	DefaultInstanceAuth           sql.NullString `db:"default_instance_auth"`
	OrdID                         sql.NullString `db:"ord_id"`
	LocalTenantID                 sql.NullString `db:"local_tenant_id"`
	ShortDescription              sql.NullString `db:"short_description"`
	Links                         sql.NullString `db:"links"`
	Labels                        sql.NullString `db:"labels"`
	CredentialExchangeStrategies  sql.NullString `db:"credential_exchange_strategies"`
	CorrelationIDs                sql.NullString `db:"correlation_ids"`
	Tags                          sql.NullString `db:"tags"`
	DocumentationLabels           sql.NullString `db:"documentation_labels"`
	LastUpdate                    sql.NullString `db:"last_update"`
	*repo.BaseEntity
}

Entity is a bundle entity

func (*Entity) DecorateWithTenantID

func (e *Entity) DecorateWithTenantID(tenant string) interface{}

DecorateWithTenantID decorates the entity with the given tenant ID.

func (*Entity) GetParent

func (e *Entity) GetParent(_ resource.Type) (resource.Type, string)

GetParent returns the parent type and the parent ID of the entity.

type EntityConverter

type EntityConverter interface {
	ToEntity(in *model.Bundle) (*Entity, error)
	FromEntity(entity *Entity) (*model.Bundle, error)
}

EntityConverter missing godoc

type EventConverter

type EventConverter interface {
	ToGraphQL(in *model.EventDefinition, spec *model.Spec, bundleReference *model.BundleReference) (*graphql.EventDefinition, error)
	MultipleToGraphQL(in []*model.EventDefinition, bundleRefs []*model.BundleReference) ([]*graphql.EventDefinition, error)
	MultipleInputFromGraphQL(in []*graphql.EventDefinitionInput) ([]*model.EventDefinitionInput, []*model.SpecInput, error)
}

EventConverter missing godoc

type EventService

type EventService interface {
	ListByBundleIDs(ctx context.Context, bundleIDs []string, pageSize int, cursor string) ([]*model.EventDefinitionPage, error)
	GetForBundle(ctx context.Context, id string, bundleID string) (*model.EventDefinition, error)
	CreateInBundle(ctx context.Context, resourceType resource.Type, resourceID string, bundleID string, in model.EventDefinitionInput, spec *model.SpecInput) (string, error)
	DeleteAllByBundleID(ctx context.Context, bundleID string) error
}

EventService missing godoc

type Resolver

type Resolver struct {
	// contains filtered or unexported fields
}

Resolver missing godoc

func NewResolver

func NewResolver(
	transact persistence.Transactioner,
	bundleSvc BundleService,
	bundleInstanceAuthSvc BundleInstanceAuthService,
	bundleReferenceSvc BundleReferenceService,
	apiSvc APIService,
	eventSvc EventService,
	documentSvc DocumentService,
	bundleConverter BundleConverter,
	bundleInstanceAuthConverter BundleInstanceAuthConverter,
	apiConv APIConverter,
	eventConv EventConverter,
	documentConv DocumentConverter,
	specSerice SpecService,
	appSvc ApplicationService) *Resolver

NewResolver missing godoc

func (*Resolver) APIDefinition

func (r *Resolver) APIDefinition(ctx context.Context, obj *graphql.Bundle, id string) (*graphql.APIDefinition, error)

APIDefinition missing godoc

func (*Resolver) APIDefinitions

func (r *Resolver) APIDefinitions(ctx context.Context, obj *graphql.Bundle, group *string, first *int, after *graphql.PageCursor) (*graphql.APIDefinitionPage, error)

APIDefinitions missing godoc

func (*Resolver) APIDefinitionsDataLoader

func (r *Resolver) APIDefinitionsDataLoader(keys []dataloader.ParamAPIDef) ([]*graphql.APIDefinitionPage, []error)

APIDefinitionsDataLoader missing godoc

func (*Resolver) AddBundle

func (r *Resolver) AddBundle(ctx context.Context, applicationID string, in graphql.BundleCreateInput) (*graphql.Bundle, error)

AddBundle missing godoc

func (*Resolver) DeleteBundle

func (r *Resolver) DeleteBundle(ctx context.Context, id string) (*graphql.Bundle, error)

DeleteBundle missing godoc

func (*Resolver) Document

func (r *Resolver) Document(ctx context.Context, obj *graphql.Bundle, id string) (*graphql.Document, error)

Document missing godoc

func (*Resolver) Documents

func (r *Resolver) Documents(ctx context.Context, obj *graphql.Bundle, first *int, after *graphql.PageCursor) (*graphql.DocumentPage, error)

Documents missing godoc

func (*Resolver) DocumentsDataLoader

func (r *Resolver) DocumentsDataLoader(keys []dataloader.ParamDocument) ([]*graphql.DocumentPage, []error)

DocumentsDataLoader missing godoc

func (*Resolver) EventDefinition

func (r *Resolver) EventDefinition(ctx context.Context, obj *graphql.Bundle, id string) (*graphql.EventDefinition, error)

EventDefinition missing godoc

func (*Resolver) EventDefinitions

func (r *Resolver) EventDefinitions(ctx context.Context, obj *graphql.Bundle, group *string, first *int, after *graphql.PageCursor) (*graphql.EventDefinitionPage, error)

EventDefinitions missing godoc

func (*Resolver) EventDefinitionsDataLoader

func (r *Resolver) EventDefinitionsDataLoader(keys []dataloader.ParamEventDef) ([]*graphql.EventDefinitionPage, []error)

EventDefinitionsDataLoader missing godoc

func (*Resolver) InstanceAuth

func (r *Resolver) InstanceAuth(ctx context.Context, obj *graphql.Bundle, id string) (*graphql.BundleInstanceAuth, error)

InstanceAuth missing godoc

func (*Resolver) InstanceAuths

func (r *Resolver) InstanceAuths(ctx context.Context, obj *graphql.Bundle) ([]*graphql.BundleInstanceAuth, error)

InstanceAuths missing godoc

func (*Resolver) UpdateBundle

func (r *Resolver) UpdateBundle(ctx context.Context, id string, in graphql.BundleUpdateInput) (*graphql.Bundle, error)

UpdateBundle missing godoc

type SpecService

type SpecService interface {
	GetByReferenceObjectID(ctx context.Context, resourceType resource.Type, objectType model.SpecReferenceObjectType, objectID string) (*model.Spec, error)
	ListByReferenceObjectIDs(ctx context.Context, objectType model.SpecReferenceObjectType, objectIDs []string) ([]*model.Spec, error)
}

SpecService missing godoc

type UIDService

type UIDService interface {
	Generate() string
}

UIDService missing godoc

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL