Documentation ¶
Index ¶
- Constants
- func NewRegistrySet(c registry.Config) (*registry.Set, error)
- func NoopHook[T any, P registry.PIDable[T]](P) error
- func Register()
- type AreaRegistry
- func (r *AreaRegistry) AddCommodity(areaID, commodityID string) error
- func (r *AreaRegistry) Count() (int, error)
- func (r *AreaRegistry) Create(m models.Area) (*models.Area, error)
- func (r *AreaRegistry) Delete(id string) error
- func (r *AreaRegistry) DeleteCommodity(areaID, commodityID string) error
- func (r *AreaRegistry) Get(id string) (result *models.Area, err error)
- func (r *AreaRegistry) GetCommodities(areaID string) ([]string, error)
- func (r *AreaRegistry) GetOneByName(name string) (result *models.Area, err error)
- func (r *AreaRegistry) List() (results []*models.Area, err error)
- func (r *AreaRegistry) Update(m models.Area) (result *models.Area, err error)
- type CommodityRegistry
- func (r *CommodityRegistry) AddImage(commodityID, imageID string) error
- func (r *CommodityRegistry) AddInvoice(commodityID, invoiceID string) error
- func (r *CommodityRegistry) AddManual(commodityID, manualID string) error
- func (r *CommodityRegistry) Count() (int, error)
- func (r *CommodityRegistry) Create(m models.Commodity) (*models.Commodity, error)
- func (r *CommodityRegistry) Delete(id string) error
- func (r *CommodityRegistry) DeleteImage(commodityID, imageID string) error
- func (r *CommodityRegistry) DeleteInvoice(commodityID, invoiceID string) error
- func (r *CommodityRegistry) DeleteManual(commodityID, manualID string) error
- func (r *CommodityRegistry) Get(id string) (*models.Commodity, error)
- func (r *CommodityRegistry) GetImages(commodityID string) ([]string, error)
- func (r *CommodityRegistry) GetInvoices(commodityID string) ([]string, error)
- func (r *CommodityRegistry) GetManuals(commodityID string) ([]string, error)
- func (r *CommodityRegistry) GetOneByName(name string) (result *models.Commodity, err error)
- func (r *CommodityRegistry) List() ([]*models.Commodity, error)
- func (r *CommodityRegistry) Update(m models.Commodity) (*models.Commodity, error)
- type Config
- type HookFn
- type ImageRegistry
- func (r *ImageRegistry) Count() (int, error)
- func (r *ImageRegistry) Create(m models.Image) (*models.Image, error)
- func (r *ImageRegistry) Delete(id string) error
- func (r *ImageRegistry) Get(id string) (*models.Image, error)
- func (r *ImageRegistry) List() ([]*models.Image, error)
- func (r *ImageRegistry) Update(m models.Image) (*models.Image, error)
- type InvoiceRegistry
- func (r *InvoiceRegistry) Count() (int, error)
- func (r *InvoiceRegistry) Create(m models.Invoice) (*models.Invoice, error)
- func (r *InvoiceRegistry) Delete(id string) error
- func (r *InvoiceRegistry) Get(id string) (*models.Invoice, error)
- func (r *InvoiceRegistry) List() ([]*models.Invoice, error)
- func (r *InvoiceRegistry) Update(m models.Invoice) (*models.Invoice, error)
- type LocationRegistry
- func (r *LocationRegistry) AddArea(locationID, areaID string) error
- func (r *LocationRegistry) Count() (int, error)
- func (r *LocationRegistry) Create(m models.Location) (*models.Location, error)
- func (r *LocationRegistry) Delete(id string) error
- func (r *LocationRegistry) DeleteArea(locationID, areaID string) error
- func (r *LocationRegistry) Get(id string) (result *models.Location, err error)
- func (r *LocationRegistry) GetAreas(locationID string) ([]string, error)
- func (r *LocationRegistry) GetOneByName(name string) (result *models.Location, err error)
- func (r *LocationRegistry) List() (results []*models.Location, err error)
- func (r *LocationRegistry) Update(m models.Location) (result *models.Location, err error)
- type ManualRegistry
- func (r *ManualRegistry) Count() (int, error)
- func (r *ManualRegistry) Create(m models.Manual) (*models.Manual, error)
- func (r *ManualRegistry) Delete(id string) error
- func (r *ManualRegistry) Get(id string) (*models.Manual, error)
- func (r *ManualRegistry) List() ([]*models.Manual, error)
- func (r *ManualRegistry) Update(m models.Manual) (*models.Manual, error)
- type Registry
- func (r *Registry[T, P]) AddChild(childEntityBucketName, entityID, childID string) error
- func (r *Registry[T, P]) Count() (int, error)
- func (r *Registry[T, P]) Create(m T, before, after HookFn[T, P]) (P, error)
- func (r *Registry[T, P]) Delete(id string, before, after HookFn[T, P]) error
- func (r *Registry[T, P]) DeleteChild(childEntityBucketName, entityID, childID string) error
- func (r *Registry[T, P]) DeleteEmptyBuckets(tx dbx.TransactionOrBucket, entityID string, bucketNames ...string) error
- func (r *Registry[T, P]) Get(id string) (result P, err error)
- func (r *Registry[T, P]) GetBy(idx, value string) (result P, err error)
- func (r *Registry[T, P]) GetChildren(childEntityBucketName, entityID string) ([]string, error)
- func (r *Registry[T, P]) List() (results []P, err error)
- func (r *Registry[T, P]) Update(m T, before, after HookFn[T, P]) (result P, err error)
Constants ¶
View Source
const Name = "boltdb"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AreaRegistry ¶
type AreaRegistry struct {
// contains filtered or unexported fields
}
func NewAreaRegistry ¶
func NewAreaRegistry(db *bolt.DB, locationRegistry registry.LocationRegistry) *AreaRegistry
func (*AreaRegistry) AddCommodity ¶
func (r *AreaRegistry) AddCommodity(areaID, commodityID string) error
func (*AreaRegistry) Count ¶
func (r *AreaRegistry) Count() (int, error)
func (*AreaRegistry) Delete ¶
func (r *AreaRegistry) Delete(id string) error
func (*AreaRegistry) DeleteCommodity ¶
func (r *AreaRegistry) DeleteCommodity(areaID, commodityID string) error
func (*AreaRegistry) GetCommodities ¶
func (r *AreaRegistry) GetCommodities(areaID string) ([]string, error)
func (*AreaRegistry) GetOneByName ¶
func (r *AreaRegistry) GetOneByName(name string) (result *models.Area, err error)
type CommodityRegistry ¶
type CommodityRegistry struct {
// contains filtered or unexported fields
}
func NewCommodityRegistry ¶
func NewCommodityRegistry(db *bolt.DB, areaRegistry registry.AreaRegistry) *CommodityRegistry
func (*CommodityRegistry) AddImage ¶
func (r *CommodityRegistry) AddImage(commodityID, imageID string) error
func (*CommodityRegistry) AddInvoice ¶
func (r *CommodityRegistry) AddInvoice(commodityID, invoiceID string) error
func (*CommodityRegistry) AddManual ¶
func (r *CommodityRegistry) AddManual(commodityID, manualID string) error
func (*CommodityRegistry) Count ¶
func (r *CommodityRegistry) Count() (int, error)
func (*CommodityRegistry) Delete ¶
func (r *CommodityRegistry) Delete(id string) error
func (*CommodityRegistry) DeleteImage ¶
func (r *CommodityRegistry) DeleteImage(commodityID, imageID string) error
func (*CommodityRegistry) DeleteInvoice ¶
func (r *CommodityRegistry) DeleteInvoice(commodityID, invoiceID string) error
func (*CommodityRegistry) DeleteManual ¶
func (r *CommodityRegistry) DeleteManual(commodityID, manualID string) error
func (*CommodityRegistry) Get ¶
func (r *CommodityRegistry) Get(id string) (*models.Commodity, error)
func (*CommodityRegistry) GetImages ¶
func (r *CommodityRegistry) GetImages(commodityID string) ([]string, error)
func (*CommodityRegistry) GetInvoices ¶
func (r *CommodityRegistry) GetInvoices(commodityID string) ([]string, error)
func (*CommodityRegistry) GetManuals ¶
func (r *CommodityRegistry) GetManuals(commodityID string) ([]string, error)
func (*CommodityRegistry) GetOneByName ¶
func (r *CommodityRegistry) GetOneByName(name string) (result *models.Commodity, err error)
type ImageRegistry ¶
type ImageRegistry struct {
// contains filtered or unexported fields
}
func NewImageRegistry ¶
func NewImageRegistry(db *bolt.DB, commodityRegistry registry.CommodityRegistry) *ImageRegistry
func (*ImageRegistry) Count ¶
func (r *ImageRegistry) Count() (int, error)
func (*ImageRegistry) Delete ¶
func (r *ImageRegistry) Delete(id string) error
type InvoiceRegistry ¶
type InvoiceRegistry struct {
// contains filtered or unexported fields
}
func NewInvoiceRegistry ¶
func NewInvoiceRegistry(db *bolt.DB, commodityRegistry registry.CommodityRegistry) *InvoiceRegistry
func (*InvoiceRegistry) Count ¶
func (r *InvoiceRegistry) Count() (int, error)
func (*InvoiceRegistry) Delete ¶
func (r *InvoiceRegistry) Delete(id string) error
type LocationRegistry ¶
type LocationRegistry struct {
// contains filtered or unexported fields
}
func NewLocationRegistry ¶
func NewLocationRegistry(db *bolt.DB) *LocationRegistry
func (*LocationRegistry) AddArea ¶
func (r *LocationRegistry) AddArea(locationID, areaID string) error
func (*LocationRegistry) Count ¶
func (r *LocationRegistry) Count() (int, error)
func (*LocationRegistry) Delete ¶
func (r *LocationRegistry) Delete(id string) error
func (*LocationRegistry) DeleteArea ¶
func (r *LocationRegistry) DeleteArea(locationID, areaID string) error
func (*LocationRegistry) Get ¶
func (r *LocationRegistry) Get(id string) (result *models.Location, err error)
func (*LocationRegistry) GetAreas ¶
func (r *LocationRegistry) GetAreas(locationID string) ([]string, error)
func (*LocationRegistry) GetOneByName ¶
func (r *LocationRegistry) GetOneByName(name string) (result *models.Location, err error)
type ManualRegistry ¶
type ManualRegistry struct {
// contains filtered or unexported fields
}
func NewManualRegistry ¶
func NewManualRegistry(db *bolt.DB, commodityRegistry registry.CommodityRegistry) *ManualRegistry
func (*ManualRegistry) Count ¶
func (r *ManualRegistry) Count() (int, error)
func (*ManualRegistry) Delete ¶
func (r *ManualRegistry) Delete(id string) error
type Registry ¶
func NewRegistry ¶
func (*Registry[T, P]) DeleteChild ¶
func (*Registry[T, P]) DeleteEmptyBuckets ¶
func (*Registry[T, P]) GetChildren ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.