Documentation
¶
Index ¶
- Constants
- func AllocateBuffer(length int) []byte
- func AllocateBytesBuffer(bytes []byte) ([]byte, int32)
- func AllocateStringBuffer(str string) ([]byte, int32)
- func AllowTempFileBuffers(flag bool)
- func BufferToBytes(srcPtr unsafe.Pointer) ([]byte, int32)
- func BufferToBytesSafe(src *[]byte) ([]byte, int32)
- func BufferToInt32(srcPtr unsafe.Pointer) (int32, int32)
- func BufferToInt32Safe(src *[]byte) (int32, int32)
- func BufferToInt64(srcPtr unsafe.Pointer) (int64, int32)
- func BufferToInt64Safe(src *[]byte) (int64, int32)
- func BufferToJson(srcPtr unsafe.Pointer) (map[string]interface{}, int32)
- func BufferToJsonSafe(src *[]byte) (map[string]interface{}, int32)
- func BufferToJsonStruct(srcPtr unsafe.Pointer, dst interface{}) int32
- func BufferToJsonStructSafe(src *[]byte, dst interface{}) int32
- func BufferToString(srcPtr unsafe.Pointer) (string, int32)
- func BufferToStringSafe(src *[]byte) (string, int32)
- func BytesToBuffer(bytes []byte, dstPtr unsafe.Pointer) int32
- func BytesToBufferSafe(bytes []byte, dst *[]byte) int32
- func CPtr(buf *[]byte) *C.char
- func CobhanErrorToString(cobhanError int32) string
- func Int32ToBuffer(value int32, dstPtr unsafe.Pointer) int32
- func Int32ToBufferSafe(value int32, dst *[]byte) int32
- func Int64ToBuffer(value int64, dstPtr unsafe.Pointer) int32
- func Int64ToBufferSafe(value int64, dst *[]byte) int32
- func JsonToBuffer(v interface{}, dstPtr unsafe.Pointer) int32
- func JsonToBufferSafe(v interface{}, dst *[]byte) int32
- func Ptr(buf *[]byte) unsafe.Pointer
- func SetDefaultBufferMaximum(max int)
- func StringToBuffer(str string, dstPtr unsafe.Pointer) int32
- func StringToBufferSafe(str string, dst *[]byte) int32
Constants ¶
View Source
const BUFFER_HEADER_SIZE = (64 / 8) // 64 bit buffer header provides 8 byte alignment for data pointers
View Source
const DefaultBufferMaximum = math.MaxInt32
View Source
const ERR_BUFFER_TOO_LARGE = -2
ERR_BUFFER_TOO_LARGE One of the provided buffer lengths is too large
View Source
const ERR_BUFFER_TOO_SMALL = -3
ERR_BUFFER_TOO_SMALL One of the provided buffers was too small
View Source
const ERR_COPY_FAILED = -4
ERR_COPY_FAILED Failed to copy into the buffer (copy length != expected length)
View Source
const ERR_INVALID_UTF8 = -7
ERR_INVALID_UTF8 Buffer contains invalid utf-8
View Source
const ERR_JSON_DECODE_FAILED = -5
ERR_JSON_DECODE_FAILED Failed to decode a JSON buffer
View Source
const ERR_JSON_ENCODE_FAILED = -6
ERR_JSON_ENCODE_FAILED Failed to encode to JSON buffer
View Source
const ERR_NONE = 0
View Source
const ERR_NULL_PTR = -1
ERR_NULL_PTR One of the provided pointers is NULL / nil / 0
View Source
const ERR_READ_TEMP_FILE_FAILED = -8
View Source
const ERR_WRITE_TEMP_FILE_FAILED = -9
Variables ¶
This section is empty.
Functions ¶
func AllocateBuffer ¶
func AllocateBytesBuffer ¶
func AllocateStringBuffer ¶
func AllowTempFileBuffers ¶ added in v0.2.0
func AllowTempFileBuffers(flag bool)
func BufferToBytesSafe ¶
func BufferToInt32Safe ¶
func BufferToInt64Safe ¶
func BufferToJsonSafe ¶
func BufferToJsonStruct ¶
func BufferToJsonStructSafe ¶
func BufferToStringSafe ¶
func BytesToBufferSafe ¶
func CobhanErrorToString ¶ added in v0.4.2
func Int32ToBufferSafe ¶
func Int64ToBufferSafe ¶
func JsonToBuffer ¶
func JsonToBufferSafe ¶
func SetDefaultBufferMaximum ¶
func SetDefaultBufferMaximum(max int)
func StringToBufferSafe ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.