store

package
v0.21.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 26, 2024 License: MIT Imports: 12 Imported by: 14

Documentation

Index

Constants

View Source
const (
	SystemBotID int32 = 0
)

Variables

View Source
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"
	ActivityTypeVersionUpdate ActivityType = "VERSION_UPDATE"
)

func (ActivityType) String added in v0.17.0

func (t ActivityType) String() string

type DeleteIdentityProvider added in v0.13.2

type DeleteIdentityProvider struct {
	ID int32
}

type DeleteInbox added in v0.17.0

type DeleteInbox struct {
	ID int32
}

type DeleteMemo added in v0.14.0

type DeleteMemo struct {
	ID int32
}

type DeleteMemoOrganizer added in v0.14.0

type DeleteMemoOrganizer struct {
	MemoID *int32
	UserID *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 DeleteResource added in v0.14.0

type DeleteResource struct {
	ID     int32
	MemoID *int32
}

type DeleteStorage added in v0.14.0

type DeleteStorage struct {
	ID int32
}

type DeleteTag added in v0.14.0

type DeleteTag struct {
	Name      string
	CreatorID int32
}

type DeleteUser added in v0.14.0

type DeleteUser struct {
	ID int32
}

type DeleteWebhook added in v0.18.0

type DeleteWebhook struct {
	ID int32
}

type DeleteWorkspaceSetting added in v0.20.0

type DeleteWorkspaceSetting struct {
	Name string
}

type Driver added in v0.16.0

type Driver interface {
	GetDB() *sql.DB
	Close() error

	Migrate(ctx context.Context) error
	Vacuum(ctx context.Context) error

	// current file is driver
	GetCurrentDBSize(ctx context.Context) (int64, error)

	// MigrationHistory model related methods.
	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)

	// Resource model related methods.
	CreateResource(ctx context.Context, create *Resource) (*Resource, error)
	ListResources(ctx context.Context, find *FindResource) ([]*Resource, error)
	UpdateResource(ctx context.Context, update *UpdateResource) (*Resource, error)
	DeleteResource(ctx context.Context, delete *DeleteResource) 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

	// MemoOrganizer model related methods.
	UpsertMemoOrganizer(ctx context.Context, upsert *MemoOrganizer) (*MemoOrganizer, error)
	ListMemoOrganizer(ctx context.Context, find *FindMemoOrganizer) ([]*MemoOrganizer, error)
	DeleteMemoOrganizer(ctx context.Context, delete *DeleteMemoOrganizer) error

	// WorkspaceSetting model related methods.
	UpsertWorkspaceSetting(ctx context.Context, upsert *WorkspaceSetting) (*WorkspaceSetting, error)
	ListWorkspaceSettings(ctx context.Context, find *FindWorkspaceSetting) ([]*WorkspaceSetting, error)
	DeleteWorkspaceSetting(ctx context.Context, delete *DeleteWorkspaceSetting) 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

	// Tag model related methods.
	UpsertTag(ctx context.Context, upsert *Tag) (*Tag, error)
	ListTags(ctx context.Context, find *FindTag) ([]*Tag, error)
	DeleteTag(ctx context.Context, delete *DeleteTag) error

	// Storage model related methods.
	CreateStorage(ctx context.Context, create *Storage) (*Storage, error)
	ListStorages(ctx context.Context, find *FindStorage) ([]*Storage, error)
	UpdateStorage(ctx context.Context, update *UpdateStorage) (*Storage, error)
	DeleteStorage(ctx context.Context, delete *DeleteStorage) 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

	// Webhook model related methods.
	CreateWebhook(ctx context.Context, create *Webhook) (*Webhook, error)
	ListWebhooks(ctx context.Context, find *FindWebhook) ([]*Webhook, error)
	UpdateWebhook(ctx context.Context, update *UpdateWebhook) (*Webhook, error)
	DeleteWebhook(ctx context.Context, delete *DeleteWebhook) error

	// Reaction model related methods.
	UpsertReaction(ctx context.Context, create *Reaction) (*Reaction, error)
	ListReactions(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 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
}

type FindMemo added in v0.14.0

type FindMemo struct {
	ID  *int32
	UID *string

	// Standard fields
	RowStatus       *RowStatus
	CreatorID       *int32
	CreatedTsAfter  *int64
	CreatedTsBefore *int64
	UpdatedTsAfter  *int64
	UpdatedTsBefore *int64

	// Domain specific fields
	ContentSearch   []string
	VisibilityList  []Visibility
	ExcludeContent  bool
	ExcludeComments bool
	Random          bool

	// Pagination
	Limit            *int
	Offset           *int
	OrderByUpdatedTs bool
	OrderByPinned    bool
}

type FindMemoOrganizer added in v0.14.0

type FindMemoOrganizer struct {
	MemoID int32
	UserID int32
}

type FindMemoRelation added in v0.14.0

type FindMemoRelation struct {
	MemoID        *int32
	RelatedMemoID *int32
	Type          *MemoRelationType
}

type FindMigrationHistory added in v0.17.1

type FindMigrationHistory struct {
}

type FindReaction added in v0.20.0

type FindReaction struct {
	ID        *int32
	CreatorID *int32
	ContentID *string
}

type FindResource added in v0.14.0

type FindResource struct {
	GetBlob        bool
	ID             *int32
	UID            *string
	CreatorID      *int32
	Filename       *string
	MemoID         *int32
	HasRelatedMemo bool
	Limit          *int
	Offset         *int
}

type FindStorage added in v0.14.0

type FindStorage struct {
	ID *int32
}

type FindTag added in v0.14.0

type FindTag struct {
	CreatorID int32
}

type FindUser added in v0.14.0

type FindUser struct {
	ID        *int32
	RowStatus *RowStatus
	Username  *string
	Role      *Role
	Email     *string
	Nickname  *string

	// Random and limit are used in list users.
	// Whether to return random users.
	Random bool
	// The maximum number of users to return.
	Limit *int
}

type FindUserSetting added in v0.13.2

type FindUserSetting struct {
	UserID *int32
	Key    storepb.UserSettingKey
}

type FindWebhook added in v0.18.0

type FindWebhook struct {
	ID        *int32
	CreatorID *int32
}

type FindWorkspaceSetting added in v0.19.1

type FindWorkspaceSetting struct {
	Name string
}

type IdentityProvider added in v0.13.2

type IdentityProvider struct {
	ID               int32
	Name             string
	Type             storepb.IdentityProvider_Type
	IdentifierFilter string
	Config           string
}

type Inbox added in v0.17.0

type Inbox struct {
	ID         int32
	CreatedTs  int64
	SenderID   int32
	ReceiverID int32
	Status     InboxStatus
	Message    *storepb.InboxMessage
}

type InboxStatus added in v0.17.0

type InboxStatus string

InboxStatus is the status for an inbox.

const (
	UNREAD   InboxStatus = "UNREAD"
	ARCHIVED InboxStatus = "ARCHIVED"
)

func (InboxStatus) String added in v0.17.0

func (s InboxStatus) String() string

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

	// Composed fields
	Pinned   bool
	ParentID *int32
}

