Documentation ¶
Index ¶
Constants ¶
View Source
const ( InMemoryDriver string = "inmemory" RedisDriver string = "redis" )
Variables ¶
View Source
var ErrNotFound error = fmt.Errorf("item not found in cache")
Functions ¶
This section is empty.
Types ¶
type AuthorizationState ¶ added in v0.1.1
type MemoryCache ¶
type MemoryCache struct {
// contains filtered or unexported fields
}
func NewInMemoryCache ¶
func NewInMemoryCache(defaultExpiration time.Duration) *MemoryCache
func (*MemoryCache) DeleteState ¶ added in v0.1.1
func (i *MemoryCache) DeleteState(state string) error
func (*MemoryCache) GetRedirectURI ¶
func (i *MemoryCache) GetRedirectURI(state string) (AuthorizationState, error)
func (*MemoryCache) SetRedirectURI ¶
func (i *MemoryCache) SetRedirectURI(state string, authZState AuthorizationState) error
type RedisCache ¶
type RedisCache struct {
// contains filtered or unexported fields
}
func NewRedisCache ¶
func NewRedisCache(redisCfg RedisConfig, defaultExpiration time.Duration) (*RedisCache, error)
func (*RedisCache) DeleteState ¶ added in v0.1.1
func (r *RedisCache) DeleteState(state string) error
func (*RedisCache) GetRedirectURI ¶
func (r *RedisCache) GetRedirectURI(state string) (AuthorizationState, error)
func (*RedisCache) SetRedirectURI ¶
func (r *RedisCache) SetRedirectURI(state string, authZState AuthorizationState) error
type RedisConfig ¶
Click to show internal directories.
Click to hide internal directories.