69 lines
2.0 KiB
Go
69 lines
2.0 KiB
Go
package domain
|
|
|
|
type Config struct {
|
|
Gitea GiteaConfig `json:"gitea"`
|
|
Update UpdateConfig `json:"update"`
|
|
}
|
|
|
|
type GiteaConfig struct {
|
|
BaseURL string `json:"baseURL"`
|
|
Org string `json:"org"`
|
|
AuthType string `json:"authType"`
|
|
Username string `json:"username"`
|
|
CredentialKey string `json:"credentialKey"`
|
|
}
|
|
|
|
type UpdateConfig struct {
|
|
AutoUpdate bool `json:"autoUpdate"`
|
|
CheckOnStartup bool `json:"checkOnStartup"`
|
|
IntervalMinutes int `json:"intervalMinutes"`
|
|
}
|
|
|
|
type SaveConfigRequest struct {
|
|
Config Config `json:"config"`
|
|
Password string `json:"password"`
|
|
Token string `json:"token"`
|
|
}
|
|
|
|
type SkillState struct {
|
|
Org string `json:"org"`
|
|
Repo string `json:"repo"`
|
|
LocalPath string `json:"localPath"`
|
|
RemoteURL string `json:"remoteURL"`
|
|
DefaultBranch string `json:"defaultBranch"`
|
|
CurrentCommit string `json:"currentCommit"`
|
|
LastCheckedAt string `json:"lastCheckedAt"`
|
|
LastError string `json:"lastError"`
|
|
InstalledTargets map[string]InstalledTarget `json:"installedTargets"`
|
|
}
|
|
|
|
type InstalledTarget struct {
|
|
Path string `json:"path"`
|
|
LinkType string `json:"linkType"`
|
|
TargetPath string `json:"targetPath"`
|
|
}
|
|
|
|
type State struct {
|
|
Skills []SkillState `json:"skills"`
|
|
}
|
|
|
|
type RemoteSkill struct {
|
|
Name string `json:"name"`
|
|
FullName string `json:"fullName"`
|
|
Description string `json:"description"`
|
|
CloneURL string `json:"cloneURL"`
|
|
SSHURL string `json:"sshURL"`
|
|
DefaultBranch string `json:"defaultBranch"`
|
|
UpdatedAt string `json:"updatedAt"`
|
|
IsDownloaded bool `json:"isDownloaded"`
|
|
Status string `json:"status"`
|
|
Error string `json:"error"`
|
|
}
|
|
|
|
type TestConnectionResult struct {
|
|
OK bool `json:"ok"`
|
|
Message string `json:"message"`
|
|
Username string `json:"username"`
|
|
Org string `json:"org"`
|
|
}
|