backend

package
v1.5.7 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ID2Path

func ID2Path(r string) string

ID2Path ...

func RegisterEngine

func RegisterEngine(name string, farm FarmFunc)

RegisterEngine Register a Engine

Types

type FarmFunc

type FarmFunc func(string) (Wagoner, error)

type Key added in v1.5.0

type Key struct {
	Cat string `json:"cat"`
	ID  string `json:"id"`
}

Key ...

func (Key) Path added in v1.5.0

func (k Key) Path() string

Path ...

func (*Key) String added in v1.5.0

func (k *Key) String() string

type ListItem added in v1.5.0

type ListItem struct {
	Key          string     `json:"key,omitempty" xml:"Key"`
	ETag         string     `json:"etag,omitempty" xml:"ETag"`
	Size         uint32     `json:"size,omitempty" xml:"Size"`
	LastModified *time.Time `json:"modified,omitempty" xml:"LastModified"`
}

ListItem ...

type ListSpec added in v1.5.0

type ListSpec struct {
	Delimiter string `json:"delimiter"`
	Marker    string `json:"marker"`
	Limit     int    `json:"limit"`
	Prefix    string `json:"prefix"`
}

ListSpec ...

type Meta added in v1.5.0

type Meta = types.Meta

Meta ...

type Wagoner

type Wagoner interface {
	Get(k Key) ([]byte, error)
	Put(k Key, data []byte, meta Meta) (Meta, error)
	List(spec ListSpec) ([]ListItem, error)
	Exists(k Key) (bool, error)
	Delete(k Key) error
}

Wagoner ...

func FarmEngine

func FarmEngine(roof string) (Wagoner, error)

FarmEngine get a intance of Wagoner by a special config name

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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