type MemoOrganizer added in v0.14.0

type MemoOrganizer struct {
	MemoID int32
	UserID int32
	Pinned bool
}

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

type MigrationHistory struct {
	Version   string
	CreatedTs int64
}

type Reaction added in v0.21.1

type Reaction struct {
	ID        int32
	CreatedTs int64
	CreatorID int32
	// ContentID is the id of the content that the reaction is for.
	// This can be a memo. e.g. memos/101
	ContentID    string
	ReactionType storepb.ReactionType
}

type Resource added in v0.14.0

type Resource struct {
	// ID is the system generated unique identifier for the resource.
	ID int32
	// UID is the user defined unique identifier for the resource.
	UID string

	// Standard fields
	CreatorID int32
	CreatedTs int64
	UpdatedTs int64

	// Domain specific fields
	Filename     string
	Blob         []byte
	InternalPath string
	ExternalLink string
	Type         string
	Size         int64
	MemoID       *int32
}

type Role added in v0.13.2

type Role string

Role is the type of a role.

const (
	// RoleHost is the HOST role.
	RoleHost Role = "HOST"
	// RoleAdmin is the ADMIN role.
	RoleAdmin Role = "ADMIN"
	// RoleUser is the USER role.
	RoleUser Role = "USER"
)

func (Role) String added in v0.13.2

