credential

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init()

Types

type ClientSeed

type ClientSeed struct {
	sync.Map
}

func (*ClientSeed) Add

func (s *ClientSeed) Add(accountID uint64, keyID int64, val []byte, expire time.Duration) error

func (*ClientSeed) Get

func (s *ClientSeed) Get(accountID uint64, keyID int64) ([]byte, error)

func (*ClientSeed) Lock

func (s *ClientSeed) Lock(accountID uint64, reason string, duration time.Duration) error

func (*ClientSeed) Refresh

func (s *ClientSeed) Refresh(accountID uint64, keyID int64, _ time.Duration) ([]byte, error)

func (*ClientSeed) Revoke

func (s *ClientSeed) Revoke(accountID uint64, keyID int64) error

func (*ClientSeed) RevokeAll

func (s *ClientSeed) RevokeAll(accountID uint64) error

func (*ClientSeed) Unlock

func (s *ClientSeed) Unlock(accountID uint64) error

type ServerSeed

type ServerSeed struct {
	sync.Map
}

func (*ServerSeed) Add

func (s *ServerSeed) Add(keyID int64, val []byte) error

func (*ServerSeed) Get

func (s *ServerSeed) Get(keyID int64) ([]byte, error)

func (*ServerSeed) Revoke

func (s *ServerSeed) Revoke(keyID int64) error

Jump to

Keyboard shortcuts

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