Documentation
¶
Index ¶
Constants ¶
View Source
const ( JsonExt = ".json" GobExt = ".gob" HtmlExt = ".html" XmlExt = ".xml" )
View Source
const ( CaseSensitive = iota FullMatch )
Variables ¶
This section is empty.
Functions ¶
func ErrUnknownAsset ¶ added in v0.5.0
Types ¶
type KeyValues ¶ added in v0.3.2
type KeyValues interface {
Keys() ([]string, error)
Has(key string) (bool, error)
Get(key string) (io.ReadCloser, error)
Set(key string, data io.Reader) error
Cut(key string) (bool, error)
IsCurrent() (bool, time.Time)
CreatedAfter(ts int64) ([]string, error)
UpdatedAfter(ts int64) ([]string, error)
CreatedOrUpdatedAfter(ts int64) ([]string, error)
IsUpdatedAfter(key string, ts int64) (bool, error)
ModTime(key string) (time.Time, error)
}
func NewKeyValues ¶ added in v0.4.10
NewKeyValues connects a new local key value storage at the specified directory and will use specified extension for the value files
type MatchOption ¶ added in v0.3.38
type MatchOption int
type ReadableRedux ¶ added in v0.3.38
type ReadableRedux interface {
MustHave(assets ...string) error
Keys(asset string) []string
HasAsset(asset string) bool
HasKey(asset, key string) bool
HasValue(asset, key, val string) bool
GetAllValues(asset, key string) ([]string, bool)
GetLastVal(asset, key string) (string, bool)
ModTime() (time.Time, error)
RefreshReader() (ReadableRedux, error)
MatchAsset(asset string, terms []string, scope []string, options ...MatchOption) []string
Match(query map[string][]string, options ...MatchOption) []string
Sort(ids []string, desc bool, sortBy ...string) ([]string, error)
Export(w io.Writer, keys ...string) error
}
func NewReduxReader ¶ added in v0.4.3
func NewReduxReader(dir string, assets ...string) (ReadableRedux, error)
type WriteableRedux ¶ added in v0.3.38
type WriteableRedux interface {
ReadableRedux
AddValues(asset, key string, values ...string) error
BatchAddValues(asset string, keyValues map[string][]string) error
ReplaceValues(asset, key string, values ...string) error
BatchReplaceValues(asset string, keyValues map[string][]string) error
CutKeys(asset string, keys ...string) error
CutValues(asset, key string, values ...string) error
BatchCutValues(asset string, keyValues map[string][]string) error
RefreshWriter() (WriteableRedux, error)
}
func NewReduxWriter ¶ added in v0.4.3
func NewReduxWriter(dir string, assets ...string) (WriteableRedux, error)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.