sqlstore

package
v0.1.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 10, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RecognitionRepository

type RecognitionRepository struct {
	// contains filtered or unexported fields
}

RecognitionRepository is responsible for recognitions manipulation.

func (*RecognitionRepository) Create

func (r *RecognitionRepository) Create(ctx context.Context, recognition *store.Recognition) error

Create adds new record to the database.

func (*RecognitionRepository) FindByPlate

func (r *RecognitionRepository) FindByPlate(ctx context.Context, plate string) ([]store.Recognition, error)

FindByPlate returns list of records with specified plate.

type Store

type Store struct {
	// contains filtered or unexported fields
}

Store is postgres wrapper for store.Store.

func New

func New(conf *config.Database) (*Store, error)

New returns new instance of store.

func TestDB

func TestDB(t *testing.T, conf *config.Database) (*Store, func(...string))

TestDB returns special test connection and teardown function.

func (*Store) Recognition

func (s *Store) Recognition() store.RecognitionRepository

Recognition is responsible for recognitions manipulation.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL