s3browser-backend/internal/types/types.go

43 lines
910 B
Go
Raw Normal View History

2021-09-24 13:39:23 +00:00
package types
import (
"time"
"github.com/golang-jwt/jwt"
)
// AppConfig general config
type AppConfig struct {
S3Endoint string
S3AccessKey string
S3SecretKey string
S3SSL bool
S3Bucket string
CacheTTL time.Duration
CacheCleanup time.Duration
Address string
LogDebug bool
}
// File represents a file with its metadata
type File struct {
ID string `json:"id"`
Name string `json:"name"`
Size int64 `json:"size"`
ContentType string `json:"contentType"`
ETag string `json:"etag"`
LastModified time.Time `json:"lastModified"`
}
// Directory represents a directory with its metadata
type Directory struct {
ID string `json:"id"`
Name string `json:"name"`
Files []File `json:"files"`
Directorys []Directory `json:"directorys"`
}
type JWTClaims struct {
jwt.StandardClaims
}