Versions in this module Expand all Collapse all v1 v1.0.0 Apr 28, 2024 v1.0.0-rc.0 Nov 3, 2024 v0 v0.5.3 Feb 6, 2024 v0.5.2 Jan 21, 2024 v0.5.1 Dec 24, 2023 Changes in this version + func ConvertRowStatusStringToStorepb(status string) storepb.RowStatus + type Activity struct + CreatedTs int64 + CreatorID int32 + ID int32 + Level ActivityLevel + Payload string + Type ActivityType + type ActivityLevel string + const ActivityError + const ActivityInfo + const ActivityWarn + func (l ActivityLevel) String() string + type ActivityType string + const ActivityShortcutCreate + const ActivityShortcutView + func (t ActivityType) String() string + type DeleteCollection struct + ID int32 + type DeleteMemo struct + ID int32 + type DeleteShortcut struct + ID int32 + type DeleteUser struct + ID int32 + type Driver interface + Close func() error + CreateActivity func(ctx context.Context, create *Activity) (*Activity, error) + CreateCollection func(ctx context.Context, create *storepb.Collection) (*storepb.Collection, error) + CreateMemo func(ctx context.Context, create *storepb.Memo) (*storepb.Memo, error) + CreateShortcut func(ctx context.Context, create *storepb.Shortcut) (*storepb.Shortcut, error) + CreateUser func(ctx context.Context, create *User) (*User, error) + DeleteCollection func(ctx context.Context, delete *DeleteCollection) error + DeleteMemo func(ctx context.Context, delete *DeleteMemo) error + DeleteShortcut func(ctx context.Context, delete *DeleteShortcut) error + DeleteUser func(ctx context.Context, delete *DeleteUser) error + GetDB func() *sql.DB + ListActivities func(ctx context.Context, find *FindActivity) ([]*Activity, error) + ListCollections func(ctx context.Context, find *FindCollection) ([]*storepb.Collection, error) + ListMemos func(ctx context.Context, find *FindMemo) ([]*storepb.Memo, error) + ListMigrationHistories func(ctx context.Context, find *FindMigrationHistory) ([]*MigrationHistory, error) + ListShortcuts func(ctx context.Context, find *FindShortcut) ([]*storepb.Shortcut, error) + ListUserSettings func(ctx context.Context, find *FindUserSetting) ([]*storepb.UserSetting, error) + ListUsers func(ctx context.Context, find *FindUser) ([]*User, error) + ListWorkspaceSettings func(ctx context.Context, find *FindWorkspaceSetting) ([]*storepb.WorkspaceSetting, error) + Migrate func(ctx context.Context) error + Seed func(ctx context.Context) error + UpdateCollection func(ctx context.Context, update *UpdateCollection) (*storepb.Collection, error) + UpdateMemo func(ctx context.Context, update *UpdateMemo) (*storepb.Memo, error) + UpdateShortcut func(ctx context.Context, update *UpdateShortcut) (*storepb.Shortcut, error) + UpdateUser func(ctx context.Context, update *UpdateUser) (*User, error) + UpsertMigrationHistory func(ctx context.Context, upsert *UpsertMigrationHistory) (*MigrationHistory, error) + UpsertUserSetting func(ctx context.Context, upsert *storepb.UserSetting) (*storepb.UserSetting, error) + UpsertWorkspaceSetting func(ctx context.Context, upsert *storepb.WorkspaceSetting) (*storepb.WorkspaceSetting, error) + type FindActivity struct + Level ActivityLevel + PayloadShortcutID *int32 + Type ActivityType + type FindCollection struct + CreatorID *int32 + ID *int32 + Name *string + VisibilityList []Visibility + type FindMemo struct + CreatorID *int32 + ID *int32 + Name *string + RowStatus *RowStatus + Tag *string + VisibilityList []Visibility + type FindMigrationHistory struct + type FindShortcut struct + CreatorID *int32 + ID *int32 + Name *string + RowStatus *RowStatus + Tag *string + VisibilityList []Visibility + type FindUser struct + Email *string + ID *int32 + Nickname *string + Role *Role + RowStatus *RowStatus + type FindUserSetting struct + Key storepb.UserSettingKey + UserID *int32 + type FindWorkspaceSetting struct + Key storepb.WorkspaceSettingKey + type MigrationHistory struct + CreatedTs int64 + Version string + type Role string + const RoleAdmin + const RoleUser + type RowStatus string + const Archived + const Normal + func (e RowStatus) String() string + type Store struct + func New(driver Driver, profile *profile.Profile) *Store + func (s *Store) Close() error + func (s *Store) CreateActivity(ctx context.Context, create *Activity) (*Activity, error) + func (s *Store) CreateCollection(ctx context.Context, create *storepb.Collection) (*storepb.Collection, error) + func (s *Store) CreateMemo(ctx context.Context, create *storepb.Memo) (*storepb.Memo, error) + func (s *Store) CreateShortcut(ctx context.Context, create *storepb.Shortcut) (*storepb.Shortcut, error) + func (s *Store) CreateUser(ctx context.Context, create *User) (*User, error) + func (s *Store) DeleteCollection(ctx context.Context, delete *DeleteCollection) error + func (s *Store) DeleteMemo(ctx context.Context, delete *DeleteMemo) error + func (s *Store) DeleteShortcut(ctx context.Context, delete *DeleteShortcut) error + func (s *Store) DeleteUser(ctx context.Context, delete *DeleteUser) error + func (s *Store) GetActivity(ctx context.Context, find *FindActivity) (*Activity, error) + func (s *Store) GetCollection(ctx context.Context, find *FindCollection) (*storepb.Collection, error) + func (s *Store) GetMemo(ctx context.Context, find *FindMemo) (*storepb.Memo, error) + func (s *Store) GetShortcut(ctx context.Context, find *FindShortcut) (*storepb.Shortcut, error) + func (s *Store) GetUser(ctx context.Context, find *FindUser) (*User, error) + func (s *Store) GetUserAccessTokens(ctx context.Context, userID int32) ([]*storepb.AccessTokensUserSetting_AccessToken, error) + func (s *Store) GetUserSetting(ctx context.Context, find *FindUserSetting) (*storepb.UserSetting, error) + func (s *Store) GetWorkspaceSetting(ctx context.Context, find *FindWorkspaceSetting) (*storepb.WorkspaceSetting, error) + func (s *Store) ListActivities(ctx context.Context, find *FindActivity) ([]*Activity, error) + func (s *Store) ListCollections(ctx context.Context, find *FindCollection) ([]*storepb.Collection, error) + func (s *Store) ListMemos(ctx context.Context, find *FindMemo) ([]*storepb.Memo, error) + func (s *Store) ListShortcuts(ctx context.Context, find *FindShortcut) ([]*storepb.Shortcut, error) + func (s *Store) ListUserSettings(ctx context.Context, find *FindUserSetting) ([]*storepb.UserSetting, error) + func (s *Store) ListUsers(ctx context.Context, find *FindUser) ([]*User, error) + func (s *Store) ListWorkspaceSettings(ctx context.Context, find *FindWorkspaceSetting) ([]*storepb.WorkspaceSetting, error) + func (s *Store) UpdateCollection(ctx context.Context, update *UpdateCollection) (*storepb.Collection, error) + func (s *Store) UpdateMemo(ctx context.Context, update *UpdateMemo) (*storepb.Memo, error) + func (s *Store) UpdateShortcut(ctx context.Context, update *UpdateShortcut) (*storepb.Shortcut, error) + func (s *Store) UpdateUser(ctx context.Context, update *UpdateUser) (*User, error) + func (s *Store) UpsertUserSetting(ctx context.Context, upsert *storepb.UserSetting) (*storepb.UserSetting, error) + func (s *Store) UpsertWorkspaceSetting(ctx context.Context, upsert *storepb.WorkspaceSetting) (*storepb.WorkspaceSetting, error) + type UpdateCollection struct + Description *string + ID int32 + Link *string + Name *string + RowStatus *RowStatus + ShortcutIDs []int32 + Title *string + Visibility *Visibility + type UpdateMemo struct + Content *string + ID int32 + Name *string + RowStatus *RowStatus + Tag *string + Title *string + Visibility *Visibility + type UpdateShortcut struct + Description *string + ID int32 + Link *string + Name *string + OpenGraphMetadata *storepb.OpenGraphMetadata + RowStatus *RowStatus + Tag *string + Title *string + Visibility *Visibility + type UpdateUser struct + Email *string + ID int32 + Nickname *string + PasswordHash *string + Role *Role + RowStatus *RowStatus + type UpsertMigrationHistory struct + Version string + type User struct + CreatedTs int64 + Email string + ID int32 + Nickname string + PasswordHash string + Role Role + RowStatus RowStatus + UpdatedTs int64 + type Visibility string + const VisibilityPrivate + const VisibilityPublic + const VisibilityWorkspace + func (e Visibility) String() string