repository

package
v0.0.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 14, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnectionError

type ConnectionError struct {
	Message string
}

func (ConnectionError) Error

func (e ConnectionError) Error() string

type Database

type Database struct {
	// contains filtered or unexported fields
}

func NewDB

func NewDB(path string) (*Database, error)

func (*Database) AddCrowdfundCampaign added in v0.0.3

func (db *Database) AddCrowdfundCampaign(campaign *entity.CrowdfundCampaign) error

func (*Database) AddCrowdfundPurchase added in v0.0.4

func (db *Database) AddCrowdfundPurchase(purchase *entity.CrowdfundPurchase) error

func (*Database) AddFaucet

func (db *Database) AddFaucet(f *entity.PhoenixFaucet) error

func (*Database) AddNotification

func (db *Database) AddNotification(v *entity.Notification) error

func (*Database) AddUser

func (db *Database) AddUser(u *entity.User) error

func (*Database) AddVoucher

func (db *Database) AddVoucher(v *entity.Voucher) error

func (*Database) AddZealyUser

func (db *Database) AddZealyUser(u *entity.ZealyUser) error

func (*Database) CanGetFaucet

func (db *Database) CanGetFaucet(user *entity.User) bool

func (*Database) ClaimVoucher

func (db *Database) ClaimVoucher(id uint, txHash string, claimer uint) error

func (*Database) GetAllZealyUser

func (db *Database) GetAllZealyUser() ([]*entity.ZealyUser, error)

func (*Database) GetCrowdfundActiveCampaign added in v0.0.4

func (db *Database) GetCrowdfundActiveCampaign() *entity.CrowdfundCampaign

func (*Database) GetCrowdfundCampaign added in v0.0.3

func (db *Database) GetCrowdfundCampaign(campaignID uint) (*entity.CrowdfundCampaign, error)

func (*Database) GetCrowdfundPurchases added in v0.0.4

func (db *Database) GetCrowdfundPurchases(userID uint) ([]*entity.CrowdfundPurchase, error)

func (*Database) GetPendingMailNotification

func (db *Database) GetPendingMailNotification() (*entity.Notification, error)

func (*Database) GetUserByPlatformID

func (db *Database) GetUserByPlatformID(appID entity.PlatformID, callerID string) (*entity.User, error)

func (*Database) GetVoucherByCode

func (db *Database) GetVoucherByCode(code string) (entity.Voucher, error)

func (*Database) GetZealyUser

func (db *Database) GetZealyUser(id string) (*entity.ZealyUser, error)

func (*Database) HasUser

func (db *Database) HasUser(id uint) bool

func (*Database) ListVoucher

func (db *Database) ListVoucher() ([]*entity.Voucher, error)

func (*Database) UpdateCrowdfundPurchase added in v0.0.4

func (db *Database) UpdateCrowdfundPurchase(purchase *entity.CrowdfundPurchase) error

func (*Database) UpdateNotificationStatus

func (db *Database) UpdateNotificationStatus(id uint, status entity.NotificationStatus) error

func (*Database) UpdateZealyUser

func (db *Database) UpdateZealyUser(id, txHash string) error

type MigrationError

type MigrationError struct {
	Message string
}

func (MigrationError) Error

func (e MigrationError) Error() string

type ReadError

type ReadError struct {
	Message string
}

func (ReadError) Error

func (e ReadError) Error() string

type WriteError

type WriteError struct {
	Message string
}

func (WriteError) Error

func (e WriteError) Error() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL