Documentation
¶
Index ¶
- Constants
- Variables
- type Activity
- type ActivityLevel
- type ActivityType
- type Attachment
- type DeleteAttachment
- type DeleteIdentityProvider
- type DeleteInbox
- type DeleteInstanceSetting
- type DeleteMemo
- type DeleteMemoRelation
- type DeleteReaction
- type DeleteUser
- type Driver
- type FindActivity
- type FindAttachment
- type FindIdentityProvider
- type FindInbox
- type FindInstanceSetting
- type FindMemo
- type FindMemoPayload
- type FindMemoRelation
- type FindMigrationHistory
- type FindReaction
- type FindUser
- type FindUserSetting
- type IdentityProvider
- type Inbox
- type InboxStatus
- type InstanceSetting
- type Memo
- type MemoRelation
- type MemoRelationType
- type MigrationHistory
- type Reaction
- type Role
- type RowStatus
- type Store
- func (s *Store) AddUserSession(ctx context.Context, userID int32, ...) error
- func (s *Store) AddUserWebhook(ctx context.Context, userID int32, ...) error
- func (s *Store) Close() error
- func (s *Store) CreateActivity(ctx context.Context, create *Activity) (*Activity, error)
- func (s *Store) CreateAttachment(ctx context.Context, create *Attachment) (*Attachment, error)
- func (s *Store) CreateIdentityProvider(ctx context.Context, create *storepb.IdentityProvider) (*storepb.IdentityProvider, error)
- func (s *Store) CreateInbox(ctx context.Context, create *Inbox) (*Inbox, error)
- func (s *Store) CreateMemo(ctx context.Context, create *Memo) (*Memo, error)
- func (s *Store) CreateUser(ctx context.Context, create *User) (*User, error)
- func (s *Store) DeleteAttachment(ctx context.Context, delete *DeleteAttachment) error
- func (s *Store) DeleteIdentityProvider(ctx context.Context, delete *DeleteIdentityProvider) error
- func (s *Store) DeleteInbox(ctx context.Context, delete *DeleteInbox) error
- func (s *Store) DeleteMemo(ctx context.Context, delete *DeleteMemo) error
- func (s *Store) DeleteMemoRelation(ctx context.Context, delete *DeleteMemoRelation) error
- func (s *Store) DeleteReaction(ctx context.Context, delete *DeleteReaction) 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) GetAttachment(ctx context.Context, find *FindAttachment) (*Attachment, error)
- func (s *Store) GetCurrentSchemaVersion() (string, error)
- func (s *Store) GetDriver() Driver
- func (s *Store) GetIdentityProvider(ctx context.Context, find *FindIdentityProvider) (*storepb.IdentityProvider, error)
- func (s *Store) GetInstanceBasicSetting(ctx context.Context) (*storepb.InstanceBasicSetting, error)
- func (s *Store) GetInstanceGeneralSetting(ctx context.Context) (*storepb.InstanceGeneralSetting, error)
- func (s *Store) GetInstanceMemoRelatedSetting(ctx context.Context) (*storepb.InstanceMemoRelatedSetting, error)
- func (s *Store) GetInstanceSetting(ctx context.Context, find *FindInstanceSetting) (*storepb.InstanceSetting, error)
- func (s *Store) GetInstanceStorageSetting(ctx context.Context) (*storepb.InstanceStorageSetting, error)
- func (s *Store) GetMemo(ctx context.Context, find *FindMemo) (*Memo, error)
- func (s *Store) GetReaction(ctx context.Context, find *FindReaction) (*Reaction, 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) GetUserSessions(ctx context.Context, userID int32) ([]*storepb.SessionsUserSetting_Session, error)
- func (s *Store) GetUserSetting(ctx context.Context, find *FindUserSetting) (*storepb.UserSetting, error)
- func (s *Store) GetUserWebhooks(ctx context.Context, userID int32) ([]*storepb.WebhooksUserSetting_Webhook, error)
- func (s *Store) ListActivities(ctx context.Context, find *FindActivity) ([]*Activity, error)
- func (s *Store) ListAttachments(ctx context.Context, find *FindAttachment) ([]*Attachment, error)
- func (s *Store) ListIdentityProviders(ctx context.Context, find *FindIdentityProvider) ([]*storepb.IdentityProvider, error)
- func (s *Store) ListInboxes(ctx context.Context, find *FindInbox) ([]*Inbox, error)
- func (s *Store) ListInstanceSettings(ctx context.Context, find *FindInstanceSetting) ([]*storepb.InstanceSetting, error)
- func (s *Store) ListMemoRelations(ctx context.Context, find *FindMemoRelation) ([]*MemoRelation, error)
- func (s *Store) ListMemos(ctx context.Context, find *FindMemo) ([]*Memo, error)
- func (s *Store) ListReactions(ctx context.Context, find *FindReaction) ([]*Reaction, 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) Migrate(ctx context.Context) error
- func (s *Store) RemoveUserAccessToken(ctx context.Context, userID int32, token string) error
- func (s *Store) RemoveUserSession(ctx context.Context, userID int32, sessionID string) error
- func (s *Store) RemoveUserWebhook(ctx context.Context, userID int32, webhookID string) error
- func (s *Store) UpdateAttachment(ctx context.Context, update *UpdateAttachment) error
- func (s *Store) UpdateIdentityProvider(ctx context.Context, update *UpdateIdentityProviderV1) (*storepb.IdentityProvider, error)
- func (s *Store) UpdateInbox(ctx context.Context, update *UpdateInbox) (*Inbox, error)
- func (s *Store) UpdateMemo(ctx context.Context, update *UpdateMemo) error
- func (s *Store) UpdateUser(ctx context.Context, update *UpdateUser) (*User, error)
- func (s *Store) UpdateUserSessionLastAccessed(ctx context.Context, userID int32, sessionID string, ...) error
- func (s *Store) UpdateUserWebhook(ctx context.Context, userID int32, ...) error
- func (s *Store) UpsertInstanceSetting(ctx context.Context, upsert *storepb.InstanceSetting) (*storepb.InstanceSetting, error)
- func (s *Store) UpsertMemoRelation(ctx context.Context, create *MemoRelation) (*MemoRelation, error)
- func (s *Store) UpsertReaction(ctx context.Context, upsert *Reaction) (*Reaction, error)
- func (s *Store) UpsertUserSetting(ctx context.Context, upsert *storepb.UserSetting) (*storepb.UserSetting, error)
- type UpdateAttachment
- type UpdateIdentityProvider
- type UpdateIdentityProviderV1
- type UpdateInbox
- type UpdateMemo
- type UpdateUser
- type UpsertMigrationHistory
- type User
- type UserSetting
- type Visibility
Constants ¶
const ( // MigrateFileNameSplit is the split character between the patch version and the description in the migration file name. // For example, "1__create_table.sql". MigrateFileNameSplit = "__" // LatestSchemaFileName is the name of the latest schema file. // This file is used to apply the latest schema when no migration history is found. LatestSchemaFileName = "LATEST.sql" )
const DefaultContentLengthLimit = 8 * 1024
DefaultContentLengthLimit is the default limit of content length in bytes. 8KB.
const (
SystemBotID int32 = 0
)
Variables ¶
var DefaultNsfwTags = []string{"nsfw"}
DefaultNsfwTags is the default tags that mark content as NSFW for blurring.
var DefaultReactions = []string{"👍", "👎", "❤️", "🎉", "😄", "😕", "😢", "😡"}
DefaultReactions is the default reactions for memo related setting.
var ( SystemBot = &User{ ID: SystemBotID, Username: "system_bot", Role: RoleAdmin, Email: "", Nickname: "Bot", } )
Functions ¶
This section is empty.
Types ¶
type Activity ¶ added in v0.14.0
type Activity struct {
ID int32
// Standard fields
CreatorID int32
CreatedTs int64
// Domain specific fields
Type ActivityType
Level ActivityLevel
Payload *storepb.ActivityPayload
}
type ActivityLevel ¶ added in v0.17.0
type ActivityLevel string
const (
ActivityLevelInfo ActivityLevel = "INFO"
)
func (ActivityLevel) String ¶ added in v0.17.0
func (l ActivityLevel) String() string
type ActivityType ¶ added in v0.17.0
type ActivityType string
const (
ActivityTypeMemoComment ActivityType = "MEMO_COMMENT"
)
func (ActivityType) String ¶ added in v0.17.0
func (t ActivityType) String() string
type Attachment ¶ added in v0.25.0
type Attachment struct {
// ID is the system generated unique identifier for the attachment.
ID int32
// UID is the user defined unique identifier for the attachment.
UID string
// Standard fields
CreatorID int32
CreatedTs int64
UpdatedTs int64
// Domain specific fields
Filename string
Blob []byte
Type string
Size int64
StorageType storepb.AttachmentStorageType
Reference string
Payload *storepb.AttachmentPayload
// The related memo ID.
MemoID *int32
// Composed field
MemoUID *string
}
type DeleteAttachment ¶ added in v0.25.0
type DeleteIdentityProvider ¶ added in v0.13.2
type DeleteIdentityProvider struct {
ID int32
}
type DeleteInbox ¶ added in v0.17.0
type DeleteInbox struct {
ID int32
}
DeleteInbox specifies which inbox item to delete.
type DeleteInstanceSetting ¶ added in v0.25.3
type DeleteInstanceSetting struct {
Name string
}
type DeleteMemo ¶ added in v0.14.0
type DeleteMemo struct {
ID int32
}
type DeleteMemoRelation ¶ added in v0.14.0
type DeleteMemoRelation struct {
MemoID *int32
RelatedMemoID *int32
Type *MemoRelationType
}
type DeleteReaction ¶ added in v0.20.0
type DeleteReaction struct {
ID int32
}
type DeleteUser ¶ added in v0.14.0
type DeleteUser struct {
ID int32
}
type Driver ¶ added in v0.16.0
type Driver interface {
GetDB() *sql.DB
Close() error
IsInitialized(ctx context.Context) (bool, error)
// MigrationHistory model related methods.
// NOTE: These methods are deprecated. The migration_history table is no longer used
// for tracking schema versions. Schema version is now stored in instance_setting.
// These methods are kept for backward compatibility to migrate existing installations.
FindMigrationHistoryList(ctx context.Context, find *FindMigrationHistory) ([]*MigrationHistory, error)
UpsertMigrationHistory(ctx context.Context, upsert *UpsertMigrationHistory) (*MigrationHistory, error)
// Activity model related methods.
CreateActivity(ctx context.Context, create *Activity) (*Activity, error)
ListActivities(ctx context.Context, find *FindActivity) ([]*Activity, error)
// Attachment model related methods.
CreateAttachment(ctx context.Context, create *Attachment) (*Attachment, error)
ListAttachments(ctx context.Context, find *FindAttachment) ([]*Attachment, error)
UpdateAttachment(ctx context.Context, update *UpdateAttachment) error
DeleteAttachment(ctx context.Context, delete *DeleteAttachment) error
// Memo model related methods.
CreateMemo(ctx context.Context, create *Memo) (*Memo, error)
ListMemos(ctx context.Context, find *FindMemo) ([]*Memo, error)
UpdateMemo(ctx context.Context, update *UpdateMemo) error
DeleteMemo(ctx context.Context, delete *DeleteMemo) error
// MemoRelation model related methods.
UpsertMemoRelation(ctx context.Context, create *MemoRelation) (*MemoRelation, error)
ListMemoRelations(ctx context.Context, find *FindMemoRelation) ([]*MemoRelation, error)
DeleteMemoRelation(ctx context.Context, delete *DeleteMemoRelation) error
// InstanceSetting model related methods.
UpsertInstanceSetting(ctx context.Context, upsert *InstanceSetting) (*InstanceSetting, error)
ListInstanceSettings(ctx context.Context, find *FindInstanceSetting) ([]*InstanceSetting, error)
DeleteInstanceSetting(ctx context.Context, delete *DeleteInstanceSetting) error
// User model related methods.
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
// UserSetting model related methods.
UpsertUserSetting(ctx context.Context, upsert *UserSetting) (*UserSetting, error)
ListUserSettings(ctx context.Context, find *FindUserSetting) ([]*UserSetting, error)
// IdentityProvider model related methods.
CreateIdentityProvider(ctx context.Context, create *IdentityProvider) (*IdentityProvider, error)
ListIdentityProviders(ctx context.Context, find *FindIdentityProvider) ([]*IdentityProvider, error)
UpdateIdentityProvider(ctx context.Context, update *UpdateIdentityProvider) (*IdentityProvider, error)
DeleteIdentityProvider(ctx context.Context, delete *DeleteIdentityProvider) error
// Inbox model related methods.
CreateInbox(ctx context.Context, create *Inbox) (*Inbox, error)
ListInboxes(ctx context.Context, find *FindInbox) ([]*Inbox, error)
UpdateInbox(ctx context.Context, update *UpdateInbox) (*Inbox, error)
DeleteInbox(ctx context.Context, delete *DeleteInbox) error
// Reaction model related methods.
UpsertReaction(ctx context.Context, create *Reaction) (*Reaction, error)
ListReactions(ctx context.Context, find *FindReaction) ([]*Reaction, error)
GetReaction(ctx context.Context, find *FindReaction) (*Reaction, error)
DeleteReaction(ctx context.Context, delete *DeleteReaction) error
}
Driver is an interface for store driver. It contains all methods that store database driver should implement.
type FindActivity ¶ added in v0.16.1
type FindActivity struct {
ID *int32
Type *ActivityType
}
type FindAttachment ¶ added in v0.25.0
type FindIdentityProvider ¶ added in v0.13.2
type FindIdentityProvider struct {
ID *int32
}
type FindInbox ¶ added in v0.17.0
type FindInbox struct {
ID *int32
SenderID *int32
ReceiverID *int32
Status *InboxStatus
// Pagination
Limit *int
Offset *int
}
FindInbox specifies filter criteria for querying inbox items.
type FindInstanceSetting ¶ added in v0.25.3
type FindInstanceSetting struct {
Name string
}
type FindMemo ¶ added in v0.14.0
type FindMemo struct {
ID *int32
UID *string
IDList []int32
UIDList []string
// Standard fields
RowStatus *RowStatus
CreatorID *int32
// Domain specific fields
VisibilityList []Visibility
ExcludeContent bool
ExcludeComments bool
Filters []string
// Pagination
Limit *int
Offset *int
// Ordering
OrderByPinned bool
OrderByUpdatedTs bool
OrderByTimeAsc bool
}
type FindMemoPayload ¶ added in v0.22.0
type FindMemoRelation ¶ added in v0.14.0
type FindMemoRelation struct {
MemoID *int32
RelatedMemoID *int32
Type *MemoRelationType
MemoFilter *string
}
type FindMigrationHistory ¶ added in v0.17.1
type FindMigrationHistory struct {
}
FindMigrationHistory is used to query migration history records. NOTE: This is deprecated along with the migration_history table.
type FindReaction ¶ added in v0.20.0
type FindUserSetting ¶ added in v0.13.2
type FindUserSetting struct {
UserID *int32
Key storepb.UserSetting_Key
}
type IdentityProvider ¶ added in v0.13.2
type Inbox ¶ added in v0.17.0
type Inbox struct {
ID int32
CreatedTs int64
SenderID int32 // The user who triggered the notification
ReceiverID int32 // The user who receives the notification
Status InboxStatus // Current status (unread/archived)
Message *storepb.InboxMessage // The notification message content
}
Inbox represents a notification in a user's inbox. It connects activities to users who should be notified.
type InboxStatus ¶ added in v0.17.0
type InboxStatus string
InboxStatus represents the status of an inbox notification.
const ( // UNREAD indicates the notification has not been read by the user. UNREAD InboxStatus = "UNREAD" // ARCHIVED indicates the notification has been archived/dismissed by the user. ARCHIVED InboxStatus = "ARCHIVED" )
func (InboxStatus) String ¶ added in v0.17.0
func (s InboxStatus) String() string
type InstanceSetting ¶ added in v0.25.3
type Memo ¶ added in v0.14.0
type Memo struct {
// ID is the system generated unique identifier for the memo.
ID int32
// UID is the user defined unique identifier for the memo.
UID string
// Standard fields
RowStatus RowStatus
CreatorID int32
CreatedTs int64
UpdatedTs int64
// Domain specific fields
Content string
Visibility Visibility
Pinned bool
Payload *storepb.MemoPayload
// Composed fields
ParentUID *string
}
type MemoRelation ¶ added in v0.14.0
type MemoRelation struct {
MemoID int32
RelatedMemoID int32
Type MemoRelationType
}
type MemoRelationType ¶ added in v0.13.0
type MemoRelationType string
const ( // MemoRelationReference is the type for a reference memo relation. MemoRelationReference MemoRelationType = "REFERENCE" // MemoRelationComment is the type for a comment memo relation. MemoRelationComment MemoRelationType = "COMMENT" )
type MigrationHistory ¶ added in v0.17.1
MigrationHistory represents a record in the migration_history table. NOTE: The migration_history table is deprecated in favor of storing schema version in system_setting (BASIC setting). This is kept for backward compatibility only. Migration from migration_history to system_setting happens automatically during startup.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store provides database access to all raw objects.
func (*Store) AddUserSession ¶ added in v0.25.0
func (s *Store) AddUserSession(ctx context.Context, userID int32, session *storepb.SessionsUserSetting_Session) error
AddUserSession adds a new session for the user.
func (*Store) AddUserWebhook ¶ added in v0.25.0
func (s *Store) AddUserWebhook(ctx context.Context, userID int32, webhook *storepb.WebhooksUserSetting_Webhook) error
AddUserWebhook adds a new webhook for the user.
func (*Store) CreateActivity ¶ added in v0.10.0
func (*Store) CreateAttachment ¶ added in v0.25.0
func (s *Store) CreateAttachment(ctx context.Context, create *Attachment) (*Attachment, error)
func (*Store) CreateIdentityProvider ¶ added in v0.11.0
func (s *Store) CreateIdentityProvider(ctx context.Context, create *storepb.IdentityProvider) (*storepb.IdentityProvider, error)
func (*Store) CreateInbox ¶ added in v0.17.0
CreateInbox creates a new inbox notification.
func (*Store) CreateMemo ¶
func (*Store) CreateUser ¶
func (*Store) DeleteAttachment ¶ added in v0.25.0
func (s *Store) DeleteAttachment(ctx context.Context, delete *DeleteAttachment) error
func (*Store) DeleteIdentityProvider ¶ added in v0.11.0
func (s *Store) DeleteIdentityProvider(ctx context.Context, delete *DeleteIdentityProvider) error
func (*Store) DeleteInbox ¶ added in v0.17.0
func (s *Store) DeleteInbox(ctx context.Context, delete *DeleteInbox) error
DeleteInbox permanently removes an inbox item.
func (*Store) DeleteMemo ¶
func (s *Store) DeleteMemo(ctx context.Context, delete *DeleteMemo) error
func (*Store) DeleteMemoRelation ¶ added in v0.13.0
func (s *Store) DeleteMemoRelation(ctx context.Context, delete *DeleteMemoRelation) error
func (*Store) DeleteReaction ¶ added in v0.20.0
func (s *Store) DeleteReaction(ctx context.Context, delete *DeleteReaction) error
func (*Store) DeleteUser ¶ added in v0.3.0
func (s *Store) DeleteUser(ctx context.Context, delete *DeleteUser) error
func (*Store) GetActivity ¶ added in v0.17.0
func (*Store) GetAttachment ¶ added in v0.25.0
func (s *Store) GetAttachment(ctx context.Context, find *FindAttachment) (*Attachment, error)
func (*Store) GetCurrentSchemaVersion ¶ added in v0.22.5
func (*Store) GetIdentityProvider ¶ added in v0.11.0
func (s *Store) GetIdentityProvider(ctx context.Context, find *FindIdentityProvider) (*storepb.IdentityProvider, error)
func (*Store) GetInstanceBasicSetting ¶ added in v0.25.3
func (*Store) GetInstanceGeneralSetting ¶ added in v0.25.3
func (*Store) GetInstanceMemoRelatedSetting ¶ added in v0.25.3
func (*Store) GetInstanceSetting ¶ added in v0.25.3
func (s *Store) GetInstanceSetting(ctx context.Context, find *FindInstanceSetting) (*storepb.InstanceSetting, error)
func (*Store) GetInstanceStorageSetting ¶ added in v0.25.3
func (*Store) GetReaction ¶ added in v0.25.3
func (*Store) GetUserAccessTokens ¶ added in v0.15.0
func (s *Store) GetUserAccessTokens(ctx context.Context, userID int32) ([]*storepb.AccessTokensUserSetting_AccessToken, error)
GetUserAccessTokens returns the access tokens of the user.
func (*Store) GetUserSessions ¶ added in v0.25.0
func (s *Store) GetUserSessions(ctx context.Context, userID int32) ([]*storepb.SessionsUserSetting_Session, error)
GetUserSessions returns the sessions of the user.
func (*Store) GetUserSetting ¶ added in v0.13.2
func (s *Store) GetUserSetting(ctx context.Context, find *FindUserSetting) (*storepb.UserSetting, error)
func (*Store) GetUserWebhooks ¶ added in v0.25.0
func (s *Store) GetUserWebhooks(ctx context.Context, userID int32) ([]*storepb.WebhooksUserSetting_Webhook, error)
GetUserWebhooks returns the webhooks of the user.
func (*Store) ListActivities ¶ added in v0.17.0
func (*Store) ListAttachments ¶ added in v0.25.0
func (s *Store) ListAttachments(ctx context.Context, find *FindAttachment) ([]*Attachment, error)
func (*Store) ListIdentityProviders ¶ added in v0.11.0
func (s *Store) ListIdentityProviders(ctx context.Context, find *FindIdentityProvider) ([]*storepb.IdentityProvider, error)
func (*Store) ListInboxes ¶ added in v0.17.0
ListInboxes retrieves inbox items matching the filter criteria.
func (*Store) ListInstanceSettings ¶ added in v0.25.3
func (s *Store) ListInstanceSettings(ctx context.Context, find *FindInstanceSetting) ([]*storepb.InstanceSetting, error)
func (*Store) ListMemoRelations ¶ added in v0.13.0
func (s *Store) ListMemoRelations(ctx context.Context, find *FindMemoRelation) ([]*MemoRelation, error)
func (*Store) ListReactions ¶ added in v0.20.0
func (*Store) ListUserSettings ¶ added in v0.13.2
func (s *Store) ListUserSettings(ctx context.Context, find *FindUserSetting) ([]*storepb.UserSetting, error)
func (*Store) Migrate ¶ added in v0.22.5
Migrate migrates the database schema to the latest version. It checks the current schema version and applies any necessary migrations. It also seeds the database with initial data if in demo mode.
func (*Store) RemoveUserAccessToken ¶ added in v0.18.0
RemoveUserAccessToken remove the access token of the user.
func (*Store) RemoveUserSession ¶ added in v0.25.0
RemoveUserSession removes the session of the user.
func (*Store) RemoveUserWebhook ¶ added in v0.25.0
RemoveUserWebhook removes the webhook of the user.
func (*Store) UpdateAttachment ¶ added in v0.25.0
func (s *Store) UpdateAttachment(ctx context.Context, update *UpdateAttachment) error
func (*Store) UpdateIdentityProvider ¶ added in v0.11.0
func (s *Store) UpdateIdentityProvider(ctx context.Context, update *UpdateIdentityProviderV1) (*storepb.IdentityProvider, error)
func (*Store) UpdateInbox ¶ added in v0.17.0
UpdateInbox updates an existing inbox item.
func (*Store) UpdateMemo ¶ added in v0.13.1
func (s *Store) UpdateMemo(ctx context.Context, update *UpdateMemo) error
func (*Store) UpdateUser ¶ added in v0.14.0
func (*Store) UpdateUserSessionLastAccessed ¶ added in v0.25.0
func (s *Store) UpdateUserSessionLastAccessed(ctx context.Context, userID int32, sessionID string, lastAccessedTime *timestamppb.Timestamp) error
UpdateUserSessionLastAccessed updates the last accessed time of a session.
func (*Store) UpdateUserWebhook ¶ added in v0.25.0
func (s *Store) UpdateUserWebhook(ctx context.Context, userID int32, webhook *storepb.WebhooksUserSetting_Webhook) error
UpdateUserWebhook updates an existing webhook for the user.
func (*Store) UpsertInstanceSetting ¶ added in v0.25.3
func (s *Store) UpsertInstanceSetting(ctx context.Context, upsert *storepb.InstanceSetting) (*storepb.InstanceSetting, error)
func (*Store) UpsertMemoRelation ¶ added in v0.13.0
func (s *Store) UpsertMemoRelation(ctx context.Context, create *MemoRelation) (*MemoRelation, error)
func (*Store) UpsertReaction ¶ added in v0.20.0
func (*Store) UpsertUserSetting ¶ added in v0.4.0
func (s *Store) UpsertUserSetting(ctx context.Context, upsert *storepb.UserSetting) (*storepb.UserSetting, error)
type UpdateAttachment ¶ added in v0.25.0
type UpdateIdentityProvider ¶ added in v0.13.2
type UpdateIdentityProviderV1 ¶ added in v0.21.1
type UpdateIdentityProviderV1 struct {
ID int32
Type storepb.IdentityProvider_Type
Name *string
IdentifierFilter *string
Config *storepb.IdentityProviderConfig
}
type UpdateInbox ¶ added in v0.17.0
type UpdateInbox struct {
ID int32
Status InboxStatus
}
UpdateInbox contains fields that can be updated for an inbox item.
type UpdateMemo ¶ added in v0.14.0
type UpdateMemo struct {
ID int32
UID *string
CreatedTs *int64
UpdatedTs *int64
RowStatus *RowStatus
Content *string
Visibility *Visibility
Pinned *bool
Payload *storepb.MemoPayload
}
type UpdateUser ¶ added in v0.14.0
type UpsertMigrationHistory ¶ added in v0.17.1
type UpsertMigrationHistory struct {
Version string
}
UpsertMigrationHistory is used to insert or update a migration history record. NOTE: This is deprecated along with the migration_history table.
type UserSetting ¶ added in v0.13.2
type UserSetting struct {
UserID int32
Key storepb.UserSetting_Key
Value string
}
type Visibility ¶ added in v0.13.1
type Visibility string
Visibility is the type of a visibility.
const ( // Public is the PUBLIC visibility. Public Visibility = "PUBLIC" // Protected is the PROTECTED visibility. Protected Visibility = "PROTECTED" // Private is the PRIVATE visibility. Private Visibility = "PRIVATE" )
func (Visibility) String ¶ added in v0.13.1
func (v Visibility) String() string