persistence

package
v0.0.0-...-0bf5125 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repo

type Repo struct {
	Logging   *config.Logging
	DBOptions *pg.Options
}

func NewRepo

func NewRepo(logging *config.Logging, addr string, user string, password string, database string) *Repo

func (*Repo) CreateSchema

func (repo *Repo) CreateSchema() error

func (*Repo) DeleteBooking

func (repo *Repo) DeleteBooking(booking *models2.Booking) error

func (*Repo) DeleteLedgerEntry

func (repo *Repo) DeleteLedgerEntry(entry *models2.LedgerEntry) error

func (*Repo) FindAllBookings

func (repo *Repo) FindAllBookings() ([]models2.Booking, error)

func (*Repo) FindAllLedgerEntries

func (repo *Repo) FindAllLedgerEntries() ([]models2.LedgerEntry, error)

func (*Repo) FindBookingById

func (repo *Repo) FindBookingById(id int64) (*models2.Booking, error)

func (*Repo) FindCustomerById

func (repo *Repo) FindCustomerById(id int64) (*models2.Customer, error)

func (*Repo) FindLedgerEntryByID

func (repo *Repo) FindLedgerEntryByID(id string) (*models2.LedgerEntry, error)

func (*Repo) InitMigration

func (repo *Repo) InitMigration() error

func (*Repo) RunMigration

func (repo *Repo) RunMigration() error

func (*Repo) SaveBooking

func (repo *Repo) SaveBooking(booking *models2.Booking) error

func (*Repo) SaveCustomer

func (repo *Repo) SaveCustomer(customer *models2.Customer) error

func (*Repo) SaveLedgerEntry

func (repo *Repo) SaveLedgerEntry(ledgerEntry *models2.LedgerEntry) error

Jump to

Keyboard shortcuts

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