first with full handle over rpm
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
This commit is contained in:
parent
7948368573
commit
274ea454dd
50 changed files with 4309 additions and 0 deletions
44
internal/api/types.go
Normal file
44
internal/api/types.go
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
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"`
|
||||
}
|
||||
|
||||
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"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
}
|
||||
|
||||
type ListReposResponse struct {
|
||||
Items []RepoResponse `json:"items"`
|
||||
Total int `json:"total"`
|
||||
}
|
||||
|
||||
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"`
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue