mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2025-04-24 22:06:57 +00:00
23 lines
579 B
Go
23 lines
579 B
Go
package database
|
|
|
|
import (
|
|
"github.com/akrylysov/pogreb"
|
|
"github.com/go-acme/lego/v4/certificate"
|
|
)
|
|
|
|
type CertDB interface {
|
|
Close() error
|
|
Put(name string, cert *certificate.Resource) error
|
|
Get(name string) (*certificate.Resource, error)
|
|
Delete(key string) error
|
|
Compact() (string, error)
|
|
Items() *pogreb.ItemIterator
|
|
}
|
|
|
|
type Cert struct {
|
|
Domain string `xorm:"pk NOT NULL"`
|
|
Created int64 `xorm:"created NOT NULL DEFAULT 0"`
|
|
Updated int64 `xorm:"updated NOT NULL DEFAULT 0"`
|
|
ValidTill int64 `xorm:"NOT NULL DEFAULT 0"`
|
|
Raw []byte `xorm:"NOT NULL"`
|
|
}
|