2026-02-18 11:07:18 +00:00
|
|
|
package models
|
|
|
|
|
|
2026-02-26 11:23:47 +00:00
|
|
|
import "time"
|
|
|
|
|
|
2026-02-19 11:29:44 +00:00
|
|
|
type PublishTargetType int
|
|
|
|
|
|
2026-02-19 10:21:27 +00:00
|
|
|
const (
|
2026-02-19 11:29:44 +00:00
|
|
|
PublishTargetTypeNone PublishTargetType = 0
|
|
|
|
|
PublishTargetTypeLocalFS PublishTargetType = 1
|
|
|
|
|
PublishTargetTypeNetlify PublishTargetType = 2
|
2026-02-19 10:21:27 +00:00
|
|
|
)
|
2026-02-18 11:07:18 +00:00
|
|
|
|
2026-02-27 23:39:08 +00:00
|
|
|
func ParsePublishTargetType(s string) (PublishTargetType, error) {
|
|
|
|
|
switch s {
|
|
|
|
|
case "localfs":
|
|
|
|
|
return PublishTargetTypeLocalFS, nil
|
|
|
|
|
case "netlify":
|
|
|
|
|
return PublishTargetTypeNetlify, nil
|
|
|
|
|
default:
|
|
|
|
|
return PublishTargetTypeNone, nil
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-18 11:07:18 +00:00
|
|
|
type Site struct {
|
2026-02-19 10:21:27 +00:00
|
|
|
ID int64
|
|
|
|
|
OwnerID int64
|
2026-02-27 22:49:43 +00:00
|
|
|
GUID string
|
2026-02-26 11:23:47 +00:00
|
|
|
Created time.Time
|
|
|
|
|
|
2026-02-19 10:21:27 +00:00
|
|
|
Title string
|
|
|
|
|
Tagline string
|
2026-02-18 11:07:18 +00:00
|
|
|
}
|
|
|
|
|
|
2026-02-19 10:21:27 +00:00
|
|
|
type SitePublishTarget struct {
|
2026-02-21 23:09:34 +00:00
|
|
|
ID int64
|
|
|
|
|
SiteID int64
|
2026-02-27 23:39:08 +00:00
|
|
|
GUID string
|
2026-02-21 23:09:34 +00:00
|
|
|
Enabled bool
|
2026-02-19 11:29:44 +00:00
|
|
|
|
|
|
|
|
BaseURL string
|
2026-02-20 06:39:58 +00:00
|
|
|
TargetType string
|
2026-02-19 11:29:44 +00:00
|
|
|
TargetRef string
|
|
|
|
|
TargetKey string
|
2026-02-19 10:21:27 +00:00
|
|
|
}
|