kvcache

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	urlhandler.Handler
	// contains filtered or unexported fields
}

func NewClient

func NewClient(config *Config, cache cache.ByteCache) (*Client, error)

func (*Client) CopyFile

func (c *Client) CopyFile(ctx context.Context, sourceKey string, destinationKey string, overwrite bool) error

func (*Client) DeleteFile

func (c *Client) DeleteFile(ctx context.Context, key string) error

func (*Client) DownloadFile

func (c *Client) DownloadFile(ctx context.Context, key string) (io.ReadCloser, string, int64, error)

func (*Client) IsFileExists

func (c *Client) IsFileExists(ctx context.Context, key string) (bool, error)

func (*Client) MoveFile

func (c *Client) MoveFile(ctx context.Context, sourceKey string, destinationKey string, overwrite bool) error

func (*Client) UploadFile

func (c *Client) UploadFile(ctx context.Context, file io.Reader, key string) (string, error)

func (*Client) UploadLocalFile

func (c *Client) UploadLocalFile(ctx context.Context, file string, key string) (string, error)

type Config

type Config struct {
	Expires    time.Duration `json:"expires" yaml:"expires"`
	PublicBase string        `json:"public_base" yaml:"public_base"`
}

Jump to

Keyboard shortcuts

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