Documentation
¶
Index ¶
- type PostgresStore
- func (s *PostgresStore) CreateAccount(acc *types.Account) error
- func (s *PostgresStore) CreateAccountTable() error
- func (s *PostgresStore) DeleteAccount(number int) error
- func (s *PostgresStore) GetAccountByNumber(number int) (*types.Account, error)
- func (s *PostgresStore) GetAccounts() ([]*types.Account, error)
- func (s *PostgresStore) Init() error
- func (s *PostgresStore) UpdateAccount(*types.Account) error
- func (s *PostgresStore) UpdateAccountBalanceByNumber(balance, number int64) error
- type Storage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
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 *types.Account) error
func (*PostgresStore) CreateAccountTable ¶
func (s *PostgresStore) CreateAccountTable() error
func (*PostgresStore) DeleteAccount ¶
func (s *PostgresStore) DeleteAccount(number int) error
func (*PostgresStore) GetAccountByNumber ¶
func (s *PostgresStore) GetAccountByNumber(number int) (*types.Account, error)
func (*PostgresStore) GetAccounts ¶
func (s *PostgresStore) GetAccounts() ([]*types.Account, error)
func (*PostgresStore) Init ¶
func (s *PostgresStore) Init() error
func (*PostgresStore) UpdateAccount ¶
func (s *PostgresStore) UpdateAccount(*types.Account) error
func (*PostgresStore) UpdateAccountBalanceByNumber ¶
func (s *PostgresStore) UpdateAccountBalanceByNumber(balance, number int64) error
type Storage ¶
type Storage interface { CreateAccount(*types.Account) error DeleteAccount(int) error UpdateAccount(*types.Account) error GetAccounts() ([]*types.Account, error) // GetAccountByID(int) (*types.Account, error) GetAccountByNumber(int) (*types.Account, error) UpdateAccountBalanceByNumber(balance, number int64) error }
Click to show internal directories.
Click to hide internal directories.