storage

package
v0.1.931 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2026 License: Apache-2.0 Imports: 13 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	contract.StorageOperator
}

func NewClient

func NewClient(d Dependencies, opts ClientOptions) (Client, error)

type ClientOption

type ClientOption = contract.Opt[ClientOptions]

func WithLoaded

func WithLoaded(x Loaded) ClientOption

func WithStorageBaseURL

func WithStorageBaseURL(x *url.URL) ClientOption

func WithTimeout

func WithTimeout(x time.Duration) ClientOption

func WithUploadPath

func WithUploadPath(x string) ClientOption

type ClientOptions

type ClientOptions struct {
	Loaded
	Timeout time.Duration
}

func ApplyClientOptions

func ApplyClientOptions(opts *ClientOptions, modifiers ...ClientOption) ClientOptions

type DefaultTool

type DefaultTool struct {
	T *contract.Tool[Client]
}

func NewTool

func NewTool(c Client, opts contract.ToolOptions[Client]) *DefaultTool

func (*DefaultTool) Upload

func (d *DefaultTool) Upload(ctx context.Context, opts contract.UploadOptions) error

Upload stores files in a storage service.

type Dependencies

type Dependencies struct {
	E  contract.EnvironmentOperator
	MP contract.MultipartOperator
}

type Loaded

type Loaded struct {
	StorageBaseURL *url.URL
	UploadPath     string
}

type Tool

type Tool interface {
	Client
}

Jump to

Keyboard shortcuts

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