2024-12-04 11:46:42 +00:00
|
|
|
package models
|
|
|
|
|
|
|
|
type Config struct {
|
2024-12-06 15:13:29 +00:00
|
|
|
Token string `env:"TOKEN"`
|
|
|
|
Repo string `env:"REPO"`
|
|
|
|
UploadDir string `env:"UPLOAD_DIR" envDefault:"./uploads"`
|
|
|
|
TaskDir string `env:"TASK_DIR" envDefault:"./tasks"`
|
|
|
|
SymLink string `env:"SYM_LINK"`
|
|
|
|
Port string `env:"PORT" envDefault:"8080"`
|
|
|
|
MaxSizeUpload int64 `env:"MAX_SIZE_UPLOAD" envDefault:"104857600"` //100 MB
|
2024-12-04 11:46:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type FileUpload struct {
|
|
|
|
TaskID string
|
|
|
|
|
|
|
|
FileName string
|
|
|
|
}
|
|
|
|
|
|
|
|
type ErrResponse struct {
|
|
|
|
Message string `json:"message"`
|
|
|
|
Code int `json:"code"`
|
|
|
|
}
|
2024-12-06 15:13:29 +00:00
|
|
|
|
|
|
|
type Task struct {
|
|
|
|
TaskID string `json:"task_id"`
|
|
|
|
Link string `json:"link"`
|
|
|
|
}
|