Documentation ¶
Index ¶
Constants ¶
View Source
const (
// TimeFormatExpiredDate is the default time layout for golang time.Parse.
TimeFormatExpiredDate = "2006-01-02 15:04:05"
)
List of constants used in this package.
Variables ¶
View Source
var ( // ErrNilToken specifies that the token passed to the function is nil. ErrNilToken = errors.New("token is nil") )
Functions ¶
This section is empty.
Types ¶
type Hub ¶
type Hub interface { Get(ctx context.Context, key string) (token *Token, err error) Save(ctx context.Context, key string, token *Token) (err error) }
Hub specifies the contract to interact with the storage provider.
func NewGoRedisV8 ¶
func NewGoRedisV8(c *redis.Client) (h Hub)
NewGoRedisV8 creates a new redis client for storage.Hub.
func NewLocalStorage ¶
func NewLocalStorage() Hub
NewLocalStorage creates a new local storage to store the token.
Click to show internal directories.
Click to hide internal directories.