postgres_storage

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

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

Go to latest
Published: Jan 29, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ScanIntoAccount

func ScanIntoAccount(rows *sql.Rows) (*model.Account, error)

func ScanIntoCustomer

func ScanIntoCustomer(rows *sql.Rows) (*model.Customer, error)

Types

type PostgresStore

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

func NewPostgresStore

func NewPostgresStore() (*PostgresStore, error)

func (*PostgresStore) CreateAccount

func (s *PostgresStore) CreateAccount(acc *model.Account) error

func (*PostgresStore) CreateAccountTable

func (s *PostgresStore) CreateAccountTable() error

func (*PostgresStore) CreateCustomer

func (s *PostgresStore) CreateCustomer(customer *model.Customer) error

func (*PostgresStore) CreateCustomerTable

func (s *PostgresStore) CreateCustomerTable() error

func (*PostgresStore) DeleteAccount

func (s *PostgresStore) DeleteAccount(id int) error

func (*PostgresStore) DeleteCustomer

func (s *PostgresStore) DeleteCustomer(id int) error

func (*PostgresStore) GetAccountByID

func (s *PostgresStore) GetAccountByID(id int) (*model.Account, error)

func (*PostgresStore) GetAccounts

func (s *PostgresStore) GetAccounts() ([]*model.Account, error)

func (*PostgresStore) GetAccountsFromCustomer

func (s *PostgresStore) GetAccountsFromCustomer(id int) ([]*model.Account, error)

func (*PostgresStore) GetCustomerByEmail

func (s *PostgresStore) GetCustomerByEmail(email string) (*model.Customer, error)

func (*PostgresStore) GetCustomerByID

func (s *PostgresStore) GetCustomerByID(id int) (*model.Customer, error)

func (*PostgresStore) GetCustomers

func (s *PostgresStore) GetCustomers() ([]*model.Customer, error)

func (*PostgresStore) Init

func (s *PostgresStore) Init() error

func (*PostgresStore) UpdateAccount

func (s *PostgresStore) UpdateAccount(*model.Account) error

func (*PostgresStore) UpdateCustomer

func (s *PostgresStore) UpdateCustomer(*model.Customer) error

Jump to

Keyboard shortcuts

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