Documentation ¶
Overview ¶
Package k2hdkc implements a k2hdkc client.
Index ¶
- Constants
- type AddSubKey
- type AddSubKeyResult
- type Attr
- type CasGet
- type CasGetResult
- type CasIncDec
- func (r *CasIncDec) Decrement(s *Session) (bool, error)
- func (r *CasIncDec) Execute(s *Session) (bool, error)
- func (r *CasIncDec) Increment(s *Session) (bool, error)
- func (r *CasIncDec) Result() *CasIncDecResult
- func (r *CasIncDec) SetEncPass(s string)
- func (r *CasIncDec) SetExpire(t int64)
- func (r *CasIncDec) String() string
- type CasIncDecResult
- type CasInit
- type CasInitResult
- type CasSet
- type CasSetResult
- type CasType
- type ClearSubKeys
- type ClearSubKeysResult
- type Client
- func (c *Client) Close()
- func (c *Client) CreateSession() (*Session, error)
- func (c *Client) Get(k string) (*GetResult, error)
- func (c *Client) GetSubKeys(k string) (*GetSubKeysResult, error)
- func (c *Client) Send(cmd Command) (Command, error)
- func (c *Client) Set(k string, v string) (*SetResult, error)
- func (c *Client) SetAutoRejoin(b bool) *Client
- func (c *Client) SetAutoRejoinRetry(b bool) *Client
- func (c *Client) SetChmpxFile(f string) *Client
- func (c *Client) SetCleanup(b bool) *Client
- func (c *Client) SetCtlPort(p uint16) *Client
- func (c *Client) SetCuk(u string) *Client
- func (c *Client) SetLibLogSeverity(p logSeverity) *Client
- func (c *Client) SetLogFile(f string) *Client
- func (c *Client) SetLogSeverity(p logSeverity) *Client
- func (c *Client) SetLogger(l *K2hLog) *Client
- func (c *Client) SetSubKeys(k string, skeys []string) (*SetSubKeysResult, error)
- func (c *Client) String() string
- type Command
- type Get
- type GetAttrs
- type GetAttrsResult
- type GetResult
- type GetSubKeys
- type GetSubKeysResult
- type K2hLog
- func (l *K2hLog) BundleLibLog(b bool)
- func (l *K2hLog) Close()
- func (l *K2hLog) Dump(msg string)
- func (l *K2hLog) Dumpf(format string, v ...interface{})
- func (l *K2hLog) Error(msg string)
- func (l *K2hLog) Errorf(format string, v ...interface{})
- func (l *K2hLog) Info(msg string)
- func (l *K2hLog) Infof(format string, v ...interface{})
- func (l *K2hLog) SetChmpxLog(b bool)
- func (l *K2hLog) SetComlog(b bool)
- func (l *K2hLog) SetK2hashLog(b bool)
- func (l *K2hLog) SetK2hdkcLog(b bool)
- func (l *K2hLog) SetLibLogSeverity(p logSeverity)
- func (l *K2hLog) SetLogFile(f string)
- func (l *K2hLog) SetLogSeverity(p logSeverity)
- func (l *K2hLog) SetOutput(w io.Writer)
- func (l *K2hLog) String() string
- func (l *K2hLog) Warn(msg string)
- func (l *K2hLog) Warnf(format string, v ...interface{})
- type QueuePop
- type QueuePopResult
- type QueuePush
- func (r *QueuePush) Execute(s *Session) (bool, error)
- func (r *QueuePush) Result() *QueuePushResult
- func (r *QueuePush) SetAttr(b bool)
- func (r *QueuePush) SetEncPass(s string)
- func (r *QueuePush) SetExpire(t int64)
- func (r *QueuePush) SetKey(k interface{}) (bool, error)
- func (r *QueuePush) String() string
- func (r *QueuePush) UseFifo(b bool)
- type QueuePushResult
- type QueueRemove
- type QueueRemoveResult
- type Remove
- type RemoveResult
- type RemoveSubKey
- type RemoveSubKeyResult
- type Rename
- type RenameResult
- type Result
- type Session
- type Set
- type SetAll
- type SetAllResult
- type SetResult
- type SetSubKeys
- type SetSubKeysResult
Constants ¶
const ( SeveritySilent logSeverity = 1 << iota SeverityError SeverityWarning SeverityInfo SeverityDump )
SeveritySilent means this library logs nothing. SeverityError means this library logs only error message. SeverityWarning means this library logs warning and error message. SeverityInfo means this library logs normal, warning and error message. SeverityDump means this library logs all message.
const ( LibSeveritySilent logSeverity = 1 << iota LibComlog LibK2hdkc LibChmpx LibK2hash )
LibSeveritySilent means dependent libs logs nothing. LibComlog means dependent libraries logs only communication message. LibK2hdkc means k2hdkc library logs in the current severity level. LibChmpx means chmpx and k2hdkc libraries logs only communication message. Libk2hash means k2hash, chmpx and k2hdkc libraries logs only communication message.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddSubKey ¶
type AddSubKey struct {
// contains filtered or unexported fields
}
AddSubKey holds C.k2hdkc_pm_set_subkey_wa arguments and a *AddSubKeyResult.
func NewAddSubKey ¶
NewAddSubKey returns a new AddSubKey.
func (*AddSubKey) Execute ¶
Execute calls the C.k2hdkc_pm_set_subkey_wa function that adds subkey to the k2hdkc cluster.
func (*AddSubKey) Result ¶
func (r *AddSubKey) Result() *AddSubKeyResult
Result returns the pointer of AddSubKeyResult that has the result of Execute method. nil returns if no result exists.
type AddSubKeyResult ¶
type AddSubKeyResult struct {
// contains filtered or unexported fields
}
AddSubKeyResult holds the result of AddSubKey.Execute().
func (*AddSubKeyResult) Bool ¶
func (r *AddSubKeyResult) Bool() bool
Bool returns the result whether C.k2hdkc_pm_set_subkey_wa is success.
func (*AddSubKeyResult) Error ¶
func (r *AddSubKeyResult) Error() string
Error returns the errno of C.k2hdkc_pm_set_subkey_wa in string format.
func (*AddSubKeyResult) String ¶
func (r *AddSubKeyResult) String() string
String returns a text representation of the object.
type Attr ¶
type Attr struct {
// contains filtered or unexported fields
}
Attr holds attribute names and values.
type CasGet ¶
type CasGet struct {
// contains filtered or unexported fields
}
CasGet holds arguments for C.k2hdkc_pm_cas{8,16,32,64}_get and a pointer of CasGetResult. bool k2hdkc_pm_cas64_get_wa(k2hdkc_chmpx_h handle, const unsigned char* pkey, size_t keylength, const char* encpass, uint64_t* pval)
func NewCasGetWithCasType ¶
NewCasGetWithCasType returns a new CasGet.
func (*CasGet) Result ¶
func (r *CasGet) Result() *CasGetResult
Result returns the pointer of CasGetResult that has the result of Execute method.
func (*CasGet) SetValueLen ¶
SetValueLen sets the vlen member.
type CasGetResult ¶
type CasGetResult struct {
// contains filtered or unexported fields
}
CasGetResult holds the result of CasGet.Execute().
func (*CasGetResult) Bool ¶
func (r *CasGetResult) Bool() bool
Bool returns true if C.k2hdkc_pm_cas{8,16,32,64}_get_wa has been successfully called.
func (*CasGetResult) Bytes ¶
func (r *CasGetResult) Bytes() []byte
Bytes returns the C.k2hdkc_pm_cas{8,16,32,64}_get_wa response in binary format.
func (*CasGetResult) Error ¶
func (r *CasGetResult) Error() string
Error returns the errno of C.k2hdkc_pm_cas{8,16,32,64}_get_wa in string format.
func (*CasGetResult) String ¶
func (r *CasGetResult) String() string
String returns a text representation of the object.
type CasIncDec ¶
type CasIncDec struct {
// contains filtered or unexported fields
}
CasIncDec holds arguments for C.k2hdkc_pm_cas{8,16,32,64}_{in,de}crement and a pointer of CasIncDecResult.
func NewCasIncDec ¶
NewCasIncDec returns a new CasIncDec.
func (*CasIncDec) Result ¶
func (r *CasIncDec) Result() *CasIncDecResult
Result returns the pointer of CasIncDecResult that has the result of Execute method.
func (*CasIncDec) SetEncPass ¶
SetEncPass sets the pass member.
type CasIncDecResult ¶
type CasIncDecResult struct {
// contains filtered or unexported fields
}
CasIncDecResult holds the result of CasIncDec.Execute().
func (*CasIncDecResult) Bool ¶
func (r *CasIncDecResult) Bool() bool
Bool returns true if C.k2hdkc_pm_cas_{in,de}crement_wa has been successfully called.
func (*CasIncDecResult) Error ¶
func (r *CasIncDecResult) Error() string
Error returns the errno of C.k2hdkc_pm_cas_{in,de}crement_wa in string format.
func (*CasIncDecResult) String ¶
func (r *CasIncDecResult) String() string
String returns a text representation of the object.
type CasInit ¶
type CasInit struct {
// contains filtered or unexported fields
}
CasInit holds arguments for C.k2hdkc_pm_cas{8,16,32,64}_init and a pointer of CasInitResult.
func NewCasInit ¶
NewCasInit returns a new CasInit.
func NewCasInitWithValue ¶
NewCasInitWithValue returns a new CasInit
func (*CasInit) Execute ¶
Execute calls the C.k2hdkc_pm_cas{8,16,32,64}_init_wa function that initialize the key in the k2hdkc cluster.
func (*CasInit) Result ¶
func (r *CasInit) Result() *CasInitResult
Result returns the pointer of CasInitResult that has the result of Execute method.
func (*CasInit) SetEncPass ¶
SetEncPass sets the pass member.
type CasInitResult ¶
type CasInitResult struct {
// contains filtered or unexported fields
}
CasInitResult holds the result of CasInit.Execute().
func (*CasInitResult) Bool ¶
func (r *CasInitResult) Bool() bool
Bool returns true if C.k2hdkc_pm_cas{8,16,32,64}_init_wa has been successfully called.
func (*CasInitResult) Error ¶
func (r *CasInitResult) Error() string
Error returns the errno of C.k2hdkc_pm_cas{8,16,32,64}_init_wa in string format.
func (*CasInitResult) String ¶
func (r *CasInitResult) String() string
String returns a text representation of the object.
type CasSet ¶
type CasSet struct {
// contains filtered or unexported fields
}
CasSet holds arguments for C.k2hdkc_pm_cas{8,16,32,64}_set and a pointer of CasSetResult. bool k2hdkc_pm_cas64_set_wa(k2hdkc_chmpx_h handle, const unsigned char* pkey, size_t keylength, uint64_t oldval, uint64_t newval, const char* encpass, const time_t* expire)
func (*CasSet) Execute ¶
Execute calls the C.k2hdkc_pm_cas{8,16,32,64}_set_wa function that swap the key in the k2hdkc cluster.
func (*CasSet) Result ¶
func (r *CasSet) Result() *CasSetResult
Result returns the pointer of CasSetResult that has the result of Execute method.
type CasSetResult ¶
type CasSetResult struct {
// contains filtered or unexported fields
}
CasSetResult holds the result of CasSet.Execute().
func (*CasSetResult) Bool ¶
func (r *CasSetResult) Bool() bool
Bool returns true if C.k2hdkc_pm_cas{8,16,32,64}_set_wa has been successfully called.
func (*CasSetResult) Error ¶
func (r *CasSetResult) Error() string
Error returns the errno of C.k2hdkc_pm_cas{8,16,32,64}_set_wa in string format.
func (*CasSetResult) String ¶
func (r *CasSetResult) String() string
String returns a text representation of the object.
type ClearSubKeys ¶
type ClearSubKeys struct {
// contains filtered or unexported fields
}
ClearSubKeys holds arguments for C.k2hdkc_pm_set_subkeys and a pointer of ClearSubKeys.
func NewClearSubKeys ¶
func NewClearSubKeys(k interface{}) (*ClearSubKeys, error)
NewClearSubKeys return a new ClearSubKeys.
func (*ClearSubKeys) Execute ¶
func (r *ClearSubKeys) Execute(s *Session) (bool, error)
Execute calls the C.k2hdkc_pm_set_subkeys function that clear the subkey to the k2hdkc cluster.
func (*ClearSubKeys) Result ¶
func (r *ClearSubKeys) Result() *ClearSubKeysResult
Result returns the pointer of ClearSubKeysResult that has the result of Execute method.
func (*ClearSubKeys) String ¶
func (r *ClearSubKeys) String() string
String returns a text representation of the object.
type ClearSubKeysResult ¶
type ClearSubKeysResult struct {
// contains filtered or unexported fields
}
ClearSubKeysResult holds the result of ClearSubKeys.Execute().
func (*ClearSubKeysResult) Bool ¶
func (r *ClearSubKeysResult) Bool() bool
Bool returns true if C.k2hdkc_pm_set_subkeys has been successfully called.
func (*ClearSubKeysResult) Error ¶
func (r *ClearSubKeysResult) Error() string
Error returns the errno of C.k2hdkc_pm_set_subkeys in string format.
func (*ClearSubKeysResult) String ¶
func (r *ClearSubKeysResult) String() string
String returns a text representation of the object.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client holds settings to connect a chmpx slave server. Client is responsible for logging messages to a log file. Client is not responsible for managing request handlers with a k2hdkc cluster.
func (*Client) Close ¶
func (c *Client) Close()
Close calls the K2hLogger.Close(). NOTICE You must call Close() to avoid leaking file descriptor.
func (*Client) CreateSession ¶
CreateSession returns the pointer to a session with chmpx which handler is open..
func (*Client) GetSubKeys ¶
func (c *Client) GetSubKeys(k string) (*GetSubKeysResult, error)
GetSubKeys returns a pointer of GetSubKeysResult.
func (*Client) SetAutoRejoin ¶
SetAutoRejoin sets a rejoin member flag.
func (*Client) SetAutoRejoinRetry ¶
SetAutoRejoinRetry sets a rejoinRetry member flag.
func (*Client) SetChmpxFile ¶
SetChmpxFile sets a chmpx file.
func (*Client) SetCleanup ¶
SetCleanup sets a cleanup member flag.
func (*Client) SetCtlPort ¶
SetCtlPort sets a control port.
func (*Client) SetLibLogSeverity ¶
SetLibLogSeverity changes the log serverity of libraries.
func (*Client) SetLogFile ¶
SetLogFile changes the logger output file.
func (*Client) SetLogSeverity ¶
SetLogSeverity changes the log serverity of k2hdkc_go and it's libraries.
func (*Client) SetSubKeys ¶
func (c *Client) SetSubKeys(k string, skeys []string) (*SetSubKeysResult, error)
SetSubKeys returns a pointer of SetSubKeysResult.
type Get ¶
type Get struct {
// contains filtered or unexported fields
}
Get holds arguments for C.k2hdkc_pm_get_value_wp and a pointer of GetResult.
func (*Get) Execute ¶
Execute calls the C.k2hdkc_pm_get_value_wp function which is the lowest C API.
type GetAttrs ¶
type GetAttrs struct {
// contains filtered or unexported fields
}
GetAttrs holds arguments for C.k2hdkc_pm_get_attrs and a pointer of GetAttrsResult.
func NewGetAttrs ¶
NewGetAttrs returns a new GetAttrs.
func (*GetAttrs) Execute ¶
Execute calls the C.k2hdkc_pm_get_attrs function that get key attributes from the k2hdkc cluster.
func (*GetAttrs) Result ¶
func (r *GetAttrs) Result() *GetAttrsResult
Result returns the pointer of GetAttrs that has the result of Execute method.
type GetAttrsResult ¶
type GetAttrsResult struct {
// contains filtered or unexported fields
}
GetAttrsResult holds the result of GetAttrs.Execute().
func (*GetAttrsResult) Bool ¶
func (r *GetAttrsResult) Bool() bool
Bool returns true if C.k2hdkc_pm_get_attrs has been successfully called.
func (*GetAttrsResult) Bytes ¶
func (r *GetAttrsResult) Bytes() []*Attr
Bytes returns the C.k2hdkc_pm_get_attrs response in binary format.
func (*GetAttrsResult) Error ¶
func (r *GetAttrsResult) Error() string
Error returns the errno of C.k2hdkc_pm_get_attrs in string format.
func (*GetAttrsResult) String ¶
func (r *GetAttrsResult) String() map[string]string
String returns the C.k2hdkc_pm_get_attrs response in string format.
type GetResult ¶
type GetResult struct {
// contains filtered or unexported fields
}
GetResult holds the result of Get.Execute().
func (*GetResult) Bool ¶
Bool returns true if C.k2hdkc_pm_get_value_wp has been successfully called.
type GetSubKeys ¶
type GetSubKeys struct {
// contains filtered or unexported fields
}
GetSubKeys holds arguments for C.k2hdkc_pm_get_subkeys and a pointer of GetSubKeysResult.
func NewGetSubKeys ¶
func NewGetSubKeys(k interface{}) (*GetSubKeys, error)
NewGetSubKeys returns a new GetSubKeys.
func (*GetSubKeys) Execute ¶
func (r *GetSubKeys) Execute(s *Session) (bool, error)
Execute calls the C.k2hdkc_pm_get_subkeys function that gets subkey to the k2hdkc cluster.
func (*GetSubKeys) Result ¶
func (r *GetSubKeys) Result() *GetSubKeysResult
Result returns the pointer of GetSubKeysResult that has the result of Execute method.
func (*GetSubKeys) String ¶
func (r *GetSubKeys) String() string
String returns a text representation of the object.
type GetSubKeysResult ¶
type GetSubKeysResult struct {
// contains filtered or unexported fields
}
GetSubKeysResult holds the result of GetSubKeys.Execute().
func (*GetSubKeysResult) Bool ¶
func (r *GetSubKeysResult) Bool() bool
Bool returns true if C.k2hdkc_pm_get_subkeys() has been successfully called.
func (*GetSubKeysResult) Bytes ¶
func (r *GetSubKeysResult) Bytes() [][]byte
Bytes returns the C.k2hdkc_pm_get_subkeys() response in binary format.
func (*GetSubKeysResult) Error ¶
func (r *GetSubKeysResult) Error() string
Error returns the errno of C.k2hdkc_pm_get_subkeys() in string format.
func (*GetSubKeysResult) String ¶
func (r *GetSubKeysResult) String() []string
String returns the C.k2hdkc_pm_get_subkeys() response in string format.
type K2hLog ¶
type K2hLog struct {
// contains filtered or unexported fields
}
K2hLog holds pointer to log.Logger and logging configurations.
func (*K2hLog) BundleLibLog ¶
BundleLibLog sets the log file for dependent libraries.
func (*K2hLog) Close ¶
func (l *K2hLog) Close()
Close closes the file descriptor. NOTICE You must call Close() to avoid leaking file descriptor.
func (*K2hLog) SetChmpxLog ¶
SetChmpxLog sets the serverity of chmpx library logger.
func (*K2hLog) SetK2hashLog ¶
SetK2hashLog sets the serverity of k2hash library logger.
func (*K2hLog) SetK2hdkcLog ¶
SetK2hdkcLog sets the serverity of k2hdkc library logger.
func (*K2hLog) SetLibLogSeverity ¶
func (l *K2hLog) SetLibLogSeverity(p logSeverity)
SetLibLogSeverity enables logging of the dependent libraries.
func (*K2hLog) SetLogFile ¶
SetLogFile sets the file to be logged.
func (*K2hLog) SetLogSeverity ¶
func (l *K2hLog) SetLogSeverity(p logSeverity)
SetLogSeverity sets the severity member.
type QueuePop ¶
type QueuePop struct {
// contains filtered or unexported fields
}
QueuePop holds arguments for C.k2hdkc_pm_q_pop_wa and C.k2hdkc_pm_keyq_pop_wa. It also holds a pointer of QueuePopResult.
func NewQueuePop ¶
NewQueuePop returns a QueuePop which can pop a value.
func NewQueuePopWithKeyQueue ¶
NewQueuePopWithKeyQueue returns a QueuePop which can specify a key to pop a value.
func (*QueuePop) Execute ¶
Execute calls the C.k2hdkc_pm_q_pop_wp and C.k2hdkc_pm_keyq_pop_wp function that pops from the k2hdkc cluster.
func (*QueuePop) Result ¶
func (r *QueuePop) Result() *QueuePopResult
Result returns the pointer of QueuePopResult that has the result of Execute method.
func (*QueuePop) SetEncPass ¶
SetEncPass sets the pass member.
func (*QueuePop) UseKeyQueue ¶
UseKeyQueue sets the useKq member.
type QueuePopResult ¶
type QueuePopResult struct {
// contains filtered or unexported fields
}
QueuePopResult holds the result of QueuePop.Execute().
func (*QueuePopResult) Bool ¶
func (r *QueuePopResult) Bool() bool
Bool returns true if C.k2hdkc_pm_q_pop_wp and C.k2hdkc_pm_keyq_pop_wp has been successfully called.
func (*QueuePopResult) Error ¶
func (r *QueuePopResult) Error() string
Error returns the errno of C.k2hdkc_pm_q_pop_wp and C.k2hdkc_pm_keyq_pop_wp in string format.
func (*QueuePopResult) KeyBytes ¶
func (r *QueuePopResult) KeyBytes() []byte
KeyBytes returns the key data in C.k2hdkc_pm_q_pop_wp and C.k2hdkc_pm_keyq_pop_wp response in binary format.
func (*QueuePopResult) KeyString ¶
func (r *QueuePopResult) KeyString() string
KeyString returns the key data in C.k2hdkc_pm_q_pop_wp and C.k2hdkc_pm_keyq_pop_wp response in text format.
func (*QueuePopResult) String ¶
func (r *QueuePopResult) String() string
String returns a text representation of the object.
func (*QueuePopResult) ValBytes ¶
func (r *QueuePopResult) ValBytes() []byte
ValBytes returns the value data in C.k2hdkc_pm_q_pop_wp and C.k2hdkc_pm_keyq_pop_wp response in string format.
func (*QueuePopResult) ValString ¶
func (r *QueuePopResult) ValString() string
ValString returns the value data in C.k2hdkc_pm_q_pop_wp and C.k2hdkc_pm_keyq_pop_wp response in text format.
type QueuePush ¶
type QueuePush struct {
// contains filtered or unexported fields
}
QueuePush holds arguments for C.k2hdkc_pm_q_push_wa and C.k2hdkc_pm_keyq_push_wa. It also holds a pointer of QueuePushResult.
func NewQueuePush ¶
NewQueuePush returns a new QueuePush which can push a value to a queue.
func NewQueuePushWithKey ¶
NewQueuePushWithKey returns a new QueuePush which can use a key to push a value.
func (*QueuePush) Execute ¶
Execute calls the C.k2hdkc_pm_q_push_wa or C.k2hdkc_pm_keyq_push_wa function that push data to a queue.
func (*QueuePush) Result ¶
func (r *QueuePush) Result() *QueuePushResult
Result returns the pointer of QueuePushResult that has the result of Execute method.
func (*QueuePush) SetEncPass ¶
SetEncPass sets the pass member.
type QueuePushResult ¶
type QueuePushResult struct {
// contains filtered or unexported fields
}
QueuePushResult holds the result of QueuePush.Execute().
func (*QueuePushResult) Bool ¶
func (r *QueuePushResult) Bool() bool
Bool returns true if C.k2hdkc_pm_keyq_push_wa and C.k2hdkc_pm_q_push_wa has been successfully called.
func (*QueuePushResult) Error ¶
func (r *QueuePushResult) Error() string
Error returns the errno of C.k2hdkc_pm_keyq_push_wa and C.k2hdkc_pm_q_push_wa in string format.
func (*QueuePushResult) String ¶
func (r *QueuePushResult) String() string
String returns a text representation of the object.
type QueueRemove ¶
type QueueRemove struct {
// contains filtered or unexported fields
}
QueueRemove holds arguments for C.k2hdkc_pm_q_remove_wa and C.k2hdkc_pm_keyq_remove_wa. It also holds a pointer of QueueRemoveResult.
func NewQueueRemove ¶
func NewQueueRemove(p interface{}, cnt int64) (*QueueRemove, error)
NewQueueRemove returns a new QueueRemove.
func NewQueueRemoveWithKeyQueue ¶
func NewQueueRemoveWithKeyQueue(p interface{}, cnt int64, kq bool) (cmd *QueueRemove, err error)
NewQueueRemoveWithKeyQueue returns a new QueueRemove using key queue.
func (*QueueRemove) Execute ¶
func (r *QueueRemove) Execute(s *Session) (bool, error)
Execute calls the C.k2hdkc_pm_q_remove_wp and C.k2hdkc_pm_keyq_remove_wp function that remove data in the queue.
func (*QueueRemove) Result ¶
func (r *QueueRemove) Result() *QueueRemoveResult
Result returns the pointer of QueueRemoveResult that has the result of Execute method.
func (*QueueRemove) SetEncPass ¶
func (r *QueueRemove) SetEncPass(s string)
SetEncPass sets the pass member.
func (*QueueRemove) String ¶
func (r *QueueRemove) String() string
String returns a text representation of the object.
func (*QueueRemove) UseKeyQueue ¶
func (r *QueueRemove) UseKeyQueue(b bool)
UseKeyQueue sets the userKq member.
type QueueRemoveResult ¶
type QueueRemoveResult struct {
// contains filtered or unexported fields
}
QueueRemoveResult holds the result of QueueRemove.Execute().
func (*QueueRemoveResult) Bool ¶
func (r *QueueRemoveResult) Bool() bool
Bool returns true if C.k2hdkc_pm_q_remove_wp and C.k2hdkc_pm_keyq_remove_wp has been successfully called.
func (*QueueRemoveResult) Error ¶
func (r *QueueRemoveResult) Error() string
Error returns the errno of C.k2hdkc_pm_q_remove_wp and C.k2hdkc_pm_keyq_remove_wp in string format.
func (*QueueRemoveResult) String ¶
func (r *QueueRemoveResult) String() string
String returns a text representation of the object.
type Remove ¶
type Remove struct {
// contains filtered or unexported fields
}
Remove holds arguments for C.k2hdkc_pm_remove and a pointer of RemoveResult.
func (*Remove) Result ¶
func (r *Remove) Result() *RemoveResult
Result returns the pointer of RemoveResult that has the result of Execute method.
type RemoveResult ¶
type RemoveResult struct {
// contains filtered or unexported fields
}
RemoveResult holds the result of RemoveResult.Execute().
func (*RemoveResult) Bool ¶
func (r *RemoveResult) Bool() bool
Bool returns true if C.k2hdkc_pm_remove has been successfully called.
func (*RemoveResult) Error ¶
func (r *RemoveResult) Error() string
Error returns the errno of C.k2hdkc_pm_remove in string format.
func (*RemoveResult) String ¶
func (r *RemoveResult) String() string
String returns a text representation of the object.
type RemoveSubKey ¶
type RemoveSubKey struct {
// contains filtered or unexported fields
}
RemoveSubKey holds arguments C.k2hdkc_pm_remove_subkey for and a pointer of RemoveSubKeyResult.
func NewRemoveSubKey ¶
func NewRemoveSubKey(k interface{}, sk interface{}) (*RemoveSubKey, error)
NewRemoveSubKey returns a new RemoveSubKey.
func (*RemoveSubKey) Execute ¶
func (r *RemoveSubKey) Execute(s *Session) (bool, error)
Execute calls C.k2hdkc_pm_remove_subkey that remove a subkey.
func (*RemoveSubKey) Result ¶
func (r *RemoveSubKey) Result() *RemoveSubKeyResult
Result returns the pointer of RemoveSubKeyResult that has the result of Execute method.
func (*RemoveSubKey) String ¶
func (r *RemoveSubKey) String() string
String returns a text representation of the object.
type RemoveSubKeyResult ¶
type RemoveSubKeyResult struct {
// contains filtered or unexported fields
}
RemoveSubKeyResult holds the result of RemoveSubKey.Execute().
func (*RemoveSubKeyResult) Bool ¶
func (r *RemoveSubKeyResult) Bool() bool
Bool returns true if C.k2hdkc_pm_remove_subkey has been successfully called.
func (*RemoveSubKeyResult) Error ¶
func (r *RemoveSubKeyResult) Error() string
Error returns the errno of C.k2hdkc_pm_remove_subkey() in string format.
func (*RemoveSubKeyResult) String ¶
func (r *RemoveSubKeyResult) String() string
String returns a text representation of the object.
type Rename ¶
type Rename struct {
// contains filtered or unexported fields
}
Rename holds arguments for C.k2hdkc_pm_rename_with_parent_wa and a pointer of RenameResult.
func (*Rename) Result ¶
func (r *Rename) Result() *RenameResult
Result returns the pointer of RenameResult that has the result of Execute method.
func (*Rename) SetParentKey ¶
SetParentKey sets the parentKey member.
type RenameResult ¶
type RenameResult struct {
// contains filtered or unexported fields
}
RenameResult holds the result of Rename.Execute().
func (*RenameResult) Bool ¶
func (r *RenameResult) Bool() bool
Bool returns true if C.k2hdkc_pm_rename_with_parent_wa has been successfully called.
func (*RenameResult) Error ¶
func (r *RenameResult) Error() string
Error returns the errno of C.k2hdkc_pm_rename_with_parent_wa in string format.
func (*RenameResult) String ¶
func (r *RenameResult) String() string
String returns a text representation of the object.
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
Session keeps configurations and is responsible for creating request handlers with a k2hdkc cluster and closing them.
func NewSession ¶
NewSession returns a new chmpx session with a k2hdkc cluster.
type Set ¶
type Set struct {
// contains filtered or unexported fields
}
Set holds arguments for C.k2hdkc_pm_set_value_wa and a pointer of SetResult.
func (*Set) Execute ¶
Execute calls the C.k2hdkc_pm_set_value_wa function that adds subkey to the k2hdkc cluster.
func (*Set) SetRmSubKeyList ¶
SetRmSubKeyList sets the rmSubKeyList member.
type SetAll ¶
type SetAll struct {
// contains filtered or unexported fields
}
SetAll holds arguments for C.k2hdkc_pm_set_all_wa and a pointer of SetAllResult.
func (*SetAll) Result ¶
func (r *SetAll) Result() *SetAllResult
Result returns the pointer of SetAllResult that has the result of Execute method.
type SetAllResult ¶
type SetAllResult struct {
// contains filtered or unexported fields
}
SetAllResult holds the result of SetAll.Execute().
func (*SetAllResult) Bool ¶
func (r *SetAllResult) Bool() bool
Bool returns true if C.k2hdkc_pm_set_all_wa has been successfully called.
func (*SetAllResult) Error ¶
func (r *SetAllResult) Error() string
Error returns the errno of C.k2hdkc_pm_set_all_wa in string format.
func (*SetAllResult) String ¶
func (r *SetAllResult) String() string
String returns a text representation of the object.
type SetResult ¶
type SetResult struct {
// contains filtered or unexported fields
}
SetResult holds the result of Set.Execute().
func (*SetResult) Bool ¶
Bool returns true if C.k2hdkc_pm_set_value_wa has been successfully called.
type SetSubKeys ¶
type SetSubKeys struct {
// contains filtered or unexported fields
}
SetSubKeys holds arguments for C.k2hdkc_pm_set_subkeys and a pointer of SetSubKeysResult.
func NewSetSubKeys ¶
func NewSetSubKeys(k interface{}, sk interface{}) (*SetSubKeys, error)
NewSetSubKeys returns a new SetSubKeys.
func (*SetSubKeys) Execute ¶
func (r *SetSubKeys) Execute(s *Session) (bool, error)
Execute calls C.k2hdkc_pm_set_subkeys that set a subkey.
func (*SetSubKeys) Result ¶
func (r *SetSubKeys) Result() *SetSubKeysResult
Result returns the result of Execute method.
func (*SetSubKeys) String ¶
func (r *SetSubKeys) String() string
String returns a text representation of the object.
type SetSubKeysResult ¶
type SetSubKeysResult struct {
// contains filtered or unexported fields
}
SetSubKeysResult holds the result of SetSubKeys.Execute().
func (*SetSubKeysResult) Bool ¶
func (r *SetSubKeysResult) Bool() bool
Bool returns whether C.k2hdkc_pm_set_subkeys returned success or not.
func (*SetSubKeysResult) Error ¶
func (r *SetSubKeysResult) Error() string
Error returns the errno of C.k2hdkc_pm_set_subkeys() in string format.
func (*SetSubKeysResult) String ¶
func (r *SetSubKeysResult) String() string
String returns a text representation of the object.