Documentation
¶
Index ¶
- Constants
- func ListPrototypes() []any
- func SortProjectTypeArray(list []*ProjectType, fn ProjectTypeLessFn)
- type Base
- type Example
- type Executable
- type IntentTemplate
- type LocalRepository
- type LocalRepositoryBase
- type Media
- type Project
- type ProjectType
- type ProjectTypeLessFn
- type RemoteRepository
- type Setting
- type SystemConfig
- type User
- type UserConfig
Constants ¶
View Source
const (
TableNamePrefix = "wpm_"
)
表名前缀
Variables ¶
This section is empty.
Functions ¶
func SortProjectTypeArray ¶ added in v0.0.14
func SortProjectTypeArray(list []*ProjectType, fn ProjectTypeLessFn)
SortProjectTypeArray 对 ProjectType 数组进行排序
Types ¶
type Base ¶
type Base struct {
UUID dxo.UUID `gorm:"index:,unique"`
Committer dxo.UserID
Creator dxo.UserID
Owner dxo.UserID
// ID uint `gorm:"primaryKey"`
CreatedAt time.Time
UpdatedAt time.Time
DeletedAt gorm.DeletedAt `gorm:"index"`
}
Base ...
type Executable ¶
type Executable struct {
ID dxo.ExecutableID `gorm:"primaryKey"`
Base
Name string
Title string
IconURL string
Description string
Path string `gorm:"index:,unique"`
Size int64
SHA256SUM util.Hex
OpenWithPriority int // 如果 value<=0, 表示 disable
}
Executable ...
type IntentTemplate ¶
type IntentTemplate struct {
ID dxo.IntentTemplateID `gorm:"primaryKey"`
Base
Executable dxo.ExecutableID
}
IntentTemplate ...
type LocalRepository ¶
type LocalRepository struct {
ID dxo.LocalRepositoryID `gorm:"primaryKey"`
Base
LocalRepositoryBase
}
LocalRepository ...
type LocalRepositoryBase ¶
type LocalRepositoryBase struct {
Name string
DisplayName string
Description string
Path string `gorm:"index:,unique"`
ConfigFile string
DotGitPath string
RepositoryPath string
WorkingPath string
}
LocalRepositoryBase ...
type Media ¶
type Media struct {
ID dxo.MediaID `gorm:"primaryKey"`
Base
Name string
URL string `gorm:"index:,unique"`
Bucket string
Label string
ContentType string
SHA256SUM util.Hex
FileSize int64
}
Media ...
type Project ¶
type Project struct {
ID dxo.ProjectID `gorm:"primaryKey"`
Base
Name string
PathInWorktree string
FullPath string `gorm:"index:,unique"`
ProjectDir string
Description string
IsFile bool
IsDir bool
ProjectTypeName string
ConfigFileName string
ProjectType dxo.ProjectTypeID
OwnerRepository dxo.LocalRepositoryID
}
Project ...
type ProjectType ¶ added in v0.0.14
type ProjectType struct {
ID dxo.ProjectTypeID `gorm:"primaryKey"`
Base
Name string `gorm:"index:,unique"`
Type string
Label string
Description string
Priority int // 优先级,数值越高越先处理
AsFile bool
AsDir bool
}
ProjectType ...
type ProjectTypeLessFn ¶ added in v0.0.14
type ProjectTypeLessFn func(o1, o2 *ProjectType) bool
ProjectTypeLessFn ...
type RemoteRepository ¶
type RemoteRepository struct {
ID dxo.RemoteRepositoryID `gorm:"primaryKey"`
Base
Name string
URL string
DisplayName string
}
RemoteRepository ...
type Setting ¶ added in v0.0.14
type Setting struct {
ID dxo.SettingID `gorm:"primaryKey"`
Base
Name string `gorm:"index:,unique"`
Value string
Description string
Type string
}
Setting 表示一个设置项
type SystemConfig ¶
type User ¶
type User struct {
ID dxo.UserID
Base
Name dxo.UserName `gorm:"index:,unique"`
Avatar string
Nickname string
Home string // the home dir path
}
User ...
type UserConfig ¶
Click to show internal directories.
Click to hide internal directories.