Documentation ¶
Index ¶
- func IsRecordNotFoundError(err error) bool
- type Connection
- type DuplicatedEventError
- type DuplicatedRecordError
- type NotEnoughBalanceError
- type Option
- type RecordNotFoundError
- type Repo
- func (repo *Repo) BatchUpsertDailyClose(ctx context.Context, objs []*domain.DailyClose) error
- func (repo *Repo) BatchUpsertStakeConcentration(ctx context.Context, objs []*domain.StakeConcentration) error
- func (repo *Repo) BatchUpsertStocks(ctx context.Context, objs []*domain.Stock) error
- func (repo *Repo) BatchUpsertThreePrimary(ctx context.Context, objs []*domain.ThreePrimary) error
- func (repo *Repo) CreateDailyClose(ctx context.Context, obj *domain.DailyClose) error
- func (repo *Repo) CreateOrder(ctx context.Context, orders []*domain.Order, ...) error
- func (repo *Repo) CreatePickedStocks(ctx context.Context, objs []*domain.PickedStock) error
- func (repo *Repo) CreateStock(ctx context.Context, obj *domain.Stock) error
- func (repo *Repo) CreateThreePrimary(ctx context.Context, arg *domain.ThreePrimary) error
- func (repo *Repo) CreateTransaction(ctx context.Context, transaction *domain.Transaction) error
- func (repo *Repo) CreateUser(ctx context.Context, obj *domain.User) error
- func (repo *Repo) DeletePickedStock(ctx context.Context, userID uuid.UUID, stockID string) error
- func (repo *Repo) DeleteSessionID(ctx context.Context, userID uuid.UUID) error
- func (repo *Repo) DeleteStockByID(ctx context.Context, id string) error
- func (repo *Repo) DeleteUserByID(ctx context.Context, userID uuid.UUID) error
- func (repo *Repo) GetBalanceView(ctx context.Context, id uuid.UUID) (*domain.BalanceView, error)
- func (repo *Repo) GetHighestPrice(ctx context.Context, stockIDs []string, date string, rewindWeek int) (map[string]float32, error)
- func (repo *Repo) GetRealTimeMonitoringKeys(ctx context.Context) ([]string, error)
- func (repo *Repo) GetStakeConcentrationByStockID(ctx context.Context, stockID, date string) (*domain.StakeConcentration, error)
- func (repo *Repo) GetStakeConcentrationLatestDataPoint(ctx context.Context) string
- func (repo *Repo) GetStakeConcentrationsWithVolumes(ctx context.Context, stockID, date string) ([]*domain.CalculationBase, error)
- func (repo *Repo) GetUserByEmail(ctx context.Context, email string) (*domain.User, error)
- func (repo *Repo) GetUserByID(ctx context.Context, userID uuid.UUID) (*domain.User, error)
- func (repo *Repo) GetUserByPhone(ctx context.Context, phone string) (*domain.User, error)
- func (repo *Repo) HasDailyClose(ctx context.Context, date string) (bool, error)
- func (repo *Repo) HasStakeConcentration(ctx context.Context, exchangeDate string) (bool, error)
- func (repo *Repo) LatestStockStatSnapshot(ctx context.Context) ([]*domain.Selection, error)
- func (repo *Repo) ListCategories(ctx context.Context) ([]string, error)
- func (repo *Repo) ListDailyClose(ctx context.Context, arg *domain.ListDailyCloseParams) ([]*domain.DailyClose, error)
- func (repo *Repo) ListLatestPrice(ctx context.Context, stockIDs []string) ([]*domain.StockPrice, error)
- func (repo *Repo) ListOpenOrders(ctx context.Context, userID uuid.UUID, stockID string, orderType string) ([]*domain.Order, error)
- func (repo *Repo) ListOrders(ctx context.Context, arg *domain.ListOrdersParams) ([]*domain.Order, error)
- func (repo *Repo) ListPickedStocks(ctx context.Context, userID uuid.UUID) ([]domain.PickedStock, error)
- func (repo *Repo) ListSelections(ctx context.Context, date string, strict bool) ([]*domain.Selection, error)
- func (repo *Repo) ListSelectionsFromPicked(ctx context.Context, stockIDs []string) ([]*domain.Selection, error)
- func (repo *Repo) ListStocks(ctx context.Context, arg *domain.ListStocksParams) ([]*domain.Stock, error)
- func (repo *Repo) ListThreePrimary(ctx context.Context, arg *domain.ListThreePrimaryParams) ([]*domain.ThreePrimary, error)
- func (repo *Repo) ListUsers(ctx context.Context, limit int32, offset int32) ([]*domain.User, error)
- func (repo *Repo) RetrieveDailyCloseHistory(ctx context.Context, stockIDs []string, opts ...string) ([]*domain.DailyClose, error)
- func (repo *Repo) RetrieveThreePrimaryHistory(ctx context.Context, stockIDs []string, opts ...string) ([]*domain.ThreePrimary, error)
- func (repo *Repo) RunInTransaction(ctx context.Context, fn func(context.Context) error) error
- func (repo *Repo) Transaction(ctx context.Context) (*Trans, error)
- func (repo *Repo) UpdateSessionID(ctx context.Context, params *domain.UpdateSessionIDParams) error
- func (repo *Repo) UpdateUser(ctx context.Context, obj *domain.User) error
- type Trans
- type TypeMismatchError
- type UnexpectedNadexMemberStatusError
- type UnsupportedTradeTypeError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsRecordNotFoundError ¶
Types ¶
type Connection ¶
type Connection struct {
// contains filtered or unexported fields
}
func NewConnection ¶
func NewConnection(pool *pgxpool.Pool) *Connection
type DuplicatedEventError ¶
type DuplicatedEventError struct {
// contains filtered or unexported fields
}
func (*DuplicatedEventError) Error ¶
func (e *DuplicatedEventError) Error() string
type DuplicatedRecordError ¶
type DuplicatedRecordError string
func (DuplicatedRecordError) Error ¶
func (e DuplicatedRecordError) Error() string
type NotEnoughBalanceError ¶
type NotEnoughBalanceError struct {
Err error
}
func (*NotEnoughBalanceError) Error ¶
func (e *NotEnoughBalanceError) Error() string
func (*NotEnoughBalanceError) Unwrap ¶
func (e *NotEnoughBalanceError) Unwrap() error
type Option ¶
type Option func(*Repo)
func WithReplica ¶
WithReplica flexibility to choose whether to have slave pool Can be optimized to pass in multiple pools, if needed later
type RecordNotFoundError ¶
type RecordNotFoundError struct {
Err error
}
func (*RecordNotFoundError) Error ¶
func (e *RecordNotFoundError) Error() string
func (*RecordNotFoundError) Unwrap ¶
func (e *RecordNotFoundError) Unwrap() error
type Repo ¶
type Repo struct {
// contains filtered or unexported fields
}
func NewSqlcRepository ¶
func (*Repo) BatchUpsertDailyClose ¶
func (*Repo) BatchUpsertStakeConcentration ¶
func (*Repo) BatchUpsertStocks ¶
func (*Repo) BatchUpsertThreePrimary ¶
func (*Repo) CreateDailyClose ¶
func (*Repo) CreateOrder ¶
func (*Repo) CreatePickedStocks ¶
func (*Repo) CreateStock ¶
func (*Repo) CreateThreePrimary ¶
func (*Repo) CreateTransaction ¶
func (*Repo) DeletePickedStock ¶
func (*Repo) DeleteSessionID ¶
func (*Repo) DeleteStockByID ¶
func (*Repo) DeleteUserByID ¶
func (*Repo) GetBalanceView ¶
func (*Repo) GetHighestPrice ¶
func (*Repo) GetRealTimeMonitoringKeys ¶
func (*Repo) GetStakeConcentrationByStockID ¶
func (*Repo) GetStakeConcentrationLatestDataPoint ¶
func (*Repo) GetStakeConcentrationsWithVolumes ¶
func (*Repo) GetUserByEmail ¶
func (*Repo) GetUserByID ¶
func (*Repo) GetUserByPhone ¶
func (*Repo) HasDailyClose ¶
func (*Repo) HasStakeConcentration ¶
func (*Repo) LatestStockStatSnapshot ¶
func (*Repo) ListCategories ¶
func (*Repo) ListDailyClose ¶
func (repo *Repo) ListDailyClose( ctx context.Context, arg *domain.ListDailyCloseParams, ) ([]*domain.DailyClose, error)
func (*Repo) ListLatestPrice ¶
func (*Repo) ListOpenOrders ¶
func (*Repo) ListOrders ¶
func (*Repo) ListPickedStocks ¶
func (*Repo) ListSelections ¶
func (*Repo) ListSelectionsFromPicked ¶
func (*Repo) ListStocks ¶
func (*Repo) ListThreePrimary ¶
func (repo *Repo) ListThreePrimary( ctx context.Context, arg *domain.ListThreePrimaryParams, ) ([]*domain.ThreePrimary, error)
func (*Repo) RetrieveDailyCloseHistory ¶
func (*Repo) RetrieveThreePrimaryHistory ¶
func (*Repo) RunInTransaction ¶
func (*Repo) UpdateSessionID ¶
type TypeMismatchError ¶
type TypeMismatchError struct {
// contains filtered or unexported fields
}
func (*TypeMismatchError) Error ¶
func (tme *TypeMismatchError) Error() string
type UnexpectedNadexMemberStatusError ¶
type UnexpectedNadexMemberStatusError string
func (UnexpectedNadexMemberStatusError) Error ¶
func (e UnexpectedNadexMemberStatusError) Error() string
type UnsupportedTradeTypeError ¶
type UnsupportedTradeTypeError string
func (UnsupportedTradeTypeError) Error ¶
func (e UnsupportedTradeTypeError) Error() string
Click to show internal directories.
Click to hide internal directories.