Documentation
¶
Index ¶
- func ScanIntoAccount(rows *sql.Rows) (*model.Account, error)
- func ScanIntoCustomer(rows *sql.Rows) (*model.Customer, error)
- type PostgresStore
- func (s *PostgresStore) CreateAccount(acc *model.Account) error
- func (s *PostgresStore) CreateAccountTable() error
- func (s *PostgresStore) CreateCustomer(customer *model.Customer) error
- func (s *PostgresStore) CreateCustomerTable() error
- func (s *PostgresStore) DeleteAccount(id int) error
- func (s *PostgresStore) DeleteCustomer(id int) error
- func (s *PostgresStore) GetAccountByID(id int) (*model.Account, error)
- func (s *PostgresStore) GetAccounts() ([]*model.Account, error)
- func (s *PostgresStore) GetAccountsFromCustomer(id int) ([]*model.Account, error)
- func (s *PostgresStore) GetCustomerByEmail(email string) (*model.Customer, error)
- func (s *PostgresStore) GetCustomerByID(id int) (*model.Customer, error)
- func (s *PostgresStore) GetCustomers() ([]*model.Customer, error)
- func (s *PostgresStore) Init() error
- func (s *PostgresStore) UpdateAccount(*model.Account) error
- func (s *PostgresStore) UpdateCustomer(*model.Customer) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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
Click to show internal directories.
Click to hide internal directories.