blobstoreclient

package
v0.0.0-...-9bbed00 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WriteTempFile

func WriteTempFile(ctx context.Context, writer func(w io.Writer) error) (string, error)

Types

type BlobFile

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

func (*BlobFile) Close

func (f *BlobFile) Close() error

func (*BlobFile) Open

func (f *BlobFile) Open() io.ReadCloser

func (*BlobFile) Path

func (f *BlobFile) Path() string

type BlobInfo

type BlobInfo struct {
	SHA256 []byte
	Length int64
}

type BlobStoreClient

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

func (*BlobStoreClient) Download

func (c *BlobStoreClient) Download(ctx context.Context, blobHash []byte) (*BlobFile, error)

func (*BlobStoreClient) Upload

func (c *BlobStoreClient) Upload(ctx context.Context, r io.Reader) (*BlobInfo, error)

type Client

type Client interface {
	Upload(ctx context.Context, r io.Reader) (*BlobInfo, error)
	Download(ctx context.Context, sha256 []byte) (*BlobFile, error)
}

func NewClient

func NewClient(ctx context.Context, options ClientOptions) (Client, error)

type ClientOptions

type ClientOptions struct {
	Host      string
	TLSConfig *tls.Config
}

Jump to

Keyboard shortcuts

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