Files
server/database/types.go
T
2023-01-14 06:02:17 -07:00

51 lines
700 B
Go

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
}