Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func IsRegistered ¶
IsRegistered returns true if the named extension is present in the register
func Register ¶
func Register(extfunc func() Extension)
Register adds the extension returned by the extfunc to the extension register. The extension instance returned by extfunc must have default values.
func Registered ¶
func Registered() []string
Registered returns slice of strings with all registered extension names
Types ¶
type Extension ¶
type Extension interface {
Name() string // Name returns the extension name
}
func Ext0002 ¶
func Ext0002() Extension
Ext0002 returns new instance of 0002-flat-direct-storage-layout with default values
func Ext0003 ¶
func Ext0003() Extension
Ext0003 returns a new instance of 0003-hash-and-id-n-tuple-storage-layout with default values
func Ext0004 ¶
func Ext0004() Extension
Ext0004 returns a new instance of 0004-hashed-n-tuple-storage-layout
func Ext0006 ¶
func Ext0006() Extension
Ext0006 returns a new instance of 0006-flat-omit-prefix-storage-layout with default values
func Ext0007 ¶
func Ext0007() Extension
Ext0007 returns a new instance of 0007-n-tuple-omit-prefix-storage-layout with default values
type Layout ¶
Layout is extension that provides a function for resolving object IDs to Storage Root Paths
type LayoutFlatDirect ¶
type LayoutFlatDirect struct{}
LayoutFlatDirect implements 0002-flat-direct-storage-layout
func (LayoutFlatDirect) MarshalJSON ¶
func (l LayoutFlatDirect) MarshalJSON() ([]byte, error)
func (LayoutFlatDirect) Name ¶
func (l LayoutFlatDirect) Name() string
type LayoutFlatOmitPrefix ¶
type LayoutFlatOmitPrefix struct {
Delimiter string `json:"delimiter"`
}
LayoutFlatOmitPrefix implements 0006-flat-omit-prefix-storage-layout
func (LayoutFlatOmitPrefix) MarshalJSON ¶
func (l LayoutFlatOmitPrefix) MarshalJSON() ([]byte, error)
func (LayoutFlatOmitPrefix) Name ¶
func (l LayoutFlatOmitPrefix) Name() string
type LayoutHashIDTuple ¶
type LayoutHashIDTuple struct { DigestAlgorithm string `json:"digestAlgorithm"` TupleSize int `json:"tupleSize"` TupleNum int `json:"numberOfTuples"` }
LayoutHashIDTuple implements 0003-hash-and-id-n-tuple-storage-layout
func (LayoutHashIDTuple) MarshalJSON ¶
func (l LayoutHashIDTuple) MarshalJSON() ([]byte, error)
func (LayoutHashIDTuple) Name ¶
func (l LayoutHashIDTuple) Name() string
type LayoutHashTuple ¶
type LayoutHashTuple struct { DigestAlgorithm string `json:"digestAlgorithm"` TupleSize int `json:"tupleSize"` TupleNum int `json:"numberOfTuples"` Short bool `json:"shortObjectRoot"` }
LayoutHashTuple implements 0004-hashed-n-tuple-storage-layout
func (LayoutHashTuple) MarshalJSON ¶
func (l LayoutHashTuple) MarshalJSON() ([]byte, error)
func (LayoutHashTuple) Name ¶
func (l LayoutHashTuple) Name() string
type LayoutTupleOmitPrefix ¶
type LayoutTupleOmitPrefix struct { Delimiter string `json:"delimiter"` TupleSize int `json:"tupleSize"` TupleNum int `json:"numberOfTuples"` Padding string `json:"zeroPadding"` Reverse bool `json:"reverseObjectRoot"` }
LayoutTupleOmitPrefix implements 0007-n-tuple-omit-prefix-storage-layout
func (LayoutTupleOmitPrefix) MarshalJSON ¶
func (l LayoutTupleOmitPrefix) MarshalJSON() ([]byte, error)
func (LayoutTupleOmitPrefix) Name ¶
func (l LayoutTupleOmitPrefix) Name() string