ordpackage

package
v0.0.0-...-0640eb1 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2021 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"`
	TenantID          string         `db:"tenant_id"`
	ApplicationID     string         `db:"app_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"`
	Tags              sql.NullString `db:"tags"`
	Countries         sql.NullString `db:"countries"`
	Labels            sql.NullString `db:"labels"`
	PolicyLevel       string         `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"`
}

Entity missing godoc

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, item *model.Package) error
	Update(ctx context.Context, item *model.Package) error
	Delete(ctx context.Context, tenant, id string) error
	Exists(ctx context.Context, tenant, id string) (bool, error)
	GetByID(ctx context.Context, tenant, id string) (*model.Package, error)
	ListByApplicationID(ctx context.Context, tenantID, appID string) ([]*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