Documentation
¶
Index ¶
- func New(host string, name string, user string, password string) (*sql.DB, error)
- type BrandStore
- type EntryStore
- type ModelStore
- func (s ModelStore) CreateModel(m yakit.Model) (*yakit.Model, error)
- func (s ModelStore) DeleteModel(id string) error
- func (s ModelStore) Model(id string) (*yakit.Model, error)
- func (s ModelStore) Models(brandID string) ([]yakit.Model, error)
- func (s ModelStore) UpdateModel(m yakit.Model) (*yakit.Model, error)
- type VehicleStore
- func (s VehicleStore) CreateVehicle(v yakit.Vehicle) (*yakit.Vehicle, error)
- func (s VehicleStore) DeleteVehicle(id string) error
- func (s VehicleStore) UpdateVehicle(v yakit.Vehicle) (*yakit.Vehicle, error)
- func (s VehicleStore) Vehicle(id string) (*yakit.Vehicle, error)
- func (s VehicleStore) Vehicles(modelID string, brandID string) ([]yakit.Vehicle, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BrandStore ¶
type BrandStore struct {
// contains filtered or unexported fields
}
Struct that satisfies BrandService
func NewBrandStore ¶
func NewBrandStore(db *sql.DB) *BrandStore
func (BrandStore) Brand ¶
func (s BrandStore) Brand(id string) (*yakit.Brand, error)
Get brand with ID
func (BrandStore) CreateBrand ¶
Create a new brand
func (BrandStore) UpdateBrand ¶
Update an existing brand
type EntryStore ¶
type EntryStore struct {
// contains filtered or unexported fields
}
Struct that satisfies EntryService
func (EntryStore) CreateEntry ¶
Create a new Entry
func (EntryStore) Entry ¶
func (s EntryStore) Entry(id string) (*yakit.Entry, error)
Get Entry with ID
func (EntryStore) UpdateEntry ¶
Update an Entry
type ModelStore ¶
type ModelStore struct {
// contains filtered or unexported fields
}
Struct that satisfies ModelService
func NewModelStore ¶
func NewModelStore(db *sql.DB) *ModelStore
func (ModelStore) CreateModel ¶
Create a new model
func (ModelStore) Model ¶
func (s ModelStore) Model(id string) (*yakit.Model, error)
Get Model with ID
func (ModelStore) Models ¶
func (s ModelStore) Models(brandID string) ([]yakit.Model, error)
Get all models
func (ModelStore) UpdateModel ¶
Update an existing model
type VehicleStore ¶
type VehicleStore struct {
// contains filtered or unexported fields
}
Struct that satisfies VehicleService
func NewVehicleStore ¶
func NewVehicleStore(db *sql.DB) *VehicleStore
func (VehicleStore) CreateVehicle ¶
Create a new Vehicle
func (VehicleStore) DeleteVehicle ¶
func (s VehicleStore) DeleteVehicle(id string) error
Delete a Vehicle
func (VehicleStore) UpdateVehicle ¶
Update an existing Vehicle
Click to show internal directories.
Click to hide internal directories.