func (e Role) String() string

type RowStatus added in v0.13.1

type RowStatus string

RowStatus is the status for a row.

const (
	// Normal is the status for a normal row.
	Normal RowStatus = "NORMAL"
	// Archived is the status for an archived row.
	Archived RowStatus = "ARCHIVED"
)

func (RowStatus) String added in v0.13.1

func (r RowStatus) String() string

type Storage added in v0.14.0

type Storage struct {
	ID     int32
	Name   string
	Type   string
	Config string
}

type Store

type Store struct {
	Profile *profile.Profile
	// contains filtered or unexported fields
}

Store provides database access to all raw objects.

func New

func New(driver Driver, profile *profile.Profile) *Store

New creates a new instance of Store.

func (*Store) Close added in v0.16.0

func (s *Store) Close() error

func (*Store) CreateActivity added in v0.10.0

func (s *Store) CreateActivity(ctx context.Context, create *Activity) (*Activity, 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

func (s *Store) CreateInbox(ctx context.Context, create *Inbox) (*Inbox, error)

func (*Store) CreateMemo

func (s *Store) CreateMemo(ctx context.Context, create *Memo) (*Memo, error)

func (*Store) CreateResource

func (s *Store) CreateResource(ctx context.Context, create *Resource) (*Resource, error)

func (*Store) CreateStorage added in v0.11.0

func (s *Store) CreateStorage(ctx context.Context, create *storepb.Storage) (*storepb.Storage, error)

func (*Store) CreateUser

func (s *Store) CreateUser(ctx context.Context, create *User) (*User, error)

func (*Store) CreateWebhook added in v0.18.0

func (s *Store) CreateWebhook(ctx context.Context, create *Webhook) (*Webhook, 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

func (*Store) DeleteMemo

func (s *Store) DeleteMemo(ctx context.Context, delete *DeleteMemo) error

func (*Store) DeleteMemoOrganizer added in v0.7.2

func (s *Store) DeleteMemoOrganizer(ctx context.Context, delete *DeleteMemoOrganizer) 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) DeleteResource

func (s *Store) DeleteResource(ctx context.Context, delete *DeleteResource) error

func (*Store) DeleteStorage added in v0.11.0

func (s *Store) DeleteStorage(ctx context.Context, delete *DeleteStorage) error

func (*Store) DeleteTag added in v0.9.0

func (s *Store) DeleteTag(ctx context.Context, delete *DeleteTag) error

func (*Store) DeleteUser added in v0.3.0

func (s *Store) DeleteUser(ctx context.Context, delete *DeleteUser) error

func (*Store) DeleteWebhook added in v0.18.0

func (s *Store) DeleteWebhook(ctx context.Context, delete *DeleteWebhook) error

func (*Store) GetActivity added in v0.17.0

func (s *Store) GetActivity(ctx context.Context, find *FindActivity) (*Activity, error)

func (*Store) GetCurrentDBSize added in v0.16.1

func (s *Store) GetCurrentDBSize(ctx context.Context) (int64, error)

func (*Store) GetIdentityProvider added in v0.11.0

func (s *Store) GetIdentityProvider(ctx context.Context, find *FindIdentityProvider) (*storepb.IdentityProvider, error)

func (*Store) GetMemo added in v0.13.1

func (s *Store) GetMemo(ctx context.Context, find *FindMemo) (*Memo, error)

func (*Store) GetMemoOrganizer added in v0.14.0

func (s *Store) GetMemoOrganizer(ctx context.Context, find *FindMemoOrganizer) (*MemoOrganizer, error)

func (*Store) GetResource added in v0.14.0

func (s *Store) GetResource(ctx context.Context, find *FindResource) (*Resource, error)

func (*Store) GetStorage added in v0.14.0

func (s *Store) GetStorage(ctx context.Context, find *FindStorage) (*storepb.Storage, error)

func (*Store) GetUser added in v0.13.2

func (s *Store) GetUser(ctx context.Context, find *FindUser) (*User, error)

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) GetUserSetting added in v0.13.2

