Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRepository ¶
func NewRepository(conv EntityConverter) *pgRepository
NewRepository creates a new instance of repository
func NewService ¶
func NewService(vendorRepo VendorRepository, uidService UIDService) *service
NewService creates a new instance of Vendor Service.
Types ¶
type Entity ¶
type Entity struct { ID string `db:"id"` OrdID string `db:"ord_id"` ApplicationID sql.NullString `db:"app_id"` ApplicationTemplateVersionID sql.NullString `db:"app_template_version_id"` Title string `db:"title"` Partners sql.NullString `db:"partners"` Tags sql.NullString `db:"tags"` Labels sql.NullString `db:"labels"` DocumentationLabels sql.NullString `db:"documentation_labels"` }
Entity is the vendor entity
func (*Entity) DecorateWithTenantID ¶
DecorateWithTenantID decorates the entity with the given tenant ID.
type EntityConverter ¶
type EntityConverter interface { ToEntity(in *model.Vendor) *Entity FromEntity(entity *Entity) (*model.Vendor, error) }
EntityConverter missing godoc
type VendorRepository ¶
type VendorRepository interface { Create(ctx context.Context, tenant string, item *model.Vendor) error CreateGlobal(ctx context.Context, model *model.Vendor) error Update(ctx context.Context, tenant string, item *model.Vendor) error UpdateGlobal(ctx context.Context, model *model.Vendor) 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.Vendor, error) GetByIDGlobal(ctx context.Context, id string) (*model.Vendor, error) ListByResourceID(ctx context.Context, tenantID, resourceID string, resourceType resource.Type) ([]*model.Vendor, error) ListGlobal(ctx context.Context) ([]*model.Vendor, error) }
VendorRepository missing godoc
Click to show internal directories.
Click to hide internal directories.