ordpackage

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConverter

func NewConverter() *converter

NewConverter missing godoc

func NewRepository

func NewRepository(conv EntityConverter) *pgRepository

NewRepository missing godoc

func NewService

func NewService(pkgRepo PackageRepository, uidService UIDService) *service

NewService missing godoc

Types

type Entity

type Entity struct {
	ID                           string         `db:"id"`
	ApplicationID                sql.NullString `db:"app_id"`
	ApplicationTemplateVersionID sql.NullString `db:"app_template_version_id"`
	OrdID                        string         `db:"ord_id"`
	Vendor                       sql.NullString `db:"vendor"`
	Title                        string         `db:"title"`
	ShortDescription             string         `db:"short_description"`
	Description                  string         `db:"description"`
	Version                      string         `db:"version"`
	PackageLinks                 sql.NullString `db:"package_links"`
	Links                        sql.NullString `db:"links"`
	LicenseType                  sql.NullString `db:"licence_type"`
	SupportInfo                  sql.NullString `db:"support_info"`
	RuntimeRestriction           sql.NullString `db:"runtime_restriction"`
	Tags                         sql.NullString `db:"tags"`
	Countries                    sql.NullString `db:"countries"`
	Labels                       sql.NullString `db:"labels"`
	PolicyLevel                  sql.NullString `db:"policy_level"`
	CustomPolicyLevel            sql.NullString `db:"custom_policy_level"`
	PartOfProducts               sql.NullString `db:"part_of_products"`
	LineOfBusiness               sql.NullString `db:"line_of_business"`
	Industry                     sql.NullString `db:"industry"`
	ResourceHash                 sql.NullString `db:"resource_hash"`
	DocumentationLabels          sql.NullString `db:"documentation_labels"`
}

Entity represents the ORD package entity.

func (*Entity) DecorateWithTenantID

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

DecorateWithTenantID decorates the entity with the given tenant ID.

func (*Entity) GetID

func (e *Entity) GetID() string

GetID returns the ID of the entity.

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.Package) *Entity
	FromEntity(entity *Entity) (*model.Package, error)
}

EntityConverter missing godoc

type PackageRepository

type PackageRepository interface {
	Create(ctx context.Context, tenant string, item *model.Package) error
	CreateGlobal(ctx context.Context, model *model.Package) error
	Update(ctx context.Context, tenant string, item *model.Package) error
	UpdateGlobal(ctx context.Context, model *model.Package) 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.Package, error)
	GetByIDGlobal(ctx context.Context, id string) (*model.Package, error)
	ListByResourceID(ctx context.Context, tenantID, resourceID string, resourceType resource.Type) ([]*model.Package, error)
}

PackageRepository 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