Files
OpenList/internal/model/link.go

22 lines
427 B
Go
Raw Normal View History

2022-06-15 18:06:42 +08:00
package model
2022-06-06 21:48:53 +08:00
import (
"io"
"net/http"
2022-06-13 15:39:47 +08:00
"time"
2022-06-06 21:48:53 +08:00
)
type LinkArgs struct {
IP string
Header http.Header
}
type Link struct {
2022-06-13 15:39:47 +08:00
URL string
Header http.Header // needed header
Data io.ReadCloser // return file reader directly
Status int // status maybe 200 or 206, etc
2022-06-15 18:06:42 +08:00
FilePath *string // local file, return the filepath
2022-06-13 15:39:47 +08:00
Expiration *time.Duration // url expiration time
2022-06-06 21:48:53 +08:00
}