Documentation
¶
Index ¶
- type API
- func (api *API) CreateAddress(addresses ...Address) error
- func (api *API) CreateEmail(userId string, email string, description string, pubkey string) error
- func (api *API) CreateUser() (User, error)
- func (api *API) CreateWebhook(userId string, name string, url string) error
- func (api *API) CreateXpub(userId string, pubkey string, name *string, gap int) (Xpub, error)
- func (api *API) DeleteAddress(userId string, addressId string) error
- func (api *API) DeleteAddresses(userId string) error
- func (api *API) DeleteEmail(userId string, notificationId string) error
- func (api *API) DeleteEmails(userId string) error
- func (api *API) DeleteUserXpubs(userId string) error
- func (api *API) DeleteWebhook(userId string, notificationId string) error
- func (api *API) DeleteWebhooks(userId string) error
- func (api *API) DeleteXpub(userId string, xpubId string) error
- func (api *API) GetAddress(address string) (*Address, error)
- func (api *API) GetAddressById(addressId string, userId string) (*Address, error)
- func (api *API) GetAddresses() []Address
- func (api *API) GetAddressesForUser(userId string) []Address
- func (api *API) GetAddressesForXpub(userId string, xpubId string) []Address
- func (api *API) GetAddressesWithoutXpub(userId string) []Address
- func (api *API) GetDailyEmailCount(address_id string, user_id string) (int, error)
- func (api *API) GetEmail(userId string, notificationId string) (Email, error)
- func (api *API) GetEmailByAddress(userId string, address string) (Email, error)
- func (api *API) GetUser(userId string) (User, error)
- func (api *API) GetUserByUsername(username string) (User, error)
- func (api *API) GetUserEmails(userId string) ([]Email, error)
- func (api *API) GetUserWebhooks(userId string) ([]Webhook, error)
- func (api *API) GetVerifiedUserEmails(userId string) ([]Email, error)
- func (api *API) GetWebhook(userId string, id string) (Webhook, error)
- func (api *API) GetWebhooks() ([]Webhook, error)
- func (api *API) GetXpub(userId string, xpub_id string) (Xpub, error)
- func (api *API) GetXpubs(userId string) ([]Xpub, error)
- func (api *API) LogAlertEmail(email string, user_id string, address_id string, transaction_id string, ...) error
- func (api *API) ResetVerificationCode(userId string, notificationId string) (Email, error)
- func (api *API) SoftDeleteUser(userId string) error
- func (api *API) UpdateAddressUTXOs(scriptHash string, utxos []*electrum.ListUnspentResult) error
- func (api *API) UpdateEmailDescription(userId string, notificationId string, description string) error
- func (api *API) UpdateEmailPubkey(userId string, notificationId string, pubkey string) error
- func (api *API) UpdateWebhook(userId string, notificationId string, url string, name string) error
- func (api *API) VerifyEmail(userId string, notificationId string, verificationCode string) error
- type Address
- type DB
- type Email
- type Model
- type User
- type UtxoMonitor
- type UtxoResult
- type Webhook
- type Xpub
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
func (*API) CreateAddress ¶
func (*API) CreateEmail ¶
func (*API) CreateUser ¶
func (*API) CreateWebhook ¶
func (*API) CreateXpub ¶
func (*API) DeleteAddresses ¶
func (*API) DeleteEmails ¶
func (*API) DeleteUserXpubs ¶
func (*API) DeleteWebhook ¶
func (*API) DeleteWebhooks ¶
func (*API) GetAddressById ¶
func (*API) GetAddresses ¶
func (*API) GetAddressesForUser ¶
func (*API) GetAddressesForXpub ¶
func (*API) GetAddressesWithoutXpub ¶
func (*API) GetDailyEmailCount ¶
func (*API) GetEmailByAddress ¶
func (*API) GetVerifiedUserEmails ¶
func (*API) GetWebhooks ¶
func (*API) LogAlertEmail ¶
func (*API) ResetVerificationCode ¶
func (*API) SoftDeleteUser ¶
func (*API) UpdateAddressUTXOs ¶
func (api *API) UpdateAddressUTXOs(scriptHash string, utxos []*electrum.ListUnspentResult) error
func (*API) UpdateEmailDescription ¶
func (*API) UpdateEmailPubkey ¶
func (*API) UpdateWebhook ¶
type DB ¶ added in v1.1.4
type DB interface {
Ping(ctx context.Context) error
SendBatch(ctx context.Context, b *pgx.Batch) pgx.BatchResults
Select(ctx context.Context, dest any, query string, args ...any) error
Exec(ctx context.Context, sql string, arguments ...any) (pgconn.CommandTag, error)
Query(ctx context.Context, sql string, args ...any) (pgx.Rows, error)
QueryRow(ctx context.Context, sql string, args ...any) pgx.Row
}
type Email ¶
type Email struct {
Model
UserID string `db:"user_id"`
Description string `form:"description"`
Email string `form:"email"`
IsVerified bool `db:"is_verified"`
VerificationCode string `db:"verification_code"`
VerificationExpires *time.Time `db:"verification_expires"`
VerifiedOn *time.Time `db:"verified_on"`
Pubkey *string `db:"pgp_pubkey"`
}
type UtxoMonitor ¶
type UtxoMonitor interface {
EnqueueScan(scriptHash string)
GetUtxoStream() <-chan interface{}
}
type UtxoResult ¶
type UtxoResult interface {
GetScriptHash() string
GetUtxoData() []*electrum.ListUnspentResult
}
Click to show internal directories.
Click to hide internal directories.