store

package
v0.23.0-rc.3 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2024 License: MIT Imports: 20 Imported by: 14

Documentation

Index

Constants

View Source
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"
)
View Source
const DefaultContentLengthLimit = 8 * 1024

DefaultContentLengthLimit is the default limit of content length in bytes. 8KB.

View Source
const (
	SystemBotID int32 = 0
)

Variables

View Source
var DefaultReactions = []string{"👍", "👎", "❤️", "🎉", "😄", "😕", "😢", "😡"}

DefaultReactions is the default reactions for memo related setting.

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 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

	// 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) 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

	// 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

	// Pagination
	Limit  *int
	Offset *int
}

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
	PayloadFind     *FindMemoPayload
	ExcludeContent  bool
	ExcludeComments bool
	Random          bool

	// Pagination
	Limit  *int
	Offset *int

	// Ordering
	OrderByUpdatedTs bool
	OrderByPinned    bool
	OrderByTimeAsc   bool
}

type FindMemoOrganizer added in v0.14.0

type FindMemoOrganizer struct {
	MemoID int32
	UserID int32
}

type FindMemoPayload added in v0.22.0

type FindMemoPayload struct {
	Raw                *string
	TagSearch          []string
	HasLink            bool
	HasTaskList        bool
	HasCode            bool
	HasIncompleteTasks bool
}

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
	FilenameSearch *string
	MemoID         *int32
	HasRelatedMemo bool
	StorageType    *storepb.ResourceStorageType
	Limit          *int
	Offset         *int
}

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
	Payload    *storepb.MemoPayload

	// 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 string
}

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
	Type        string
	Size        int64
	StorageType storepb.ResourceStorageType
	Reference   string
	Payload     *storepb.ResourcePayload

	// The related memo ID.
	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 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) 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) 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) GetCurrentSchemaVersion added in v0.22.5

func (s *Store) GetCurrentSchemaVersion() (string, 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) 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) 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) Migrate added in v0.22.5

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

Migrate applies the latest schema to the database.

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) 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) 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)

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
	Payload    *storepb.MemoPayload
}

type UpdateResource added in v0.14.0

type UpdateResource struct {
	ID        int32
	UID       *string
	UpdatedTs *int64
	Filename  *string
	MemoID    *int32
	Reference *string
	Payload   *storepb.ResourcePayload
}

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