Documentation
¶
Index ¶
- type Asset
- type CreateAssetParams
- type CreateUserFollowedAssetParams
- type CreateUserParams
- type DBTX
- type DeleteUserFollowedAssetParams
- type ListAssetsParams
- type ListUsersParams
- type Notification
- type NotificationType
- type NullNotificationType
- type Queries
- func (q *Queries) CreateAsset(ctx context.Context, arg CreateAssetParams) (Asset, error)
- func (q *Queries) CreateUser(ctx context.Context, arg CreateUserParams) (User, error)
- func (q *Queries) CreateUserFollowedAsset(ctx context.Context, arg CreateUserFollowedAssetParams) (UserFollowedAsset, error)
- func (q *Queries) DeleteUserFollowedAsset(ctx context.Context, arg DeleteUserFollowedAssetParams) error
- func (q *Queries) GetAllEmails(ctx context.Context) ([]string, error)
- func (q *Queries) GetAsset(ctx context.Context, cmcID int64) (Asset, error)
- func (q *Queries) GetUser(ctx context.Context, id int32) (User, error)
- func (q *Queries) GetUserByEmail(ctx context.Context, email string) (User, error)
- func (q *Queries) ListAssets(ctx context.Context, arg ListAssetsParams) ([]Asset, error)
- func (q *Queries) ListUsers(ctx context.Context, arg ListUsersParams) ([]User, error)
- func (q *Queries) UpdateAsset(ctx context.Context, arg UpdateAssetParams) (Asset, error)
- func (q *Queries) WithTx(tx *sql.Tx) *Queries
- type Store
- type UpdateAssetParams
- type User
- type UserFollowedAsset
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Asset ¶
type Asset struct { ID int32 CmcID int64 Name string Slug string Price float64 PercentChange1h float32 PercentChange24h float32 PercentChange7d float32 MarketCap float64 Volume24h float64 CirculatingSupply float32 AllTimeHigh float32 AllTimeLow float32 Turnover float32 TotalSupply float32 MaxSupply float32 CreatedAt sql.NullTime UpdatedAt sql.NullTime }
type CreateAssetParams ¶
type CreateAssetParams struct { CmcID int64 Name string Slug string Price float64 PercentChange1h float32 PercentChange24h float32 PercentChange7d float32 MarketCap float64 Volume24h float64 CirculatingSupply float32 AllTimeHigh float32 AllTimeLow float32 Turnover float32 TotalSupply float32 MaxSupply float32 }
type CreateUserParams ¶
type ListAssetsParams ¶
type ListUsersParams ¶
type Notification ¶
type Notification struct { ID int32 UserID sql.NullInt32 NotiType NotificationType Message sql.NullString IsRead sql.NullBool CreatedAt sql.NullTime }
type NotificationType ¶
type NotificationType string
const ( NotificationTypeEmail NotificationType = "email" NotificationTypeDiscord NotificationType = "discord" NotificationTypeTelegram NotificationType = "telegram" )
func (*NotificationType) Scan ¶
func (e *NotificationType) Scan(src interface{}) error
type NullNotificationType ¶
type NullNotificationType struct { NotificationType NotificationType Valid bool // Valid is true if NotificationType is not NULL }
func (*NullNotificationType) Scan ¶
func (ns *NullNotificationType) Scan(value interface{}) error
Scan implements the Scanner interface.
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func (*Queries) CreateAsset ¶
func (*Queries) CreateUser ¶
func (*Queries) CreateUserFollowedAsset ¶
func (q *Queries) CreateUserFollowedAsset(ctx context.Context, arg CreateUserFollowedAssetParams) (UserFollowedAsset, error)
func (*Queries) DeleteUserFollowedAsset ¶
func (q *Queries) DeleteUserFollowedAsset(ctx context.Context, arg DeleteUserFollowedAssetParams) error
func (*Queries) GetAllEmails ¶
func (*Queries) GetUserByEmail ¶
func (*Queries) ListAssets ¶
func (*Queries) UpdateAsset ¶
type Store ¶
type Store struct { *Queries // contains filtered or unexported fields }
Store provides all functions to excute db queries and transactions
type UpdateAssetParams ¶
type UpdateAssetParams struct { Price sql.NullFloat64 PercentChange1h sql.NullFloat64 PercentChange24h sql.NullFloat64 PercentChange7d sql.NullFloat64 MarketCap sql.NullFloat64 Volume24h sql.NullFloat64 CirculatingSupply sql.NullFloat64 AllTimeHigh sql.NullFloat64 AllTimeLow sql.NullFloat64 Turnover sql.NullFloat64 TotalSupply sql.NullFloat64 MaxSupply sql.NullFloat64 UpdatedAt sql.NullTime CmcID int64 }
Click to show internal directories.
Click to hide internal directories.