Have got first run working and publishing to Netlify

This commit is contained in:
Leon Mika 2026-02-26 22:23:47 +11:00
parent b7e0269e9d
commit 30d99eeb9e
22 changed files with 472 additions and 47 deletions

View file

@ -1,5 +1,7 @@
package models
import "time"
type PublishTargetType int
const (
@ -11,10 +13,10 @@ const (
type Site struct {
ID int64
OwnerID int64
Created time.Time
Title string
Tagline string
//Meta SiteMeta
//Posts []*Post
}
type SitePublishTarget struct {

View file

@ -1,16 +1,20 @@
package models
import (
"regexp"
"time"
"golang.org/x/crypto/bcrypt"
)
var ValidUserName = regexp.MustCompile(`^[a-zA-Z0-9_-]+$`)
type User struct {
ID int64
Username string
PasswordHashed []byte
TimeZone string
Created time.Time
}
func (u *User) SetPassword(pwd string) {