local

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Name = "local"
)

Variables

This section is empty.

Functions

func HandleHttp

func HandleHttp(store *ObjectStore, secret string)

func MustNewObjectStore

func MustNewObjectStore(config Config) osi.ObjectStore

func NewObjectStore

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

func Sign

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

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

func (*HttpHandler) DeleteHandler

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

func (*HttpHandler) GetBucketAndPath

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

func (*HttpHandler) GetHandler

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

func (*HttpHandler) HeadHandler

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

func (*HttpHandler) PutHandler

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

type ObjectStore

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

func (*ObjectStore) ACLEnum

func (t *ObjectStore) ACLEnum() osi.ACLEnum

func (*ObjectStore) Bucket

func (t *ObjectStore) Bucket(name string) osi.Bucket

func (*ObjectStore) Name

func (t *ObjectStore) Name() string

Jump to

Keyboard shortcuts

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