Documentation ¶
Index ¶
- type ACLOption
- type ACLType
- type IOssStore
- type StoreWrapper
- func (c *StoreWrapper) Delete(key string) error
- func (c *StoreWrapper) DeleteMulti(keys []string) ([]string, error)
- func (c *StoreWrapper) Get(key string) (data []byte, err error)
- func (c *StoreWrapper) Save(key string, data []byte, opts ...ACLOption) error
- func (c *StoreWrapper) SaveWithReadCloser(key string, readCloser io.ReadCloser, opts ...ACLOption) error
- func (c *StoreWrapper) SaveWithReader(key string, reader io.Reader, opts ...ACLOption) error
- func (c *StoreWrapper) SetStore(i IOssStore)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IOssStore ¶
type IOssStore interface { //Save save k-v Save(key string, data []byte, acl ACLType) error //SaveWithReader : save with io.Reader SaveWithReader(key string, reader io.Reader, acl ACLType) error //SaveWithReadCloser : save with io.ReadCloser SaveWithReadCloser(key string, readCloser io.ReadCloser, acl ACLType) error //Delete delete k Delete(key string) error //DeleteMulti delete multi keys DeleteMulti(keys []string) ([]string, error) //Get : get v from k Get(key string) (data []byte, err error) }
IOssStore store interface
type StoreWrapper ¶ added in v1.1.1
type StoreWrapper struct {
// contains filtered or unexported fields
}
StoreWrapper store container
var ( //StoreIns global instance StoreIns *StoreWrapper )
func (*StoreWrapper) Delete ¶ added in v1.1.1
func (c *StoreWrapper) Delete(key string) error
Delete delete k
func (*StoreWrapper) DeleteMulti ¶ added in v1.1.1
func (c *StoreWrapper) DeleteMulti(keys []string) ([]string, error)
DeleteMulti delete multi
func (*StoreWrapper) Get ¶ added in v1.1.1
func (c *StoreWrapper) Get(key string) (data []byte, err error)
Get : get v from k
func (*StoreWrapper) Save ¶ added in v1.1.1
func (c *StoreWrapper) Save(key string, data []byte, opts ...ACLOption) error
Save save k-v
func (*StoreWrapper) SaveWithReadCloser ¶ added in v1.1.1
func (c *StoreWrapper) SaveWithReadCloser(key string, readCloser io.ReadCloser, opts ...ACLOption) error
SaveWithReadCloser : save with io.ReadCloser
func (*StoreWrapper) SaveWithReader ¶ added in v1.1.1
SaveWithReader : save with io.Reader
func (*StoreWrapper) SetStore ¶ added in v1.1.1
func (c *StoreWrapper) SetStore(i IOssStore)
Click to show internal directories.
Click to hide internal directories.