mirror of https://github.com/hay-kot/homebox.git
32 lines
557 B
Go
32 lines
557 B
Go
package types
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/google/uuid"
|
|
)
|
|
|
|
type DocumentOut struct {
|
|
ID uuid.UUID `json:"id"`
|
|
Title string `json:"title"`
|
|
Path string
|
|
}
|
|
|
|
type DocumentCreate struct {
|
|
Title string `json:"name"`
|
|
Path string `json:"path"`
|
|
}
|
|
|
|
type DocumentUpdate = DocumentCreate
|
|
|
|
type DocumentToken struct {
|
|
Raw string `json:"raw"`
|
|
ExpiresAt time.Time `json:"expiresAt"`
|
|
}
|
|
|
|
type DocumentTokenCreate struct {
|
|
TokenHash []byte `json:"tokenHash"`
|
|
DocumentID uuid.UUID `json:"documentId"`
|
|
ExpiresAt time.Time `json:"expiresAt"`
|
|
}
|