2024-04-10 22:10:09 +08:00
|
|
|
package opt
|
|
|
|
|
2024-12-23 00:07:44 -08:00
|
|
|
import (
|
|
|
|
"errors"
|
|
|
|
"net/url"
|
|
|
|
)
|
2024-04-10 22:10:09 +08:00
|
|
|
|
|
|
|
const (
|
2024-06-14 17:39:00 +08:00
|
|
|
DefaultMaxSize = 1024 * 1024 * 1024
|
2024-04-10 22:10:09 +08:00
|
|
|
ReferrersEnabled = true
|
2024-04-15 18:02:54 +08:00
|
|
|
|
2024-05-05 19:11:57 +08:00
|
|
|
RoleMustLess = true
|
2024-04-10 22:10:09 +08:00
|
|
|
)
|
|
|
|
|
2024-12-23 00:07:44 -08:00
|
|
|
type config struct {
|
|
|
|
Debug bool
|
|
|
|
RepoName string
|
|
|
|
Address string
|
|
|
|
DataPath string
|
|
|
|
Proxy string
|
|
|
|
}
|
|
|
|
|
2024-04-10 22:10:09 +08:00
|
|
|
var (
|
2024-12-23 00:07:44 -08:00
|
|
|
Cfg = &config{}
|
|
|
|
Proxy *url.URL
|
2024-04-10 22:10:09 +08:00
|
|
|
ErrNotFound = errors.New("not found")
|
|
|
|
)
|