sqlstore

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Level1Repository

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

func (*Level1Repository) Create

func (r *Level1Repository) Create(level model.Level) error

func (*Level1Repository) FindByID

func (r *Level1Repository) FindByID(id string) (*model.Kek, error)

type Level2Repository

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

func (*Level2Repository) Create

func (r *Level2Repository) Create(level *model.SecondLevel) error

func (*Level2Repository) FindByID

func (r *Level2Repository) FindByID(id string) (*model.SecondLevel, error)

type Level3Repository

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

func (*Level3Repository) Create

func (r *Level3Repository) Create(level *model.ThirdLevel) error

func (*Level3Repository) FindByID

func (r *Level3Repository) FindByID(id string) (*model.ThirdLevel, error)

type Level4Repository

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

func (*Level4Repository) Create

func (r *Level4Repository) Create(level model.Level) error

func (*Level4Repository) FindByID

func (r *Level4Repository) FindByID(id string) (*model.Kek, error)

type Store

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

Store is an implementation of store.Store interface based on SQL.

func New

func New(settings *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) Level1

func (s *Store) Level1() store.Level1Repository

func (*Store) Level2

func (s *Store) Level2() store.Level2Repository

func (*Store) Level3

func (s *Store) Level3() store.Level3Repository

func (*Store) Level4

func (s *Store) Level4() store.Level4Repository

Jump to

Keyboard shortcuts

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