the big refactor
This commit is contained in:
42
internal/types/types.go
Normal file
42
internal/types/types.go
Normal file
@@ -0,0 +1,42 @@
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user