Documentation ¶
Index ¶
- Constants
- func ExtensionFromMime(mimeType string) string
- func Map[T interface{}, O interface{}](arr []T, fn func(T) O) []O
- func Or[T interface{}](val *T, fallback T) T
- func RandomString(length int) string
- func RatelimitMiddleware(maxFails int, resetInterval time.Duration) func(next http.Handler) http.Handler
- type API
- type Account
- type Config
- type ContextKey
- type Domain
- type PaginatedResponse
- type Upload
Constants ¶
View Source
const (
ErrInvalidJSON = "Invalid JSON"
)
View Source
const MimeTypeOctetStream = "application/octet-stream"
Variables ¶
This section is empty.
Functions ¶
func ExtensionFromMime ¶
func RandomString ¶
Types ¶
type Domain ¶
type PaginatedResponse ¶
type PaginatedResponse struct { Total int `json:"total"` Data interface{} `json:"data"` }
type Upload ¶
type Upload struct { ID uint `json:"id"` Owner *Account `json:"owner"` Filename string `json:"filename"` MimeType string `json:"mimeType"` SizeBytes uint `json:"sizeBytes"` Domain Domain `json:"domain"` TTLSeconds *uint `json:"ttlSeconds"` LastViewedAt time.Time `json:"lastViewedAt"` Views uint `json:"views"` }
Click to show internal directories.
Click to hide internal directories.