You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

65 lines
1.3 KiB

package caddy_tls_store
import (
"fmt"
"github.com/caddyserver/caddy/v2"
"github.com/caddyserver/certmagic"
)
type (
ZeroStore struct {
DB string `json:"db,omitempty"`
}
)
func init() {
caddy.RegisterModule(ZeroStore{})
}
func (ZeroStore) CaddyModule() caddy.ModuleInfo {
return caddy.ModuleInfo{
ID: "zero.store",
New: func() caddy.Module { return new(ZeroStore) },
}
}
func (zs *ZeroStore) CertMagicStorage() (certmagic.Storage, error) {
return zs, nil
}
func (zs *ZeroStore) Lock(key string) error {
return fmt.Errorf("not yet implemented")
}
func (zs *ZeroStore) Unlock(key string) error {
return fmt.Errorf("not yet implemented")
}
func (zs *ZeroStore) Store(key string, value []byte) error {
return fmt.Errorf("not yet implemented")
}
func (zs *ZeroStore) Load(key string) ([]byte, error) {
return []byte{}, fmt.Errorf("not yet implemented")
}
func (zs *ZeroStore) Delete(key string) error {
return fmt.Errorf("not yet implemented")
}
func (zs *ZeroStore) Exists(key string) bool {
return false
}
func (zs *ZeroStore) List(prefix string, recursive bool) ([]string, error) {
return []string{}, fmt.Errorf("not yet implemented")
}
func (zs *ZeroStore) Stat(key string) (certmagic.KeyInfo, error) {
return certmagic.KeyInfo{}, fmt.Errorf("not yet implemented")
}
var (
_ caddy.StorageConverter = (*ZeroStore)(nil)
)