Chore: Refactor render via http (#84613)

This commit is contained in:
Ezequiel Victorero
2024-05-14 07:24:18 -03:00
committed by GitHub
parent a7a503501a
commit c9c6445554
9 changed files with 163 additions and 154 deletions

View File

@ -42,18 +42,25 @@ func getRequestTimeout(opt TimeoutOpts) time.Duration {
return opt.Timeout * opt.RequestTimeoutMultiplier
}
type Opts struct {
type CommonOpts struct {
TimeoutOpts
AuthOpts
Path string
Timezone string
ConcurrentLimit int
Headers map[string][]string
}
type CSVOpts struct {
CommonOpts
}
type Opts struct {
CommonOpts
ErrorOpts
Width int
Height int
Path string
Encoding string
Timezone string
ConcurrentLimit int
DeviceScaleFactor float64
Headers map[string][]string
Theme models.Theme
}
@ -75,14 +82,9 @@ type SanitizeSVGResponse struct {
Sanitized []byte
}
type CSVOpts struct {
TimeoutOpts
AuthOpts
Path string
Encoding string
Timezone string
ConcurrentLimit int
Headers map[string][]string
type Result struct {
FilePath string
FileName string
}
type RenderResult struct {