Documentation ¶
Index ¶
- Constants
- Variables
- func BlobAccess(url string, opts ...Option) (_ bpi.BlobAccess, rerr error)
- func BlobAccessForWget(url string, opts ...Option) (_ bpi.BlobAccess, rerr error)
- func BlobAccessProviderForWget(url string, opts ...Option) bpi.BlobAccessProvider
- func DataAccess(url string, opts ...Option) (bpi.DataAccess, error)
- func DataAccessForWget(url string, opts ...Option) (bpi.DataAccess, error)
- func Provider(url string, opts ...Option) bpi.BlobAccessProvider
- type Option
- func WithBody(v io.Reader) Option
- func WithCredentialContext(ctx credentials.ContextProvider) Option
- func WithCredentials(c credentials.Credentials) Option
- func WithHeader(h http.Header) Option
- func WithLoggingContext(ctx logging.ContextProvider) Option
- func WithMimeType(mime string) Option
- func WithNoRedirect(r ...bool) Option
- func WithVerb(v string) Option
- type Options
Constants ¶
View Source
const (
CACHE_CONTENT_THRESHOLD = 4096
)
Variables ¶
View Source
var REALM = ocmlog.DefineSubRealm("blob access for wget", "blobaccess/wget")
Functions ¶
func BlobAccess ¶ added in v0.12.0
func BlobAccess(url string, opts ...Option) (_ bpi.BlobAccess, rerr error)
func BlobAccessForWget ¶
func BlobAccessForWget(url string, opts ...Option) (_ bpi.BlobAccess, rerr error)
BlobAccessForWget returns a BlobAccess for the given URL. Deprecated: use BlobAccess.
func BlobAccessProviderForWget ¶
func BlobAccessProviderForWget(url string, opts ...Option) bpi.BlobAccessProvider
BlobAccessProviderForWget returns a BlobAccessProvider for the given URL. Deprecated: use Provider.
func DataAccess ¶ added in v0.12.0
func DataAccess(url string, opts ...Option) (bpi.DataAccess, error)
func DataAccessForWget ¶
func DataAccessForWget(url string, opts ...Option) (bpi.DataAccess, error)
DataAccessForWget returns a DataAccess for the given URL. Deprecated: use DataAccess.
Types ¶
type Option ¶
type Option = optionutils.Option[*Options]
func WithCredentialContext ¶
func WithCredentialContext(ctx credentials.ContextProvider) Option
func WithCredentials ¶
func WithCredentials(c credentials.Credentials) Option
func WithHeader ¶
func WithLoggingContext ¶
func WithLoggingContext(ctx logging.ContextProvider) Option
func WithMimeType ¶
func WithNoRedirect ¶
type Options ¶
type Options struct { CredentialContext credentials.Context LoggingContext logging.Context // Header to be passed in the http request Header http.Header // Verb is the http verb to be used for the request Verb string // Body is the body to be included in the http request Body io.Reader // NoRedirect allows to disable redirects NoRedirect *bool // MimeType defines the media type of the downloaded content MimeType string // Credentials allows to pass credentials and certificates for the http communication Credentials credentials.Credentials }
func (*Options) GetCredentials ¶
func (o *Options) GetCredentials(url string) (credentials.Credentials, error)
Click to show internal directories.
Click to hide internal directories.