func (s *Store) GetUserSetting(ctx context.Context, find *FindUserSetting) (*storepb.UserSetting, error)

func (*Store) GetWebhook added in v0.21.1

func (s *Store) GetWebhook(ctx context.Context, find *FindWebhook) (*Webhook, error)

func (*Store) GetWorkspaceBasicSetting added in v0.21.1

func (s *Store) GetWorkspaceBasicSetting(ctx context.Context) (*storepb.WorkspaceBasicSetting, error)

func (*Store) GetWorkspaceGeneralSetting added in v0.20.0

func (s *Store) GetWorkspaceGeneralSetting(ctx context.Context) (*storepb.WorkspaceGeneralSetting, error)

func (*Store) GetWorkspaceMemoRelatedSetting added in v0.21.1

func (s *Store) GetWorkspaceMemoRelatedSetting(ctx context.Context) (*storepb.WorkspaceMemoRelatedSetting, error)

func (*Store) GetWorkspaceSetting added in v0.19.1

func (s *Store) GetWorkspaceSetting(ctx context.Context, find *FindWorkspaceSetting) (*storepb.WorkspaceSetting, error)

func (*Store) GetWorkspaceStorageSetting added in v0.21.1

func (s *Store) GetWorkspaceStorageSetting(ctx context.Context) (*storepb.WorkspaceStorageSetting, error)

func (*Store) ListActivities added in v0.17.0

