Documentation
¶
Index ¶
Constants ¶
View Source
const ( BYTE = 1.0 KILOBYTE = 1024 * BYTE MEGABYTE = 1024 * KILOBYTE GIGABYTE = 1024 * MEGABYTE TERABYTE = 1024 * GIGABYTE )
View Source
const (
ChromeUserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.102 Safari/537.36"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
App
type Config ¶
type Config struct {
Port string `yaml:"port"`
Debug bool `yaml:"debug"`
//
Rate float64 `yaml:"rate"`
Bursts int `yaml:"bursts"`
//
ImageCache time.Duration `yaml:"image_cache"`
//
StorePath string `yaml:"store"`
LogPath string `yaml:"log"`
ChromePath string `yaml:"chrome_data"`
}
Config
type Image ¶
type Image struct {
UUID string `json:"uuid"`
Status ImageStatus `json:"status"`
Message string `json:"message"`
Binary []byte `json:"binary"`
CreatedAt time.Time `json:"created_at"`
}
Image
type ImageStatus ¶
type ImageStatus string
ImageStatus
const ( ImageStatusSuccess ImageStatus = "success" ImageStatusPending ImageStatus = "pending" ImageStatusFail ImageStatus = "fail" )
type Limiter ¶
type Limiter interface {
FindIPAddr(ip string) *rate.Limiter
Clean(d time.Duration)
Statistic() map[string]interface{}
}
Limiter
type Logger ¶
type Logger interface {
Info(on, message string, properties map[string]string)
Error(on, message string, properties map[string]string)
Fetal(on, message string, properties map[string]string)
Close()
}
Logger
Click to show internal directories.
Click to hide internal directories.