Documentation ¶
Overview ¶
Package userkv provides a simple key-value store for users.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repository ¶
type Repository interface { Get(ctx context.Context, owner, key string) (string, error) Upsert(ctx context.Context, owner, key, value string) error Clean(ctx context.Context, ccid string) error }
Repository is the interface for userkv repository
func NewRepository ¶
func NewRepository(db *gorm.DB) Repository
NewRepository creates a new userkv repository
type Service ¶
type Service interface { Get(ctx context.Context, userID string, key string) (string, error) Upsert(ctx context.Context, userID string, key string, value string) error Clean(ctx context.Context, ccid string) error }
Service is the interface for userkv service
func NewService ¶
func NewService(repository Repository) Service
NewService creates a new userkv service
Click to show internal directories.
Click to hide internal directories.