seaweedfs

package
v0.0.0-...-e282ec7 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const SeaweedfsStorageType storage.Type = "seaweedfs"

Variables

This section is empty.

Functions

func NewSeaweedfsStorage

func NewSeaweedfsStorage(ctx context.Context, cfg interface{}) (storage.Storage, error)

Types

type DirAssign

type DirAssign struct {
	Count     int    `json:"count"`
	FID       string `json:"fid"`
	URL       string `json:"url"`
	PublicURL string `json:"publicUrl"`
}

func (*DirAssign) ToHttpURL

func (d *DirAssign) ToHttpURL() string

type DirLookup

type DirLookup struct {
	VolumnID  string     `json:"volumeId"`
	Locations []Location `json:"locations"`
}

type Location

type Location struct {
	PublicURL string `json:"publicUrl"`
	URL       string `json:"url"`
}

type SeaweedfsStorageConfig

type SeaweedfsStorageConfig struct {
	Host string `json:"host"`
}

func (*SeaweedfsStorageConfig) DirAssignUrl

func (c *SeaweedfsStorageConfig) DirAssignUrl() string

func (*SeaweedfsStorageConfig) DirLookupUrl

func (c *SeaweedfsStorageConfig) DirLookupUrl(volumnID string) string

type Storage

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

func (*Storage) Delete

func (s *Storage) Delete(id storage.ID) error

func (*Storage) GetJsonByURL

func (s *Storage) GetJsonByURL(method, url string, body io.Reader, v interface{}) error

func (*Storage) Read

func (s *Storage) Read(id storage.ID, opts ...storage.ReadOption) (*storage.Object, error)

func (*Storage) Write

func (s *Storage) Write(f *storage.Object, opts ...storage.WriteOption) (storage.ID, error)

type UploadResponse

type UploadResponse struct {
	Name string `json:"name"`
	Size int64  `json:"size"`
	ETag string `json:"eTag"`
}

Jump to

Keyboard shortcuts

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