Documentation ¶
Overview ¶
Package source contains remote source interface and implementations for uploader.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTTPSource ¶
type HTTPSource struct {
// contains filtered or unexported fields
}
HTTPSource is HTTP source.
func (*HTTPSource) Open ¶
func (s *HTTPSource) Open(ctx context.Context, u *url.URL) (_ RemoteFile, rerr error)
Open implements Source.
func (*HTTPSource) WithClient ¶
func (s *HTTPSource) WithClient(client *http.Client) *HTTPSource
WithClient sets HTTP client to use.
type RemoteFile ¶
type RemoteFile interface { io.ReadCloser // Name returns filename. Should not be empty. Name() string // Size returns size of file. If size is unknown, -1 should be returned. Size() int64 }
RemoteFile is abstraction for remote file.
Click to show internal directories.
Click to hide internal directories.