Add basic graphql api
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
package database
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
type Pipeline struct {
|
||||
Id uuid.UUID
|
||||
Name string
|
||||
Url string
|
||||
PollInterval int
|
||||
}
|
||||
|
||||
type WebhookSender string
|
||||
|
||||
const (
|
||||
Gitea WebhookSender = "gitea"
|
||||
)
|
||||
|
||||
type Webhook struct {
|
||||
Id uuid.UUID
|
||||
ServerType WebhookSender
|
||||
Secret string
|
||||
Pipeline uuid.UUID
|
||||
}
|
||||
|
||||
type Runner struct {
|
||||
Id uuid.UUID
|
||||
Name string
|
||||
Secret string
|
||||
}
|
||||
|
||||
type Run struct {
|
||||
Id uuid.UUID
|
||||
Pipeline uuid.UUID
|
||||
Result bool
|
||||
}
|
||||
|
||||
type CommandExecution struct {
|
||||
Id uuid.UUID
|
||||
RunId uuid.UUID
|
||||
Command string
|
||||
ReturnCode int
|
||||
Stdout string
|
||||
Stderr string
|
||||
StartTime time.Time
|
||||
EndTime time.Time
|
||||
}
|
||||
Reference in New Issue
Block a user