acme-dns/acmetxt.go
2016-11-11 16:48:00 +02:00

28 lines
497 B
Go

package main
import (
"github.com/satori/go.uuid"
"time"
)
// The default database object
type ACMETxt struct {
Username string `json:"username"`
Password string `json:"password"`
ACMETxtPost
LastActive time.Time
}
type ACMETxtPost struct {
Subdomain string `json:"subdomain"`
Value string `json:"txt"`
}
func NewACMETxt() ACMETxt {
var a ACMETxt = ACMETxt{}
a.Username = uuid.NewV4().String()
a.Password = uuid.NewV4().String()
a.Subdomain = uuid.NewV4().String()
return a
}