diff options
author | Jakob Unterwurzacher | 2020-05-09 19:09:09 +0200 |
---|---|---|
committer | Jakob Unterwurzacher | 2020-05-09 19:09:09 +0200 |
commit | 7e51073400df9cdeefb454ebaaca2ce776162364 (patch) | |
tree | 2f69a659200d5bc0405eff102adb037c7cda6db7 /ctlsock/json_abi.go | |
parent | f0184804f4e9f878c560648cc9b773f84d6a2c53 (diff) |
ctlsock: add CtlSock API
Diffstat (limited to 'ctlsock/json_abi.go')
-rw-r--r-- | ctlsock/json_abi.go | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/ctlsock/json_abi.go b/ctlsock/json_abi.go new file mode 100644 index 0000000..7deff08 --- /dev/null +++ b/ctlsock/json_abi.go @@ -0,0 +1,26 @@ +package ctlsock + +// RequestStruct is sent by a client (encoded as JSON). +// You cannot perform both encryption and decryption in the same request. +type RequestStruct struct { + // EncryptPath is the path that should be encrypted. + EncryptPath string + // DecryptPath is the path that should be decrypted. + DecryptPath string +} + +// ResponseStruct is sent by the server in response to a request +// (encoded as JSON). +type ResponseStruct struct { + // Result is the resulting decrypted or encrypted path. Empty on error. + Result string + // ErrNo is the error number as defined in errno.h. + // 0 means success and -1 means that the error number is not known + // (look at ErrText in this case). + ErrNo int32 + // ErrText is a detailed error message. + ErrText string + // WarnText contains warnings that may have been encountered while + // processing the message. + WarnText string +} |