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