Documentation
¶
Index ¶
- type Database
- type HoldingStore
- func (store *HoldingStore) Add(ctx context.Context, holding *gaivota.Holding) (*gaivota.Holding, error)
- func (store *HoldingStore) All(ctx context.Context) (*[]gaivota.Holding, error)
- func (store *HoldingStore) Delete(ctx context.Context, id int) error
- func (store *HoldingStore) Get(ctx context.Context, id int) (*gaivota.Holding, error)
- func (store *HoldingStore) GetByPositionID(ctx context.Context, positionId int) (*[]gaivota.Holding, error)
- func (store *HoldingStore) GetByUserID(ctx context.Context, userId int) (*[]gaivota.Holding, error)
- func (store *HoldingStore) GetByWalletID(ctx context.Context, walletId int) (*[]gaivota.Holding, error)
- func (store *HoldingStore) Update(ctx context.Context, holding *gaivota.Holding) error
- type InvestmentStore
- func (store *InvestmentStore) Add(ctx context.Context, investment *gaivota.Investment) (*gaivota.Investment, error)
- func (store *InvestmentStore) All(ctx context.Context) (*[]gaivota.Investment, error)
- func (store *InvestmentStore) Delete(ctx context.Context, id int) error
- func (store *InvestmentStore) Get(ctx context.Context, id int) (*gaivota.Investment, error)
- func (store *InvestmentStore) GetByPortfolioID(ctx context.Context, portfolioId int) (*[]gaivota.Investment, error)
- func (store *InvestmentStore) GetByUserID(ctx context.Context, userId int) (*[]gaivota.Investment, error)
- func (store *InvestmentStore) Update(ctx context.Context, investment *gaivota.Investment) error
- type PortfolioStore
- func (store *PortfolioStore) Add(ctx context.Context, portfolio *gaivota.Portfolio) (*gaivota.Portfolio, error)
- func (store *PortfolioStore) All(ctx context.Context) (*[]gaivota.Portfolio, error)
- func (store *PortfolioStore) Delete(ctx context.Context, id int) error
- func (store *PortfolioStore) Get(ctx context.Context, id int) (*gaivota.Portfolio, error)
- func (store *PortfolioStore) GetByUserID(ctx context.Context, userId int) (*[]gaivota.Portfolio, error)
- func (store *PortfolioStore) Update(ctx context.Context, portfolio *gaivota.Portfolio) error
- type PositionStore
- func (store *PositionStore) Add(ctx context.Context, position *gaivota.Position) (*gaivota.Position, error)
- func (store *PositionStore) All(ctx context.Context) (*[]gaivota.Position, error)
- func (store *PositionStore) Delete(ctx context.Context, id int) error
- func (store *PositionStore) Get(ctx context.Context, id int) (*gaivota.Position, error)
- func (store *PositionStore) GetByUserID(ctx context.Context, userId int) (*gaivota.Position, error)
- func (store *PositionStore) Update(ctx context.Context, position *gaivota.Position) error
- type UserStore
- func (store *UserStore) Add(ctx context.Context, user *gaivota.User) (*gaivota.User, error)
- func (store *UserStore) All(ctx context.Context) (*[]gaivota.User, error)
- func (store *UserStore) Delete(ctx context.Context, id int) error
- func (store *UserStore) Get(ctx context.Context, id int) (*gaivota.User, error)
- func (store *UserStore) Update(ctx context.Context, user *gaivota.User) error
- type WalletStore
- func (store *WalletStore) Add(ctx context.Context, wallet *gaivota.Wallet) (*gaivota.Wallet, error)
- func (store *WalletStore) All(ctx context.Context) (*[]gaivota.Wallet, error)
- func (store *WalletStore) Delete(ctx context.Context, id int) error
- func (store *WalletStore) Get(ctx context.Context, id int) (*gaivota.Wallet, error)
- func (store *WalletStore) GetByUserID(ctx context.Context, userId int) (*[]gaivota.Wallet, error)
- func (store *WalletStore) Update(ctx context.Context, wallet *gaivota.Wallet) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Database ¶
func (*Database) NewPostgresClient ¶
type HoldingStore ¶
type HoldingStore struct {
Database *Database
}
func NewHoldingStore ¶
func NewHoldingStore(db *Database) *HoldingStore
func (*HoldingStore) GetByPositionID ¶
func (*HoldingStore) GetByUserID ¶
func (*HoldingStore) GetByWalletID ¶
type InvestmentStore ¶
type InvestmentStore struct {
Database *Database
}
func NewInvestmentStore ¶
func NewInvestmentStore(db *Database) *InvestmentStore
func (*InvestmentStore) Add ¶
func (store *InvestmentStore) Add(ctx context.Context, investment *gaivota.Investment) (*gaivota.Investment, error)
func (*InvestmentStore) All ¶
func (store *InvestmentStore) All(ctx context.Context) (*[]gaivota.Investment, error)
func (*InvestmentStore) Delete ¶
func (store *InvestmentStore) Delete(ctx context.Context, id int) error
func (*InvestmentStore) Get ¶
func (store *InvestmentStore) Get(ctx context.Context, id int) (*gaivota.Investment, error)
func (*InvestmentStore) GetByPortfolioID ¶
func (store *InvestmentStore) GetByPortfolioID(ctx context.Context, portfolioId int) (*[]gaivota.Investment, error)
func (*InvestmentStore) GetByUserID ¶
func (store *InvestmentStore) GetByUserID(ctx context.Context, userId int) (*[]gaivota.Investment, error)
func (*InvestmentStore) Update ¶
func (store *InvestmentStore) Update(ctx context.Context, investment *gaivota.Investment) error
type PortfolioStore ¶
type PortfolioStore struct {
Database *Database
}
func NewPortfolioStore ¶
func NewPortfolioStore(db *Database) *PortfolioStore
func (*PortfolioStore) Delete ¶
func (store *PortfolioStore) Delete(ctx context.Context, id int) error
func (*PortfolioStore) GetByUserID ¶
type PositionStore ¶
type PositionStore struct {
Database *Database
}
func NewPositionStore ¶
func NewPositionStore(db *Database) *PositionStore
func (*PositionStore) Delete ¶
func (store *PositionStore) Delete(ctx context.Context, id int) error
func (*PositionStore) GetByUserID ¶
type UserStore ¶
type UserStore struct {
Database *Database
}
func NewUserStore ¶
type WalletStore ¶
type WalletStore struct {
Database *Database
}
func NewWalletStore ¶
func NewWalletStore(db *Database) *WalletStore
func (*WalletStore) GetByUserID ¶
Click to show internal directories.
Click to hide internal directories.