Documentation
¶
Index ¶
- type RegistrationRepository
- func (r *RegistrationRepository) AllSeries() ([]string, error)
- func (r *RegistrationRepository) Create(registration *model.Registration) error
- func (r *RegistrationRepository) FindByCode(code string) (*model.Registration, error)
- func (r *RegistrationRepository) FindByNumber(number string) ([]model.Registration, error)
- func (r *RegistrationRepository) FindByVIN(vin string) ([]model.Registration, error)
- func (r *RegistrationRepository) GetLast(series string) (*model.Registration, error)
- type Store
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RegistrationRepository ¶
type RegistrationRepository struct {
// contains filtered or unexported fields
}
RegistrationRepository is responsible for registrations manipulation.
func (*RegistrationRepository) AllSeries ¶
func (r *RegistrationRepository) AllSeries() ([]string, error)
AllSeries returns list of all known series.
func (*RegistrationRepository) Create ¶
func (r *RegistrationRepository) Create(registration *model.Registration) error
Create adds new record to the database.
func (*RegistrationRepository) FindByCode ¶
func (r *RegistrationRepository) FindByCode(code string) (*model.Registration, error)
FindByCode returns registrations with specified code.
func (*RegistrationRepository) FindByNumber ¶
func (r *RegistrationRepository) FindByNumber(number string) ([]model.Registration, error)
FindByNumber returns registrations with specified number.
func (*RegistrationRepository) FindByVIN ¶
func (r *RegistrationRepository) FindByVIN(vin string) ([]model.Registration, error)
FindByVIN returns registrations with specified VIN.
func (*RegistrationRepository) GetLast ¶
func (r *RegistrationRepository) GetLast(series string) (*model.Registration, error)
GetLast returns last registration from the database.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store is postgres wrapper for store.Store.
func (*Store) Registration ¶
func (s *Store) Registration() store.RegistrationRepository
Registration is responsible for registrations manipulation.
Click to show internal directories.
Click to hide internal directories.