bouncer/internal/store/layer.go
William Petit 3c1939f418
All checks were successful
Cadoles/bouncer/pipeline/head This commit looks good
feat: add revision number to proxy and layers to identify changes
2024-06-27 17:03:50 +02:00

35 lines
605 B
Go

package store
import (
"encoding/json"
"time"
)
type (
LayerName Name
LayerType string
)
type LayerHeader struct {
Proxy ProxyName `json:"proxy"`
Name LayerName `json:"name"`
Revision int `json:"revision"`
Type LayerType `json:"type"`
Weight int `json:"weight"`
Enabled bool `json:"enabled"`
}
type Layer struct {
LayerHeader
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
Options LayerOptions `json:"options"`
}
type LayerDefinition struct {
Type LayerType `json:"type"`
Options json.RawMessage `json:"options"`
}