58 lines
1.8 KiB
Go
58 lines
1.8 KiB
Go
package api
|
|
|
|
import "time"
|
|
|
|
type CreateRepoRequest struct {
|
|
Name string `json:"name"`
|
|
Type string `json:"type"`
|
|
SourceURL string `json:"source_url"`
|
|
SyncMode string `json:"sync_mode,omitempty"`
|
|
AptSuite string `json:"apt_suite,omitempty"`
|
|
AptComponents []string `json:"apt_components,omitempty"`
|
|
AptArchitectures []string `json:"apt_architectures,omitempty"`
|
|
}
|
|
|
|
type RepoResponse struct {
|
|
ID int64 `json:"id"`
|
|
Name string `json:"name"`
|
|
Type string `json:"type"`
|
|
SourceURL string `json:"source_url"`
|
|
Frozen bool `json:"frozen"`
|
|
SyncMode string `json:"sync_mode"`
|
|
AptSuite string `json:"apt_suite,omitempty"`
|
|
AptComponents []string `json:"apt_components,omitempty"`
|
|
AptArchitectures []string `json:"apt_architectures,omitempty"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
}
|
|
|
|
type ListReposResponse struct {
|
|
Items []RepoResponse `json:"items"`
|
|
Total int `json:"total"`
|
|
}
|
|
|
|
type UpdateRepoRequest struct {
|
|
SourceURL *string `json:"source_url,omitempty"`
|
|
SyncMode *string `json:"sync_mode,omitempty"`
|
|
AptSuite *string `json:"apt_suite,omitempty"`
|
|
AptComponents []string `json:"apt_components,omitempty"`
|
|
AptArchitectures []string `json:"apt_architectures,omitempty"`
|
|
}
|
|
|
|
type ErrorResponse struct {
|
|
Error string `json:"error"`
|
|
}
|
|
|
|
type StartCloneResponse struct {
|
|
JobID int64 `json:"job_id"`
|
|
Status string `json:"status"`
|
|
}
|
|
|
|
type CloneStatusResponse struct {
|
|
JobID int64 `json:"job_id"`
|
|
RepoID int64 `json:"repo_id"`
|
|
Status string `json:"status"`
|
|
StartedAt *string `json:"started_at,omitempty"`
|
|
FinishedAt *string `json:"finished_at,omitempty"`
|
|
Error *string `json:"error,omitempty"`
|
|
CreatedAt string `json:"created_at"`
|
|
}
|