apk

package
v0.0.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 24, 2024 License: Apache-2.0 Imports: 57 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CosignMediaType = `application/vnd.dev.cosign.simplesigning.v1+json`
)

Variables

This section is empty.

Functions

func HEXIFY

func HEXIFY(cert *x509.Certificate, b []byte) string

func Join

func Join(errs ...error) error

TODO: 1.20 errors.Join

func MultiWriter

func MultiWriter(writers ...io.WriteCloser) io.WriteCloser

func New

func New(args []string, opts ...Option) http.Handler

Types

type Authenticator added in v0.0.7

type Authenticator interface {
	AddAuth(ctx context.Context, req *http.Request) error
}

func NewChainguardIdentityAuth added in v0.0.7

func NewChainguardIdentityAuth(identity, issuer, audience string) Authenticator

NewChainguardIdentityAuth returns an Authenticator that authorizes requests as the given assumeable identity.

The identity is a UIDP of a Chainguard Identity. Issuer is usually https://issuer.enforce.dev. Audience is usually https://apk.cgr.dev.

type BlobSeeker

type BlobSeeker struct {
	Body   io.ReadCloser
	Status int

	Url string
	// contains filtered or unexported fields
}

func LazyBlob

func LazyBlob(cachedUrl string, size int64, keychain func(*http.Request) error) *BlobSeeker

func (*BlobSeeker) Close

func (b *BlobSeeker) Close() error

func (*BlobSeeker) Read

func (b *BlobSeeker) Read(p []byte) (n int, err error)

func (*BlobSeeker) ReadAt

func (b *BlobSeeker) ReadAt(p []byte, off int64) (n int, err error)

func (*BlobSeeker) Reader

func (b *BlobSeeker) Reader(ctx context.Context, off int64, end int64) (io.ReadCloser, error)

func (*BlobSeeker) Size

func (b *BlobSeeker) Size() int64

type Cache

type Cache interface {
	Get(context.Context, string) (*soci.TOC, error)
	Put(context.Context, string, *soci.TOC) error
}

type HandleFuncE

type HandleFuncE func(http.ResponseWriter, *http.Request) error

type HeaderData

type HeaderData struct {
	ShowSearch bool
	Expanded   bool
	Full       bool
	Search     string
	Depend     string
	Provide    string
	Message    string
	JQ         string
	PAXRecords map[string]string
	SizeLink   string // TODO: We don't use this, I think.
}

type Landing

type Landing struct {
	Examples []string
	Indices  []string
	Apks     []string
}

type Option

type Option func(h *handler)

func WithAuth added in v0.0.7

func WithAuth(a Authenticator) Option

func WithExamples added in v0.0.7

func WithExamples(examples []string) Option

func WithKeychain

func WithKeychain(keychain authn.Keychain) Option

func WithUserAgent

func WithUserAgent(ua string) Option

type TitleData

type TitleData struct {
	Title string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL