Versions in this module Expand all Collapse all v0 v0.1.0 Jul 23, 2020 Changes in this version + var ExpireEdge = constants.ClientExpireEdge + var MaxLockAge = constants.ClientMaxLockAge + type CacheData struct + AuthToken []byte + AuthTries int + VerifyKeys [][ed25519.PublicKeySize]byte + func (cd *CacheData) Marshal() string + func (cd *CacheData) Unmarshal(d string) (*CacheData, error) + type CacheDataDB struct + AuthToken []byte + AuthTries int + VerifyKeys [][]byte + type Storage struct + DB *sql.DB + func New(db interface{}) (*Storage, error) + func NewFromDB(db *sql.DB) (*Storage, error) + func NewFromURL(dburl string) (*Storage, error) + func (ws *Storage) CleanLocks(force bool) + func (ws *Storage) DelToken(tokenHash []byte) + func (ws *Storage) ExpireUnusable() bool + func (ws *Storage) FindToken(usage string) (*client.TokenEntry, error) + func (ws *Storage) GetAndLockToken(usage string, owner *[ed25519.PublicKeySize]byte) (*client.TokenEntry, error) + func (ws *Storage) GetAuthToken() (authToken []byte, tries int) + func (ws *Storage) GetBalance(usage string, owner *[ed25519.PublicKeySize]byte) int64 + func (ws *Storage) GetBalanceOwn(usage string) int64 + func (ws *Storage) GetExpire() []byte + func (ws *Storage) GetInReissue() []byte + func (ws *Storage) GetToken(tokenHash []byte, lockID int64) (tokenEntry *client.TokenEntry, err error) + func (ws *Storage) GetVerifyKeys() [][ed25519.PublicKeySize]byte + func (ws *Storage) LockToken(tokenHash []byte) int64 + func (ws *Storage) SetAuthToken(authToken []byte, tries int) error + func (ws *Storage) SetToken(tokenEntry client.TokenEntry) error + func (ws *Storage) SetVerifyKeys(verifyKeys [][ed25519.PublicKeySize]byte) + func (ws *Storage) UnlockToken(tokenHash []byte) + type TokenEntryDBGlobal struct + CanReissue bool + Expire int64 + HasParams bool + HasState bool + Hash string + OwnedSelf bool + OwnerPrivKey string + OwnerPubKey string + Renewable bool + Token string + Usage string + type TokenEntryDBState struct + BlindingFactors []byte + NewOwnerPrivKey []byte + NewOwnerPubKey []byte + Params []byte + ServerPacket []byte