storage

package
v0.0.0-...-f6de6f3 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2015 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ClientPrefix          = "client."
	AuthorizePrefix       = "authorization."
	AccessPrefix          = "access."
	RefreshPrefix         = "refresh."
	UserIdAccessKeyPrefix = "userIdAccessKey."
)

Variables

This section is empty.

Functions

This section is empty.

Types

type RedisStorage

type RedisStorage struct {
	// contains filtered or unexported fields
}

func NewRedisStorage

func NewRedisStorage(
	generalConfig *config.RedisGeneralConfig,
	masterConfig *config.RedisInstanceConfig,
	slaveConfig *config.RedisInstanceConfig,
	serverConfig *config.ServerConfig) *RedisStorage

func (*RedisStorage) Clone

func (storage *RedisStorage) Clone() osin.Storage

func (*RedisStorage) Close

func (storage *RedisStorage) Close()

This is an inteface function called after each reponse has been handled. We do not want to recreate the storage object for each request, so this function is empty

func (*RedisStorage) DeleteKey

func (storage *RedisStorage) DeleteKey(keyName string) error

func (*RedisStorage) DoClose

func (storage *RedisStorage) DoClose()

func (*RedisStorage) GetAccessForUserId

func (storage *RedisStorage) GetAccessForUserId(userId string) (*osin.AccessData, error)

func (*RedisStorage) GetClient

func (storage *RedisStorage) GetClient(id string) (osin.Client, error)

func (*RedisStorage) GetKey

func (storage *RedisStorage) GetKey(keyName string, mustExist bool) ([]byte, error)

func (*RedisStorage) LoadAccess

func (storage *RedisStorage) LoadAccess(token string) (*osin.AccessData, error)

func (*RedisStorage) LoadAuthorize

func (storage *RedisStorage) LoadAuthorize(code string) (*osin.AuthorizeData, error)

func (*RedisStorage) LoadRefresh

func (storage *RedisStorage) LoadRefresh(token string) (*osin.AccessData, error)

func (*RedisStorage) Ping

func (storage *RedisStorage) Ping(pool *redis.Pool) error

func (*RedisStorage) PingMaster

func (storage *RedisStorage) PingMaster() error

func (*RedisStorage) PingSlave

func (storage *RedisStorage) PingSlave() error

func (*RedisStorage) RemoveAccess

func (storage *RedisStorage) RemoveAccess(token string) error

func (*RedisStorage) RemoveAuthorize

func (storage *RedisStorage) RemoveAuthorize(code string) error

func (*RedisStorage) RemoveRefresh

func (storage *RedisStorage) RemoveRefresh(token string) error

func (*RedisStorage) SaveAccess

func (storage *RedisStorage) SaveAccess(data *osin.AccessData) error

func (*RedisStorage) SaveAccessTokenForUserId

func (storage *RedisStorage) SaveAccessTokenForUserId(data *osin.AccessData) error

func (*RedisStorage) SaveAuthorize

func (storage *RedisStorage) SaveAuthorize(data *osin.AuthorizeData) error

func (*RedisStorage) SetClient

func (storage *RedisStorage) SetClient(id string, client osin.Client) error

func (*RedisStorage) SetExpirableKey

func (storage *RedisStorage) SetExpirableKey(key string, value []byte, expireInSec int) error

func (*RedisStorage) SetForceUseSlave

func (storage *RedisStorage) SetForceUseSlave(forceUseSlave bool)

func (*RedisStorage) SetKey

func (storage *RedisStorage) SetKey(key string, value []byte) error

type StorageDisabledError

type StorageDisabledError struct {
}

func (*StorageDisabledError) Error

func (e *StorageDisabledError) Error() string

Jump to

Keyboard shortcuts

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