Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterClientImplementor ¶
func RegisterClientImplementor(cli Client)
Register service implementor.
func RegisterServerImplementor ¶
func RegisterServerImplementor(svr Server)
Register service implementor.
Types ¶
type Client ¶
type Client interface {
// Add a new secret key.
Add(accountID uint64, keyID int64, val []byte, expire time.Duration) error
// Get and refresh the secret key's expiration.
Refresh(accountID uint64, keyID int64, expire time.Duration) ([]byte, error)
// Get secret key.
Get(accountID uint64, keyID int64) ([]byte, error)
// Revoke the secret key of the specified ID.
Revoke(accountID uint64, keyID int64) error
// Revoke all secret keys of the specified account ID.
RevokeAll(accountID uint64) error
// Lock all secret keys for a specified duration.
// Returns codes.FailedPrecondition (9).
Lock(accountID uint64, reason string, duration time.Duration) error
// Unlock secret keys.
Unlock(accountID uint64) error
}
Client secret key.
Click to show internal directories.
Click to hide internal directories.