apptemplate

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: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConverter

func NewConverter(appConverter AppConverter, webhookConverter WebhookConverter) *converter

NewConverter missing godoc

func NewRepository

func NewRepository(conv EntityConverter) *repository

NewRepository missing godoc

func NewService

func NewService(appTemplateRepo ApplicationTemplateRepository, webhookRepo WebhookRepository, uidService UIDService, labelUpsertService LabelUpsertService, labelRepo LabelRepository, appRepo ApplicationRepository, timeSvc TimeService) *service

NewService creates a new service instance

func UnmarshalTenantMappingConfig

func UnmarshalTenantMappingConfig(tenantMappingConfigPath string) (map[string]interface{}, error)

UnmarshalTenantMappingConfig unmarshalls a string into map[string]interface{}

Types

type AppConverter

type AppConverter interface {
	CreateJSONInputGQLToJSON(in *graphql.ApplicationJSONInput) (string, error)
}

AppConverter missing godoc

type ApplicationConverter

type ApplicationConverter interface {
	ToGraphQL(in *model.Application) *graphql.Application
	CreateRegisterInputJSONToGQL(in string) (graphql.ApplicationRegisterInput, error)
	CreateInputFromGraphQL(ctx context.Context, in graphql.ApplicationRegisterInput) (model.ApplicationRegisterInput, error)
}

ApplicationConverter missing godoc

type ApplicationRepository

type ApplicationRepository interface {
	ListAllByApplicationTemplateID(ctx context.Context, applicationTemplateID string) ([]*model.Application, error)
}

ApplicationRepository is responsible for repository layer Application operations

type ApplicationService

type ApplicationService interface {
	Create(ctx context.Context, in model.ApplicationRegisterInput) (string, error)
	CreateFromTemplate(ctx context.Context, in model.ApplicationRegisterInput, appTemplateID *string, systemFieldDiscoveryValue bool) (string, error)
	Get(ctx context.Context, id string) (*model.Application, error)
}

ApplicationService missing godoc

type ApplicationTemplateConverter

type ApplicationTemplateConverter interface {
	ToGraphQL(in *model.ApplicationTemplate) (*graphql.ApplicationTemplate, error)
	MultipleToGraphQL(in []*model.ApplicationTemplate) ([]*graphql.ApplicationTemplate, error)
	InputFromGraphQL(in graphql.ApplicationTemplateInput) (model.ApplicationTemplateInput, error)
	UpdateInputFromGraphQL(in graphql.ApplicationTemplateUpdateInput) (model.ApplicationTemplateUpdateInput, error)
	ApplicationFromTemplateInputFromGraphQL(appTemplate *model.ApplicationTemplate, in graphql.ApplicationFromTemplateInput) (model.ApplicationFromTemplateInput, error)
}

ApplicationTemplateConverter missing godoc

type ApplicationTemplateRepository

type ApplicationTemplateRepository interface {
	Create(ctx context.Context, item model.ApplicationTemplate) error
	Get(ctx context.Context, id string) (*model.ApplicationTemplate, error)
	GetByFilters(ctx context.Context, filter []*labelfilter.LabelFilter) (*model.ApplicationTemplate, error)
	Exists(ctx context.Context, id string) (bool, error)
	List(ctx context.Context, filter []*labelfilter.LabelFilter, pageSize int, cursor string) (model.ApplicationTemplatePage, error)
	ListByName(ctx context.Context, id string) ([]*model.ApplicationTemplate, error)
	ListByFilters(ctx context.Context, filter []*labelfilter.LabelFilter) ([]*model.ApplicationTemplate, error)
	Update(ctx context.Context, model model.ApplicationTemplate) error
	Delete(ctx context.Context, id string) error
}

ApplicationTemplateRepository is responsible for repository layer Application Templates operations

type ApplicationTemplateService

type ApplicationTemplateService interface {
	Create(ctx context.Context, in model.ApplicationTemplateInput) (string, error)
	CreateWithLabels(ctx context.Context, in model.ApplicationTemplateInput, labels map[string]interface{}) (string, error)
	Get(ctx context.Context, id string) (*model.ApplicationTemplate, error)
	GetByFilters(ctx context.Context, filter []*labelfilter.LabelFilter) (*model.ApplicationTemplate, error)
	GetByNameAndRegion(ctx context.Context, name string, region interface{}) (*model.ApplicationTemplate, error)
	List(ctx context.Context, filter []*labelfilter.LabelFilter, pageSize int, cursor string) (model.ApplicationTemplatePage, error)
	ListByName(ctx context.Context, name string) ([]*model.ApplicationTemplate, error)
	ListByFilters(ctx context.Context, filter []*labelfilter.LabelFilter) ([]*model.ApplicationTemplate, error)
	Update(ctx context.Context, id string, override bool, in model.ApplicationTemplateUpdateInput) error
	Delete(ctx context.Context, id string) error
	PrepareApplicationCreateInputJSON(appTemplate *model.ApplicationTemplate, values model.ApplicationFromTemplateInputValues) (string, error)
	ListLabels(ctx context.Context, appTemplateID string) (map[string]*model.Label, error)
	GetLabel(ctx context.Context, appTemplateID string, key string) (*model.Label, error)
}

ApplicationTemplateService missing godoc

type CertSubjectMappingService

type CertSubjectMappingService interface {
	DeleteByConsumerID(ctx context.Context, consumerID string) error
	Create(ctx context.Context, item *model.CertSubjectMapping) (string, error)
	ListAll(ctx context.Context) ([]*model.CertSubjectMapping, error)
}

