2023-09-26 17:16:58 +08:00
|
|
|
package store
|
|
|
|
|
2023-09-26 19:02:48 +08:00
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
|
|
|
|
storepb "github.com/usememos/memos/proto/gen/store"
|
|
|
|
)
|
2023-09-26 17:16:58 +08:00
|
|
|
|
|
|
|
type Driver interface {
|
|
|
|
CreateActivity(ctx context.Context, create *Activity) (*Activity, error)
|
|
|
|
|
|
|
|
UpsertSystemSetting(ctx context.Context, upsert *SystemSetting) (*SystemSetting, error)
|
|
|
|
ListSystemSettings(ctx context.Context, find *FindSystemSetting) ([]*SystemSetting, error)
|
2023-09-26 18:23:45 +08:00
|
|
|
|
|
|
|
CreateUser(ctx context.Context, create *User) (*User, error)
|
|
|
|
UpdateUser(ctx context.Context, update *UpdateUser) (*User, error)
|
|
|
|
ListUsers(ctx context.Context, find *FindUser) ([]*User, error)
|
|
|
|
DeleteUser(ctx context.Context, delete *DeleteUser) error
|
2023-09-26 19:02:48 +08:00
|
|
|
|
|
|
|
UpsertUserSetting(ctx context.Context, upsert *UserSetting) (*UserSetting, error)
|
|
|
|
ListUserSettings(ctx context.Context, find *FindUserSetting) ([]*UserSetting, error)
|
|
|
|
UpsertUserSettingV1(ctx context.Context, upsert *storepb.UserSetting) (*storepb.UserSetting, error)
|
|
|
|
ListUserSettingsV1(ctx context.Context, find *FindUserSettingV1) ([]*storepb.UserSetting, error)
|
2023-09-26 17:16:58 +08:00
|
|
|
}
|