Documentation
¶
Index ¶
- func WithAllowFTP(req *Request)
- func WithAllowLocal(req *Request)
- func WithAllowS3(req *Request)
- func WithAuth(secret tl.Secret, auth tl.FeedAuthorization) func(req *Request)
- type Az
- func (r Az) CreateSignedUrl(ctx context.Context, key string, secret tl.Secret) (string, error)
- func (r Az) Download(ctx context.Context, key string, secret tl.Secret, auth tl.FeedAuthorization) (io.ReadCloser, int, error)
- func (r Az) Upload(ctx context.Context, key string, secret tl.Secret, uploadFile io.Reader) error
- type Downloader
- type FetchResponse
- type Ftp
- type Http
- type Local
- type Presigner
- type Request
- type RequestOption
- type S3
- func (r S3) CreateSignedUrl(ctx context.Context, key string, secret tl.Secret) (string, error)
- func (r S3) Download(ctx context.Context, key string, secret tl.Secret, auth tl.FeedAuthorization) (io.ReadCloser, int, error)
- func (r S3) Upload(ctx context.Context, key string, secret tl.Secret, uploadFile io.Reader) error
- type Uploader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithAllowFTP ¶
func WithAllowFTP(req *Request)
func WithAllowLocal ¶
func WithAllowLocal(req *Request)
func WithAllowS3 ¶
func WithAllowS3(req *Request)
Types ¶
type Az ¶ added in v0.12.0
func NewAzFromUrl ¶ added in v0.12.0
func (Az) CreateSignedUrl ¶ added in v0.12.0
type Downloader ¶ added in v0.12.0
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)
AuthenticatedRequestDownload is similar to AuthenticatedRequest but writes to a temporary file.
type Local ¶ added in v0.12.0
type Local struct {
Directory string
}
type Request ¶
type Request struct { URL string AllowFTP bool AllowLocal bool AllowS3 bool MaxSize uint64 Secret tl.Secret Auth tl.FeedAuthorization }
func NewRequest ¶
func NewRequest(address string, opts ...RequestOption) *Request
type RequestOption ¶
type RequestOption func(*Request)
func WithMaxSize ¶ added in v0.14.0
func WithMaxSize(s uint64) RequestOption
type S3 ¶ added in v0.12.0
func NewS3FromUrl ¶ added in v0.12.0
func (S3) CreateSignedUrl ¶ added in v0.12.0
Click to show internal directories.
Click to hide internal directories.