Documentation ¶
Index ¶
- type Holdings
- type Repository
- type SQLiteRepository
- func (r *SQLiteRepository) AllHoldings() ([]Holdings, error)
- func (r *SQLiteRepository) DeleteHolding(id int64) error
- func (r *SQLiteRepository) GetHoldingById(id int64) (*Holdings, error)
- func (r *SQLiteRepository) InsertHolding(h Holdings) (*Holdings, error)
- func (r *SQLiteRepository) Migrate() error
- func (r *SQLiteRepository) UpdateHolding(id int64, updated Holdings) error
- type TestRepository
- func (t *TestRepository) AllHoldings() ([]Holdings, error)
- func (t *TestRepository) DeleteHolding(id int64) error
- func (t *TestRepository) GetHoldingById(id int64) (*Holdings, error)
- func (t *TestRepository) InsertHolding(h Holdings) (*Holdings, error)
- func (t *TestRepository) Migrate() error
- func (t *TestRepository) UpdateHolding(id int64, updated Holdings) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repository ¶
type SQLiteRepository ¶
func NewSQLiteRepository ¶
func NewSQLiteRepository(db *sql.DB) *SQLiteRepository
func (*SQLiteRepository) AllHoldings ¶
func (r *SQLiteRepository) AllHoldings() ([]Holdings, error)
func (*SQLiteRepository) DeleteHolding ¶
func (r *SQLiteRepository) DeleteHolding(id int64) error
func (*SQLiteRepository) GetHoldingById ¶
func (r *SQLiteRepository) GetHoldingById(id int64) (*Holdings, error)
func (*SQLiteRepository) InsertHolding ¶
func (r *SQLiteRepository) InsertHolding(h Holdings) (*Holdings, error)
func (*SQLiteRepository) Migrate ¶
func (r *SQLiteRepository) Migrate() error
func (*SQLiteRepository) UpdateHolding ¶
func (r *SQLiteRepository) UpdateHolding(id int64, updated Holdings) error
type TestRepository ¶
type TestRepository struct{}
func NewTestRepository ¶
func NewTestRepository() *TestRepository
func (*TestRepository) AllHoldings ¶
func (t *TestRepository) AllHoldings() ([]Holdings, error)
func (*TestRepository) DeleteHolding ¶
func (t *TestRepository) DeleteHolding(id int64) error
func (*TestRepository) GetHoldingById ¶
func (t *TestRepository) GetHoldingById(id int64) (*Holdings, error)
func (*TestRepository) InsertHolding ¶
func (t *TestRepository) InsertHolding(h Holdings) (*Holdings, error)
func (*TestRepository) Migrate ¶
func (t *TestRepository) Migrate() error
func (*TestRepository) UpdateHolding ¶
func (t *TestRepository) UpdateHolding(id int64, updated Holdings) error
Click to show internal directories.
Click to hide internal directories.