Documentation ¶
Overview ¶
Package redis provides Redis implementations of interfaces used by joinserver.
Index ¶
- Constants
- type ApplicationActivationSettingRegistry
- func (r *ApplicationActivationSettingRegistry) GetByID(ctx context.Context, appID *ttnpb.ApplicationIdentifiers, paths []string) (*ttnpb.ApplicationActivationSettings, error)
- func (r *ApplicationActivationSettingRegistry) Init(ctx context.Context) error
- func (r *ApplicationActivationSettingRegistry) Range(ctx context.Context, paths []string, ...) error
- func (r *ApplicationActivationSettingRegistry) SetByID(ctx context.Context, appID *ttnpb.ApplicationIdentifiers, gets []string, ...) (*ttnpb.ApplicationActivationSettings, error)
- type DeviceRegistry
- func (r *DeviceRegistry) GetByEUI(ctx context.Context, joinEUI, devEUI types.EUI64, paths []string) (*ttnpb.ContextualEndDevice, error)
- func (r *DeviceRegistry) GetByID(ctx context.Context, appID *ttnpb.ApplicationIdentifiers, devID string, ...) (*ttnpb.EndDevice, error)
- func (r *DeviceRegistry) Init(ctx context.Context) error
- func (r *DeviceRegistry) RangeByID(ctx context.Context, paths []string, ...) error
- func (r *DeviceRegistry) SetByEUI(ctx context.Context, joinEUI types.EUI64, devEUI types.EUI64, gets []string, ...) (*ttnpb.ContextualEndDevice, error)
- func (r *DeviceRegistry) SetByID(ctx context.Context, appID *ttnpb.ApplicationIdentifiers, devID string, ...) (*ttnpb.EndDevice, error)
- type KeyRegistry
- func (r *KeyRegistry) Delete(ctx context.Context, joinEUI, devEUI types.EUI64) error
- func (r *KeyRegistry) GetByID(ctx context.Context, joinEUI, devEUI types.EUI64, id []byte, paths []string) (*ttnpb.SessionKeys, error)
- func (r *KeyRegistry) Init(ctx context.Context) error
- func (r *KeyRegistry) SetByID(ctx context.Context, joinEUI, devEUI types.EUI64, id []byte, gets []string, ...) (*ttnpb.SessionKeys, error)
Constants ¶
const SchemaVersion = 1
SchemaVersion is the Network Server database schema version. Bump when a migration is required.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApplicationActivationSettingRegistry ¶ added in v3.10.0
ApplicationActivationSettingRegistry is an implementation of joinserver.ApplicationActivationSettingRegistry.
func (*ApplicationActivationSettingRegistry) GetByID ¶ added in v3.10.0
func (r *ApplicationActivationSettingRegistry) GetByID(ctx context.Context, appID *ttnpb.ApplicationIdentifiers, paths []string) (*ttnpb.ApplicationActivationSettings, error)
GetByID gets application activation settings by appID.
func (*ApplicationActivationSettingRegistry) Init ¶ added in v3.15.2
func (r *ApplicationActivationSettingRegistry) Init(ctx context.Context) error
Init initializes the ApplicationActivationSettingRegistry.
func (*ApplicationActivationSettingRegistry) Range ¶ added in v3.16.0
func (r *ApplicationActivationSettingRegistry) Range(ctx context.Context, paths []string, f func(context.Context, *ttnpb.ApplicationIdentifiers, *ttnpb.ApplicationActivationSettings) bool) error
func (*ApplicationActivationSettingRegistry) SetByID ¶ added in v3.10.0
func (r *ApplicationActivationSettingRegistry) SetByID(ctx context.Context, appID *ttnpb.ApplicationIdentifiers, gets []string, f func(*ttnpb.ApplicationActivationSettings) (*ttnpb.ApplicationActivationSettings, []string, error)) (*ttnpb.ApplicationActivationSettings, error)
SetByID sets application activation settings by appID.
type DeviceRegistry ¶
DeviceRegistry is an implementation of joinserver.DeviceRegistry.
func (*DeviceRegistry) GetByEUI ¶
func (r *DeviceRegistry) GetByEUI(ctx context.Context, joinEUI, devEUI types.EUI64, paths []string) (*ttnpb.ContextualEndDevice, error)
GetByEUI gets device by joinEUI, devEUI.
func (*DeviceRegistry) GetByID ¶
func (r *DeviceRegistry) GetByID(ctx context.Context, appID *ttnpb.ApplicationIdentifiers, devID string, paths []string) (*ttnpb.EndDevice, error)
GetByID gets device by appID, devID.
func (*DeviceRegistry) Init ¶ added in v3.15.2
func (r *DeviceRegistry) Init(ctx context.Context) error
Init initializes the DeviceRegistry.
func (*DeviceRegistry) SetByEUI ¶
func (r *DeviceRegistry) SetByEUI(ctx context.Context, joinEUI types.EUI64, devEUI types.EUI64, gets []string, f func(context.Context, *ttnpb.EndDevice) (*ttnpb.EndDevice, []string, error)) (*ttnpb.ContextualEndDevice, error)
SetByEUI sets device by joinEUI, devEUI. SetByEUI will only succeed if the device is set via SetByID first.
type KeyRegistry ¶
type KeyRegistry struct { Redis *ttnredis.Client LockTTL time.Duration // Limit is the maximum number of session keys to store per JoinEUI and DevEUI combination. Limit int }
KeyRegistry is an implementation of joinserver.KeyRegistry.
func (*KeyRegistry) GetByID ¶
func (r *KeyRegistry) GetByID(ctx context.Context, joinEUI, devEUI types.EUI64, id []byte, paths []string) (*ttnpb.SessionKeys, error)
GetByID gets session keys by joinEUI, devEUI, id.
func (*KeyRegistry) Init ¶ added in v3.15.2
func (r *KeyRegistry) Init(ctx context.Context) error
Init initializes the KeyRegistry.
func (*KeyRegistry) SetByID ¶
func (r *KeyRegistry) SetByID(ctx context.Context, joinEUI, devEUI types.EUI64, id []byte, gets []string, f func(*ttnpb.SessionKeys) (*ttnpb.SessionKeys, []string, error)) (*ttnpb.SessionKeys, error)
SetByID sets session keys by joinEUI, devEUI, id.