Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OperationRepository ¶
type OperationRepository struct {
// contains filtered or unexported fields
}
OperationRepository is responsible for operations data.
func (*OperationRepository) Create ¶
func (r *OperationRepository) Create(operations ...model.Operation) error
Create adds new records to the operations table. TODO: Benchmark & Speed Up (Batch INSERT).
func (*OperationRepository) DeleteByResourceID ¶
func (r *OperationRepository) DeleteByResourceID(id int64) (int64, error)
DeleteByResourceID removes records with specified resource_id from operations table.
func (*OperationRepository) FindByNumber ¶
func (r *OperationRepository) FindByNumber(number string) ([]model.Operation, error)
FindByNumber returns list operations on verhicles with specified number plates.
type ResourceRepository ¶
type ResourceRepository struct {
// contains filtered or unexported fields
}
ResourceRepository is responsible for resources data.
func (*ResourceRepository) Create ¶
func (r *ResourceRepository) Create(resource *model.Resource) error
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store is an implementation of store.Store interface based on SQL.
func (*Store) Operation ¶
func (s *Store) Operation() store.OperationRepository
Operation returns repository, who is responsible for operations.
func (*Store) Resource ¶
func (s *Store) Resource() store.ResourceRepository
Resource returns repository, who is responsible for resources.
Click to show internal directories.
Click to hide internal directories.