objectstorage

package
v0.1.0-rc.3 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Validate

func Validate(ctx context.Context, value Config) error

Types

type Client

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

func New

func New(ctx context.Context, value Config) (*Client, error)

func (*Client) Delete

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

func (*Client) Head

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

func (*Client) PresignGet

func (c *Client) PresignGet(ctx context.Context, bucket, key string, expires time.Duration) (string, error)

func (*Client) PresignPut

func (c *Client) PresignPut(ctx context.Context, bucket, key, contentType string, size int64, expires time.Duration) (string, http.Header, error)

func (*Client) PublicURL

func (c *Client) PublicURL(bucket, key string) string

func (*Client) ReadPrefix

func (c *Client) ReadPrefix(ctx context.Context, bucket, key string, limit int64) ([]byte, error)

func (*Client) VerifyBucket

func (c *Client) VerifyBucket(ctx context.Context, bucket string, public bool) error

type Config

type Config struct {
	Endpoint             string `json:"endpoint"`
	Region               string `json:"region"`
	AccessKeyID          string `json:"access_key_id"`
	SecretAccessKey      string `json:"secret_access_key"`
	ForcePathStyle       bool   `json:"force_path_style"`
	PublicBucket         string `json:"public_bucket,omitempty"`
	PrivateBucket        string `json:"private_bucket,omitempty"`
	PublicBaseURL        string `json:"public_base_url,omitempty"`
	AllowPrivateEndpoint bool   `json:"allow_private_endpoint"`
}
type Head struct {
	ETag        string
	Size        int64
	ContentType string
}

Jump to

Keyboard shortcuts

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