CertSubjectMappingService is responsible for the service layer Certificate Subject Mappings

type Entity

type Entity struct {
	ID                   string         `db:"id"`
	Name                 string         `db:"name"`
	Description          sql.NullString `db:"description"`
	ApplicationNamespace sql.NullString `db:"application_namespace"`
	ApplicationInputJSON string         `db:"application_input"`
	PlaceholdersJSON     sql.NullString `db:"placeholders"`
	AccessLevel          string         `db:"access_level"`
	CreatedAt            time.Time      `db:"created_at"`
	UpdatedAt            time.Time      `db:"updated_at"`
}

Entity missing godoc

type EntityCollection

type EntityCollection []Entity

EntityCollection missing godoc

func (EntityCollection) Len

func (a EntityCollection) Len() int

Len missing godoc

type EntityConverter

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

EntityConverter missing godoc

type LabelRepository

type LabelRepository interface {
	ListForGlobalObject(ctx context.Context, objectType model.LabelableObject, objectID string) (map[string]*model.Label, error)
	GetByKey(ctx context.Context, tenant string, objectType model.LabelableObject, objectID, key string) (*model.Label, error)
}

LabelRepository is responsible for repository layer Label operations

type LabelService

type LabelService interface {
	GetByKey(ctx context.Context, tenant string, objectType model.LabelableObject, objectID, key string) (*model.Label, error)
}

LabelService is responsible for Label operations

type LabelUpsertService

type LabelUpsertService interface {
	UpsertMultipleLabels(ctx context.Context, tenant string, objectType model.LabelableObject, objectID string, labels map[string]interface{}) error
	UpsertLabelGlobal(ctx context.Context, labelInput *model.LabelInput) error
}

LabelUpsertService is responsible for service layer label upserts

type Resolver

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

Resolver missing godoc

func NewResolver

func NewResolver(transact persistence.Transactioner, appSvc ApplicationService, appConverter ApplicationConverter, appTemplateSvc ApplicationTemplateService, appTemplateConverter ApplicationTemplateConverter, webhookService WebhookService, webhookConverter WebhookConverter, labelSvc LabelService, selfRegisterManager SelfRegisterManager, uidService UIDService, certSubjectMappingSvc CertSubjectMappingService, appTemplateProductLabel string, ordAggregatorClientConfig apiclient.OrdAggregatorClientConfig, environmentConsumerSubjects []string) *Resolver

NewResolver missing godoc

func (*Resolver) ApplicationTemplate

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

ApplicationTemplate missing godoc

func (*Resolver) ApplicationTemplates

func (r *Resolver) ApplicationTemplates(ctx context.Context, filter []*graphql.LabelFilter, first *int, after *graphql.PageCursor) (*graphql.ApplicationTemplatePage, error)

ApplicationTemplates missing godoc

func (*Resolver) CreateApplicationTemplate

func (r *Resolver) CreateApplicationTemplate(ctx context.Context, in graphql.ApplicationTemplateInput) (*graphql.ApplicationTemplate, error)

CreateApplicationTemplate missing godoc

func (*Resolver) DeleteApplicationTemplate

func (r *Resolver) DeleteApplicationTemplate(ctx context.Context, id string) (*graphql.ApplicationTemplate, error)

DeleteApplicationTemplate missing godoc

func (*Resolver) Labels

Labels retrieve all labels for application template

func (*Resolver) RegisterApplicationFromTemplate

func (r *Resolver) RegisterApplicationFromTemplate(ctx context.Context, in graphql.ApplicationFromTemplateInput) (*graphql.Application, error)

RegisterApplicationFromTemplate registers an Application using Application Template

func (*Resolver) UpdateApplicationTemplate

func (r *Resolver) UpdateApplicationTemplate(ctx context.Context, id string, override *bool, in graphql.ApplicationTemplateUpdateInput) (*graphql.ApplicationTemplate, error)

UpdateApplicationTemplate missing godoc

func (*Resolver) Webhooks

func (r *Resolver) Webhooks(ctx context.Context, obj *graphql.ApplicationTemplate) ([]*graphql.Webhook, error)

Webhooks missing godoc

type SelfRegisterManager

type SelfRegisterManager interface {
	IsSelfRegistrationFlow(ctx context.Context, labels map[string]interface{}) (bool, error)
	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 TimeService

type TimeService interface {
	Now() time.Time
}

TimeService is responsible for time operations

type UIDService

type UIDService interface {
	Generate() string
}

UIDService is responsible for generating UUIDs

type WebhookConverter

type WebhookConverter interface {
	MultipleToGraphQL(in []*model.Webhook) ([]*graphql.Webhook, error)
	MultipleInputFromGraphQL(in []*graphql.WebhookInput) ([]*model.WebhookInput, error)
}

WebhookConverter missing godoc

type WebhookRepository

type WebhookRepository interface {
	CreateMany(ctx context.Context, tenant string, items []*model.Webhook) error
	DeleteAllByApplicationTemplateID(ctx context.Context, applicationTemplateID string) error
}

WebhookRepository is responsible for repository layer Webhook operations

type WebhookService

type WebhookService interface {
	ListForApplicationTemplate(ctx context.Context, applicationTemplateID string) ([]*model.Webhook, error)
	EnrichWebhooksWithTenantMappingWebhooks(in []*graphql.WebhookInput) ([]*graphql.WebhookInput, error)
}

WebhookService missing godoc

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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