43 lines
1.2 KiB
Go
43 lines
1.2 KiB
Go
package models
|
|
|
|
import "time"
|
|
|
|
type GiteaServer struct {
|
|
ID int64 `json:"id"`
|
|
Name string `json:"name"`
|
|
URL string `json:"url"`
|
|
Token string `json:"-"` // Never expose in JSON
|
|
SyncInterval int `json:"sync_interval"`
|
|
LastSyncAt *time.Time `json:"last_sync_at"`
|
|
Status string `json:"status"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
}
|
|
|
|
type Repo struct {
|
|
ID int64 `json:"id"`
|
|
ServerID int64 `json:"server_id"`
|
|
Name string `json:"name"`
|
|
FullName string `json:"full_name"`
|
|
CloneURL string `json:"clone_url"`
|
|
LocalPath string `json:"local_path"`
|
|
Size int64 `json:"size"`
|
|
LastSyncAt *time.Time `json:"last_sync_at"`
|
|
SyncStatus string `json:"sync_status"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
}
|
|
|
|
type SyncLog struct {
|
|
ID int64 `json:"id"`
|
|
ServerID int64 `json:"server_id"`
|
|
RepoID *int64 `json:"repo_id"`
|
|
Status string `json:"status"`
|
|
Message string `json:"message"`
|
|
StartedAt time.Time `json:"started_at"`
|
|
FinishedAt *time.Time `json:"finished_at"`
|
|
}
|
|
|
|
type Setting struct {
|
|
Key string `json:"key"`
|
|
Value string `json:"value"`
|
|
}
|