alist/internal/model/link.go

22 lines
427 B
Go
Raw Normal View History

2022-06-15 10:06:42 +00:00
package model
2022-06-06 13:48:53 +00:00
import (
"io"
"net/http"
2022-06-13 07:39:47 +00:00
"time"
2022-06-06 13:48:53 +00:00
)
type LinkArgs struct {
IP string
Header http.Header
}
type Link struct {
2022-06-13 07:39:47 +00: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 10:06:42 +00:00
FilePath *string // local file, return the filepath
2022-06-13 07:39:47 +00:00
Expiration *time.Duration // url expiration time
2022-06-06 13:48:53 +00:00
}