goseaweed

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2020 License: MIT Imports: 7 Imported by: 0

README

goseaweed

seaweed golang sdk

install go get github.com/dollarkillerx/goseaweed

	fs := NewSeaweedFs("http://192.168.88.11:8888", time.Second*10)
	file, err := ioutil.ReadFile("./README/82274b7ec75f6f1fd86641f64dc82958.png")
	if err != nil {
		log.Fatalln(err)
	}
	if err := fs.PutObject("82274b7ec75f6f1fd86641f64dc82958.png", file); err != nil {
		log.Fatalln(err)
	}
	object, err := fs.GetObject("82274b7ec75f6f1fd86641f64dc82958.png")
	if err != nil {
		log.Fatalln(err)
	}
	ioutil.WriteFile("xxx.png",object,000666)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Seaweed

type Seaweed interface {
	PutObject(objectName string, content []byte) error
	GetObject(objectName string) ([]byte, error)
	RemoveObject(objectName string) error
}

func NewSeaweedFs

func NewSeaweedFs(serverURL string, timeout time.Duration) Seaweed

Jump to

Keyboard shortcuts

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