Documentation ¶
Index ¶
- Constants
- Variables
- func BlobAccess(url string, opts ...Option) (_ bpi.BlobAccess, rerr error)
- func DataAccess(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 ¶
func BlobAccess(url string, opts ...Option) (_ bpi.BlobAccess, rerr error)
func DataAccess ¶
func DataAccess(url string, opts ...Option) (bpi.DataAccess, error)
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.