Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BasicStorage ¶
type BasicStorage interface { // Save saves a piece of `Data` Save(key string, value io.Reader) (string, error) // Load loads a piece of `Data` Load(key string, index string) (io.ReadCloser, error) // Exist checks existence of a piece of `Data` Exist(key string, index string) (bool, error) // Delete deletes a piece of `Data` Delete(key string, index string) error // Update updates a piece of `Data` Update(key string, index string, value io.Reader) (string, error) }
BasicStorage is an abstraction used to refer to any underlying system or device that XuperDB will store its data to. key is the identification of a piece of `Data`, and it's decided by end-users index is the index of stored data, and it's created by `BasicStorage` value contains content of a piece of `Data`
type Storage ¶
type Storage interface { BasicStorage //LoadStr loads a piece of `Data`, and convert it to a string LoadStr(key string, index string) (string, error) }
func NewStorage ¶
func NewStorage(s BasicStorage) Storage
Click to show internal directories.
Click to hide internal directories.