package http

import "github.com/moby/buildkit/source/http"

Index

Constants

const (
	HTTPAuthHeaderSecretPrefix = "HTTP_AUTH_HEADER_"
	HTTPAuthTokenSecretPrefix  = "HTTP_AUTH_TOKEN_"
)

Types

type HTTPIdentifier

type HTTPIdentifier struct {
	TLS              bool
	URL              string
	Checksum         digest.Digest
	Filename         string
	Perm             int
	UID              int
	GID              int
	AuthHeaderSecret string
	Header           []HeaderField
	VerifySignature  *HTTPSignatureVerifyOptions
}

func NewHTTPIdentifier

func NewHTTPIdentifier(str string, tls bool) (*HTTPIdentifier, error)

func (*HTTPIdentifier) Capture

func (id *HTTPIdentifier) Capture(c *provenance.Capture, pin string) error

func (*HTTPIdentifier) Scheme

func (id *HTTPIdentifier) Scheme() string

type HTTPSignatureVerifyOptions

type HTTPSignatureVerifyOptions struct {
	PubKey    []byte
	Signature []byte
}

type HeaderField

type HeaderField struct {
	Name  string
	Value string
}

type Metadata

type Metadata struct {
	Digest           digest.Digest
	Filename         string
	LastModified     *time.Time
	ChecksumResponse *MetadataChecksumResponse
}

type MetadataChecksumAlgo

type MetadataChecksumAlgo int
const (
	MetadataChecksumAlgoSHA256 MetadataChecksumAlgo = iota
	MetadataChecksumAlgoSHA384
	MetadataChecksumAlgoSHA512
)

type MetadataChecksumRequest

type MetadataChecksumRequest struct {
	Algo   MetadataChecksumAlgo
	Suffix []byte
}

type MetadataChecksumResponse

type MetadataChecksumResponse struct {
	Digest string
	Suffix []byte
}

type MetadataOpts

type MetadataOpts struct {
	ChecksumReq *MetadataChecksumRequest
}

type Opt

type Opt struct {
	CacheAccessor cache.Accessor
	Transport     http.RoundTripper
}

type Source

type Source struct {
	// contains filtered or unexported fields
}

func NewSource

func NewSource(opt Opt) (*Source, error)

func (*Source) Identifier

func (hs *Source) Identifier(scheme, ref string, attrs map[string]string, platform *pb.Platform) (source.Identifier, error)

func (*Source) Resolve

func (*Source) ResolveMetadata

func (hs *Source) ResolveMetadata(ctx context.Context, id *HTTPIdentifier, sm *session.Manager, jobCtx solver.JobContext, opt MetadataOpts) (*Metadata, error)

func (*Source) Schemes

func (hs *Source) Schemes() []string

Source Files

identifier.go source.go transport.go

Version
v0.28.0-rc1
Published
Feb 24, 2026
Platform
darwin/amd64
Imports
35 packages
Last checked
4 minutes ago

Tools for package owners.