Documentation ¶
Index ¶
- type Storage
- func (st *Storage) AddFundedUserWithWaitTime(userID []byte, authType string) error
- func (st *Storage) CheckFundedUserWithWaitTime(userID []byte, authType string) (bool, time.Time)
- func (st *Storage) Close() error
- func (st *Storage) Delete(key []byte) error
- func (st *Storage) Get(key []byte) ([]byte, error)
- func (st *Storage) Set(key, value []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
Storage is a key-value storage for the faucet.
func New ¶
func New(dbType string, dataDir string, waitPeriod time.Duration, dbPrefix []byte) (*Storage, error)
New creates a new storage instance.
func (*Storage) AddFundedUserWithWaitTime ¶
AddFundedUserWithWaitTime adds the given userID to the funded list, with the current time as the wait period end time.
func (*Storage) CheckFundedUserWithWaitTime ¶
checkIsFundedUserID checks if the given text is funded and returns true if it is, within the wait period time window. Otherwise, it returns false.
Click to show internal directories.
Click to hide internal directories.