Documentation
¶
Index ¶
- func DownloadFTP(ctx context.Context, ustr string, secret tl.Secret, auth tl.FeedAuthorization) (io.ReadCloser, error)
- func DownloadHTTP(ctx context.Context, ustr string, secret tl.Secret, auth tl.FeedAuthorization) (io.ReadCloser, int, error)
- func DownloadS3(ctx context.Context, ustr string, secret tl.Secret, auth tl.FeedAuthorization) (io.ReadCloser, error)
- func UploadS3(ctx context.Context, ustr string, secret tl.Secret, uploadFile io.Reader) error
- func WithAllowFTP(req *Request)
- func WithAllowLocal(req *Request)
- func WithAllowS3(req *Request)
- func WithAuth(secret tl.Secret, auth tl.FeedAuthorization) func(req *Request)
- type FetchResponse
- type Request
- type RequestOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DownloadFTP ¶
func DownloadFTP(ctx context.Context, ustr string, secret tl.Secret, auth tl.FeedAuthorization) (io.ReadCloser, error)
func DownloadHTTP ¶
func DownloadS3 ¶
func DownloadS3(ctx context.Context, ustr string, secret tl.Secret, auth tl.FeedAuthorization) (io.ReadCloser, error)
func WithAllowFTP ¶
func WithAllowFTP(req *Request)
func WithAllowLocal ¶
func WithAllowLocal(req *Request)
func WithAllowS3 ¶
func WithAllowS3(req *Request)
Types ¶
type FetchResponse ¶ added in v0.10.2
type FetchResponse struct { Filename string Data []byte ResponseSize int ResponseCode int ResponseSHA1 string FetchError error }
func AuthenticatedRequest ¶
func AuthenticatedRequest(address string, opts ...RequestOption) (FetchResponse, error)
AuthenticatedRequest fetches a url using a secret and auth description. Returns []byte, sha1, size, response code.
func AuthenticatedRequestDownload ¶
func AuthenticatedRequestDownload(address string, opts ...RequestOption) (FetchResponse, error)
type Request ¶
type Request struct { URL string AllowFTP bool AllowS3 bool AllowLocal bool Secret tl.Secret Auth tl.FeedAuthorization }
func NewRequest ¶
func NewRequest(address string, opts ...RequestOption) *Request
type RequestOption ¶
type RequestOption func(*Request)
Click to show internal directories.
Click to hide internal directories.