metathings_module_soda_sdk

package
v1.3.0-alpha.10 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	C_OBJECT_STREAM_ACTION_CANCEL = "/v1/object_streams/%s/actions/cancel"
)
View Source
const (
	C_OBJECT_STREAM_ACTION_NEXT_CHUNK = "/v1/object_streams/%s/actions/next_chunk"
)
View Source
const (
	C_OBJECT_STREAM_ACTION_PUT_OBJECT_STREAMING = "/v1/actions/put_object_streaming"
)
View Source
const (
	C_OBJECT_STREAM_ACTION_SHOW = "/v1/object_streams/%s/actions/show"
)
View Source
const (
	C_OBJECT_STREAM_ACTION_WRITE_CHUNK = "/v1/object_streams/%s/actions/write_chunk"
)
View Source
const (
	OPTION_URL = "url"
)

Variables

View Source
var (
	WithLogger, GetLogger         = option_helper.WithLogger, option_helper.GetLogger
	WithURL, GetURL               = option.New[string](OPTION_URL)
	WithHTTPClient, GetHTTPClient = option_helper.WithHTTPClient, option_helper.GetHTTPClient
)
View Source
var (
	ErrPutObjectTimeout = fmt.Errorf("put object timeout")
)

Functions

func NewDefaultSodaClientOption

func NewDefaultSodaClientOption() option.Option

Types

type NewSodaClientOption

type NewSodaClientOption = option.ApplyOption

type ObjectStreamInfo

type ObjectStreamInfo struct {
	Sha1sum     string
	Length      int64
	Uploaded    int64
	MaxAge      time.Duration
	Remained    time.Duration
	Offset      int64
	ChunkLength int64
}

type PutObjectStreamingOption

type PutObjectStreamingOption struct {
	Sha1sum string
}

type SodaClient

type SodaClient interface {
	PutObjectStreaming(name string, src io.ReadSeeker, len int64, opts PutObjectStreamingOption) error
}

func NewSodaClient

func NewSodaClient(opts ...NewSodaClientOption) (SodaClient, error)

Jump to

Keyboard shortcuts

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