bouncer/internal/store/layer.go
William Petit 449fb69c02
Some checks are pending
Cadoles/bouncer/pipeline/pr-develop Build started...
Cadoles/bouncer/pipeline/head This commit looks good
feat: add layer definition api
2024-05-17 15:44:28 +02:00

34 lines
558 B
Go

package store
import (
"encoding/json"
"time"
)
type (
LayerName Name
LayerType string
)
type LayerHeader struct {
Proxy ProxyName `json:"proxy"`
Name LayerName `json:"name"`
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"`
}