Documentation
¶
Index ¶
- type DecodeOption
- type KVClient
- type NitricKVClient
- func (d NitricKVClient) DecodeKey(collection string, key string, output interface{}, opts ...DecodeOption) error
- func (d NitricKVClient) DeleteKey(collection string, key string) error
- func (d NitricKVClient) GetKey(collection string, key string) (map[string]interface{}, error)
- func (d NitricKVClient) PutKey(collection string, key string, value map[string]interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DecodeOption ¶
type DecodeOption interface {
Apply(c *mapstructure.DecoderConfig)
}
func WithUnknownKeys ¶
func WithUnknownKeys(allow bool) DecodeOption
type KVClient ¶
type KVClient interface {
GetKey(collection string, key string) (map[string]interface{}, error)
DecodeKey(collection string, key string, output interface{}, opts ...DecodeOption) error
PutKey(collection string, key string, value map[string]interface{}) error
DeleteKey(collection string, key string) error
}
func NewKVClient ¶
func NewKVClient(conn *grpc.ClientConn) KVClient
func NewWithClient ¶
func NewWithClient(client v1.KeyValueClient) KVClient
type NitricKVClient ¶
type NitricKVClient struct {
// contains filtered or unexported fields
}
func (NitricKVClient) DecodeKey ¶
func (d NitricKVClient) DecodeKey(collection string, key string, output interface{}, opts ...DecodeOption) error
DecodeKey - retrieves a value and decodes its contents into the given Go interface{}
internally this method calls GetKey then decodes the map[string]interface{} into the supplied interface{}
this method helps parse the types of value represented by structs.
func (NitricKVClient) DeleteKey ¶
func (d NitricKVClient) DeleteKey(collection string, key string) error
DeleteKey - deletes an existing key from the kv store
Click to show internal directories.
Click to hide internal directories.