Documentation ¶
Index ¶
Constants ¶
View Source
const Ext0002 = "0002-flat-direct-storage-layout"
View Source
const (
Ext0003 = "0003-hash-and-id-n-tuple-storage-layout"
)
View Source
const Ext0004 = "0004-hashed-n-tuple-storage-layout"
View Source
const Ext0006 = "0006-flat-omit-prefix-storage-layout"
View Source
const (
Ext0007 = "0007-n-tuple-omit-prefix-storage-layout"
)
Variables ¶
View Source
var ErrInvalidLayoutID = errors.New("invalid id for layout")
View Source
var ErrNotLayout = errors.New("not a layout extension")
View Source
var ErrUnknown = errors.New("unrecognized extension")
Functions ¶
This section is empty.
Types ¶
type Layout ¶
type Layout interface { Extension NewFunc() (LayoutFunc, error) }
Layout is the interface for layout extensions
type LayoutFlatDirect ¶
type LayoutFlatDirect struct {
ExtensionName string `json:"extensionName"`
}
Extension 0002-flat-direct-storage-layout
func NewLayoutFlatDirect ¶
func NewLayoutFlatDirect() *LayoutFlatDirect
func (*LayoutFlatDirect) Name ¶
func (l *LayoutFlatDirect) Name() string
func (*LayoutFlatDirect) NewFunc ¶
func (l *LayoutFlatDirect) NewFunc() (LayoutFunc, error)
type LayoutFlatOmitPrefix ¶ added in v0.0.6
type LayoutFlatOmitPrefix struct { ExtensionName string `json:"extensionName"` Delimiter string `json:"delimiter"` }
Extension 0006-flat-omit-prefix-storage-layout
func NewLayoutFlatOmitPrefix ¶ added in v0.0.6
func NewLayoutFlatOmitPrefix() *LayoutFlatOmitPrefix
func (*LayoutFlatOmitPrefix) Name ¶ added in v0.0.6
func (l *LayoutFlatOmitPrefix) Name() string
Name returs the registered name
func (*LayoutFlatOmitPrefix) NewFunc ¶ added in v0.0.6
func (conf *LayoutFlatOmitPrefix) NewFunc() (LayoutFunc, error)
type LayoutFunc ¶
LayoutFunc is a function that maps an object id to a path in the storage root or returns an error if the id is invalid
type LayoutHashIDTuple ¶
type LayoutHashIDTuple struct { ExtensionName string `json:"extensionName"` DigestAlgorithm string `json:"digestAlgorithm"` TupleSize int `json:"tupleSize"` TupleNum int `json:"numberOfTuples"` }
Extension 0003-hash-and-id-n-tuple-storage-layout
func NewLayoutHashIDTuple ¶
func NewLayoutHashIDTuple() *LayoutHashIDTuple
func (*LayoutHashIDTuple) Name ¶
func (l *LayoutHashIDTuple) Name() string
func (*LayoutHashIDTuple) NewFunc ¶
func (l *LayoutHashIDTuple) NewFunc() (LayoutFunc, error)
type LayoutHashTuple ¶
type LayoutHashTuple struct { ExtensionName string `json:"extensionName"` DigestAlgorithm string `json:"digestAlgorithm"` TupleSize int `json:"tupleSize"` TupleNum int `json:"numberOfTuples"` Short bool `json:"shortObjectRoot"` }
Extension 0004-hashed-n-tuple-storage-layout
func NewLayoutHashTuple ¶
func NewLayoutHashTuple() *LayoutHashTuple
func (*LayoutHashTuple) Name ¶
func (l *LayoutHashTuple) Name() string
Name returs the registered name
func (*LayoutHashTuple) NewFunc ¶
func (conf *LayoutHashTuple) NewFunc() (LayoutFunc, error)
type LayoutTupleOmitPrefix ¶ added in v0.0.6
type LayoutTupleOmitPrefix struct { ExtensionName string `json:"extensionName"` Delimiter string `json:"delimiter"` TupleSize int `json:"tupleSize"` TupleNum int `json:"numberOfTuples"` Padding string `json:"zeroPadding"` Reverse bool `json:"reverseObjectRoot"` }
Extension 0007-n-tuple-omit-prefix-storage-layout
func NewLayoutTupleOmitPrefix ¶ added in v0.0.6
func NewLayoutTupleOmitPrefix() *LayoutTupleOmitPrefix
func (*LayoutTupleOmitPrefix) Name ¶ added in v0.0.6
func (l *LayoutTupleOmitPrefix) Name() string
Name returs the registered name
func (LayoutTupleOmitPrefix) NewFunc ¶ added in v0.0.6
func (l LayoutTupleOmitPrefix) NewFunc() (LayoutFunc, error)
Click to show internal directories.
Click to hide internal directories.