Help us shape the future of Go! Take the 2026 Go Developer Survey

storage

package
v0.90.6 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2026 License: Apache-2.0 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 {
	// contains filtered or unexported fields
}

func MustNew

func MustNew(dataDir string, bucketCfg map[string]any) *Client

func New

func New(dataDir string, bucketCfg map[string]any) (*Client, error)

func (*Client) DataDir

func (c *Client) DataDir(elem ...string) (string, error)

func (*Client) OpenBucket

func (c *Client) OpenBucket(ctx context.Context, elem ...string) (*blob.Bucket, bool, error)

OpenBucket opens the client's external bucket, scoped to the client's prefixes plus any additional elem. It returns false if no bucket is configured. The ctx scopes the open itself; the returned bucket does not retain it and stays usable after it is cancelled.

func (*Client) RandomTempDir

func (c *Client) RandomTempDir(pattern string, elem ...string) (string, error)

func (*Client) RemovePrefix

func (c *Client) RemovePrefix(ctx context.Context, prefix ...string) error

func (*Client) TempDir

func (c *Client) TempDir(elem ...string) (string, error)

func (*Client) WithPrefix

func (c *Client) WithPrefix(prefix ...string) *Client

Jump to

Keyboard shortcuts

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