Documentation ¶
Overview ¶
package backends provides different storage back ends for the configuration of a
TAP node. Backends need to only be k/v stores. The in-memory provider is given as an example and usefule for testing
Index ¶
- type InMemoryBackend
- func (m *InMemoryBackend) DeleteKey(key, orgId string) error
- func (m *InMemoryBackend) GetAll(orgId string) []interface{}
- func (m *InMemoryBackend) GetKey(key string, orgId string, target interface{}) error
- func (m *InMemoryBackend) Init(config interface{}) error
- func (m *InMemoryBackend) SetKey(key string, orgId string, val interface{}) error
- type KeyError
- type MongoBackend
- func (m MongoBackend) DeleteKey(key string, orgId string) error
- func (m MongoBackend) GetAll(orgId string) []interface{}
- func (m MongoBackend) GetKey(key string, orgId string, val interface{}) error
- func (m MongoBackend) Init(interface{}) error
- func (m MongoBackend) SetKey(key string, orgId string, value interface{}) error
- type RedisBackend
- func (r *RedisBackend) Connect() error
- func (r *RedisBackend) DeleteKey(key string, orgId string) error
- func (r *RedisBackend) GetAll(orgId string) []interface{}
- func (r *RedisBackend) GetKey(key string, orgId string, val interface{}) error
- func (r *RedisBackend) GetKeys(filter string) []string
- func (r *RedisBackend) Init(config interface{}) error
- func (r *RedisBackend) SetDb(kv temporal.KeyValue)
- func (r *RedisBackend) SetKey(key string, orgId string, val interface{}) error
- type RedisConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InMemoryBackend ¶
type InMemoryBackend struct {
// contains filtered or unexported fields
}
InMemoryBackend implements tap.AuthRegisterBackend to store profile configs in memory
func (*InMemoryBackend) DeleteKey ¶
func (m *InMemoryBackend) DeleteKey(key, orgId string) error
SetKey will set the value of a key in the map
func (*InMemoryBackend) GetAll ¶
func (m *InMemoryBackend) GetAll(orgId string) []interface{}
func (*InMemoryBackend) GetKey ¶
func (m *InMemoryBackend) GetKey(key string, orgId string, target interface{}) error
GetKey will retuyrn the value of a key as an interface
func (*InMemoryBackend) Init ¶
func (m *InMemoryBackend) Init(config interface{}) error
Init will create the initial in-memory store structures
type MongoBackend ¶ added in v1.1.0
type MongoBackend struct { Store persistent.PersistentStorage Collection string }
func (MongoBackend) DeleteKey ¶ added in v1.1.0
func (m MongoBackend) DeleteKey(key string, orgId string) error
func (MongoBackend) GetAll ¶ added in v1.1.0
func (m MongoBackend) GetAll(orgId string) []interface{}
func (MongoBackend) GetKey ¶ added in v1.1.0
func (m MongoBackend) GetKey(key string, orgId string, val interface{}) error
func (MongoBackend) Init ¶ added in v1.1.0
func (m MongoBackend) Init(interface{}) error
type RedisBackend ¶
type RedisBackend struct { HashKeys bool KeyPrefix string // contains filtered or unexported fields }
func (*RedisBackend) Connect ¶ added in v1.1.0
func (r *RedisBackend) Connect() error
func (*RedisBackend) GetAll ¶
func (r *RedisBackend) GetAll(orgId string) []interface{}
func (*RedisBackend) GetKey ¶
func (r *RedisBackend) GetKey(key string, orgId string, val interface{}) error
func (*RedisBackend) GetKeys ¶ added in v1.1.0
func (r *RedisBackend) GetKeys(filter string) []string
GetKeys will return all keys according to the filter (filter is a prefix - e.g. tyk.keys.*)
func (*RedisBackend) Init ¶
func (r *RedisBackend) Init(config interface{}) error
Init will create the initial in-memory store structures
func (*RedisBackend) SetDb ¶ added in v1.1.0
func (r *RedisBackend) SetDb(kv temporal.KeyValue)
SetDb from existent connection
type RedisConfig ¶
type RedisConfig configuration.IdentityBackendSettings
Click to show internal directories.
Click to hide internal directories.