Documentation ¶
Index ¶
- func GetOutboundIP() (ip net.IP, err error)
- func ServeFileData(file string, w http.ResponseWriter, req *http.Request) (err error)
- type Download
- func (download *Download) BytesPerSecond() (speed float64)
- func (download *Download) Download(ctx context.Context, writer io.Writer)
- func (download *Download) Duration() (duration time.Duration)
- func (download *Download) EndTime() (time time.Time)
- func (download *Download) Filename() (filename string)
- func (download *Download) Filesize() (size uint64)
- func (download *Download) IsComplete() bool
- func (download *Download) Progress() (progress float64)
- func (download *Download) StartDownload(ctx context.Context, writer io.Writer)
- func (download *Download) StartTime() (time time.Time)
- func (download *Download) Subscribe(subscriber chan struct{})
- func (download *Download) Unsubscribe(subscriber chan struct{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetOutboundIP ¶
func ServeFileData ¶
Types ¶
type Download ¶
type Download struct { Done chan struct{} Err error // contains filtered or unexported fields }
func (*Download) BytesPerSecond ¶
func (*Download) IsComplete ¶
func (*Download) StartDownload ¶
func (*Download) Unsubscribe ¶
func (download *Download) Unsubscribe(subscriber chan struct{})
Click to show internal directories.
Click to hide internal directories.