local

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Name = "local"
)

Variables

This section is empty.

Functions

func HandleHttp added in v1.0.1

func HandleHttp(store *objectstore, secret string)

func MustNewObjectStore

func MustNewObjectStore(config Config) oss.ObjectStore

func NewObjectStore

func NewObjectStore(config Config) (oss oss.ObjectStore, err error)

func Sign added in v1.0.1

func Sign(method string, path string, expires int, secret string) string

Types

type Config

type Config struct {
	BasePath   string `yaml:"base_path" mapstructure:"base_path" json:"base_path"`
	HttpAddr   string `yaml:"http_addr" mapstructure:"http_addr" json:"http_addr"`
	HttpSecret string `yaml:"http_secret" mapstructure:"http_secret" json:"http_secret"`
}

type HttpHandler added in v1.0.1

type HttpHandler struct {
	Secret string
	// contains filtered or unexported fields
}

func (*HttpHandler) DeleteHandler added in v1.0.1

func (t *HttpHandler) DeleteHandler(w http.ResponseWriter, r *http.Request)

func (*HttpHandler) GetBucketAndPath added in v1.0.1

func (t *HttpHandler) GetBucketAndPath(r *http.Request) (string, string, error)

func (*HttpHandler) GetHandler added in v1.0.1

func (t *HttpHandler) GetHandler(w http.ResponseWriter, r *http.Request)

func (*HttpHandler) HeadHandler added in v1.0.1

func (t *HttpHandler) HeadHandler(w http.ResponseWriter, r *http.Request)

func (*HttpHandler) PutHandler added in v1.0.1

func (t *HttpHandler) PutHandler(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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