Files
env-guard/internal/models/models.go
2026-01-28 16:37:31 +01:00

38 lines
1.2 KiB
Go

package models
import "time"
// Service represents a microservice that can be locked.
type Service struct {
Name string `json:"name"`
IsLocked bool `json:"is_locked"`
LockedBy string `json:"locked_by,omitempty"`
LockedAt time.Time `json:"locked_at,omitempty"`
JiraTickets string `json:"jira_tickets,omitempty"`
Description string `json:"description,omitempty"`
}
// LockRequest is the payload to lock a service.
type LockRequest struct {
ServiceName string `json:"service_name"`
User string `json:"user"`
JiraTickets string `json:"jira_tickets"`
Description string `json:"description"`
}
// UnlockRequest is the payload to unlock a service.
type UnlockRequest struct {
ServiceName string `json:"service_name"`
User string `json:"user"`
}
// HistoryEntry represents a historical event for a service.
type HistoryEntry struct {
ServiceName string `json:"service_name"`
Action string `json:"action"` // "LOCK" or "UNLOCK"
User string `json:"user"`
Timestamp time.Time `json:"timestamp"`
JiraTickets string `json:"jira_tickets,omitempty"`
Description string `json:"description,omitempty"`
}