func (s *Store) ListActivities(ctx context.Context, find *FindActivity) ([]*Activity, 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

func (s *Store) ListInboxes(ctx context.Context, find *FindInbox) ([]*Inbox, error)

func (*Store) ListMemoOrganizer added in v0.16.1

func (s *Store) ListMemoOrganizer(ctx context.Context, find *FindMemoOrganizer) ([]*MemoOrganizer, error)

func (*Store) ListMemoRelations added in v0.13.0

func (s *Store) ListMemoRelations(ctx context.Context, find *FindMemoRelation) ([]*MemoRelation, error)

func (*Store) ListMemos added in v0.13.1

func (s *Store) ListMemos(ctx context.Context, find *FindMemo) ([]*Memo, error)

func (*Store) ListReactions added in v0.20.0

func (s *Store) ListReactions(ctx context.Context, find *FindReaction) ([]*Reaction, error)

func (*Store) ListResources added in v0.14.0

func (s *Store) ListResources(ctx context.Context, find *FindResource) ([]*Resource, error)

func (*Store) ListStorages added in v0.14.0

func (s *Store) ListStorages(ctx context.Context, find *FindStorage) ([]*storepb.Storage, error)

func (*Store) ListTags added in v0.14.0

func (s *Store) ListTags(ctx context.Context, find *FindTag) ([]*Tag, error)

func (*Store) ListUserSettings added in v0.13.2

func (s *Store) ListUserSettings(ctx context.Context, find *FindUserSetting) ([]*storepb.UserSetting, error)

func (*Store) ListUsers added in v0.13.2

func (s *Store) ListUsers(ctx context.Context, find *FindUser) ([]*User, error)

func (*Store) ListWebhooks added in v0.18.0

func (s *Store) ListWebhooks(ctx context.Context, find *FindWebhook) ([]*Webhook, error)

func (*Store) ListWorkspaceSettings added in v0.19.1

func (s *Store) ListWorkspaceSettings(ctx context.Context, find *FindWorkspaceSetting) ([]*storepb.WorkspaceSetting, error)

func (*Store) MigrateManually added in v0.19.0

func (*Store) MigrateManually(context.Context) error

func (*Store) RemoveUserAccessToken added in v0.18.0

func (s *Store) RemoveUserAccessToken(ctx context.Context, userID int32, token string) error

RemoveUserAccessToken remove the access token of the user.

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

func (s *Store) UpdateInbox(ctx context.Context, update *UpdateInbox) (*Inbox, error)

func (*Store) UpdateMemo added in v0.13.1

func (s *Store) UpdateMemo(ctx context.Context, update *UpdateMemo) error

func (*Store) UpdateResource added in v0.14.0

func (s *Store) UpdateResource(ctx context.Context, update *UpdateResource) (*Resource, error)

func (*Store) UpdateStorage added in v0.14.0

func (s *Store) UpdateStorage(ctx context.Context, update *UpdateStorageV1) (*storepb.Storage, error)

func (*Store) UpdateUser added in v0.14.0

func (s *Store) UpdateUser(ctx context.Context, update *UpdateUser) (*User, error)

func (*Store) UpdateWebhook added in v0.18.0

func (s *Store) UpdateWebhook(ctx context.Context, update *UpdateWebhook) (*Webhook, error)

func (*Store) UpsertMemoOrganizer

func (s *Store) UpsertMemoOrganizer(ctx context.Context, upsert *MemoOrganizer) (*MemoOrganizer, 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 (s *Store) UpsertReaction(ctx context.Context, upsert *Reaction) (*Reaction, error)

func (*Store) UpsertTag added in v0.9.0

func (s *Store) UpsertTag(ctx context.Context, upsert *Tag) (*Tag, error)

func (*Store) UpsertUserSetting added in v0.4.0

func (s *Store) UpsertUserSetting(ctx context.Context, upsert *storepb.UserSetting) (*storepb.UserSetting, error)

func (*Store) UpsertWorkspaceSetting added in v0.19.1

func (s *Store) UpsertWorkspaceSetting(ctx context.Context, upsert *storepb.WorkspaceSetting) (*storepb.WorkspaceSetting, error)

func (*Store) Vacuum added in v0.7.2

func (s *Store) Vacuum(ctx context.Context) error

type Tag added in v0.14.0

type Tag struct {
	Name      string
	CreatorID int32
}

type UpdateIdentityProvider added in v0.13.2

type UpdateIdentityProvider struct {
	ID               int32
	Name             *string
	IdentifierFilter *string
	Config           *string
}

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
}

type UpdateMemo added in v0.14.0

type UpdateMemo struct {
	ID         int32
	UID        *string
	CreatedTs  *int64
	UpdatedTs  *int64
	RowStatus  *RowStatus
	Content    *string
	Visibility *Visibility
}

type UpdateResource added in v0.14.0

type UpdateResource struct {
	ID           int32
	UID          *string
	UpdatedTs    *int64
	Filename     *string
	InternalPath *string
	ExternalLink *string
	MemoID       *int32
	Blob         []byte
}

type UpdateStorage added in v0.14.0

type UpdateStorage struct {
	ID     int32
	Name   *string
	Config *string
}

type UpdateStorageV1 added in v0.21.1

type UpdateStorageV1 struct {
	ID     int32
	Type   storepb.Storage_Type
	Name   *string
	Config *storepb.StorageConfig
}

type UpdateUser added in v0.14.0

type UpdateUser struct {
	ID int32

	UpdatedTs    *int64
	RowStatus    *RowStatus
	Username     *string
	Role         *Role
	Email        *string
	Nickname     *string
	Password     *string
	AvatarURL    *string
	PasswordHash *string
	Description  *string
}

type UpdateWebhook added in v0.18.0

type UpdateWebhook struct {
	ID        int32
	RowStatus *RowStatus
	Name      *string
	URL       *string
}

type UpsertMigrationHistory added in v0.17.1

type UpsertMigrationHistory struct {
	Version string
}

type User added in v0.14.0

type User struct {
	ID int32

	// Standard fields
	RowStatus RowStatus
	CreatedTs int64
	UpdatedTs int64

	// Domain specific fields
	Username     string
	Role         Role
	Email        string
	Nickname     string
	PasswordHash string
	AvatarURL    string
	Description  string
}

type UserSetting added in v0.13.2

type UserSetting struct {
	UserID int32
	Key    storepb.UserSettingKey
	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

type Webhook added in v0.21.1

type Webhook struct {
	ID        int32
	CreatedTs int64
	UpdatedTs int64
	CreatorID int32
	RowStatus RowStatus
	Name      string
	URL       string
}

type WorkspaceSetting added in v0.19.1

type WorkspaceSetting struct {
	Name        string
	Value       string
	Description string
}

Directories

Path Synopsis
db

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL