keyctl/pkg/core/key.go
2023-03-20 21:18:44 +01:00

27 lines
457 B
Go

// Copyright (C) 2023 Marius Schellenberger
package core
import "regexp"
const (
re = "a-zA-Z0-9_-"
id = "[a-f0-9]{32}"
nameReReverse = "[^" + re + "]+"
IDRoute = "/{id:" + id + "}"
AIDRoute = "/{aid:" + id + "}"
)
var NameRe = regexp.MustCompile(nameReReverse)
type Key struct {
ID string
Name string
Created int64
Size int
Encoding Encoding
Type Type
Key string
}
type Keys []Key