🏡 index : quine-global/quintodrome.git

package agents

import (
	"context"

	"github.com/navidrome/navidrome/model"
)

// SessionKeys is a simple wrapper around the UserPropsRepository
type SessionKeys struct {
	model.DataStore
	KeyName string
}

func (sk *SessionKeys) Put(ctx context.Context, userId, sessionKey string) error {
	return sk.DataStore.UserProps().Put(ctx, userId, sk.KeyName, sessionKey)
}

func (sk *SessionKeys) Get(ctx context.Context, userId string) (string, error) {
	return sk.DataStore.UserProps().Get(ctx, userId, sk.KeyName)
}

func (sk *SessionKeys) Delete(ctx context.Context, userId string) error {
	return sk.DataStore.UserProps().Delete(ctx, userId, sk.KeyName)
}