Documentation ¶
Index ¶
- Constants
- type Client
- func (v *Client) Delete(ctx context.Context, key string) (string, error)
- func (v *Client) Get(ctx context.Context, key string) (string, error)
- func (v *Client) List(ctx context.Context, prefix string) ([]KVModel, error)
- func (v *Client) Search(ctx context.Context, prefix string) ([]KVModel, error)
- func (v *Client) Set(ctx context.Context, key, value string) (string, error)
- type Config
- type KVListModel
- type KVModel
- type RawValue
Constants ¶
View Source
const ( PathApiV1KV = "/api/kv/v1" PathApiV1KVSearch = "/api/kv/search/v1" PathApiV1KVList = "/api/kv/list/v1" )
View Source
const ( EventKVSet = 100001 EventKVGet = 100002 EventKVDel = 100003 )
View Source
const (
AuthTokenHeaderName = "x-loop-auth"
)
View Source
const (
PathApiV1 = "/api/watch/v1"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
type KVListModel ¶
type KVListModel []KVModel
func (KVListModel) MarshalEasyJSON ¶
func (v KVListModel) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (KVListModel) MarshalJSON ¶
func (v KVListModel) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*KVListModel) UnmarshalEasyJSON ¶
func (v *KVListModel) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*KVListModel) UnmarshalJSON ¶
func (v *KVListModel) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type KVModel ¶
func (KVModel) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (KVModel) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*KVModel) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*KVModel) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
Click to show internal directories.
Click to hide internal directories.