package
0.0.0-20240917120716-8843776e9f3a
Repository: https://github.com/cossacklabs/acra.git
Documentation: pkg.go.dev

# Packages

# Functions

BytesToString converts data to string with re-using same allocated memory Warning: data shouldn't be changed after that because it will cause runtime error due to strings are immutable Only for read/iterate operations See https://groups.google.com/forum/#!msg/Golang-Nuts/ENgbUzYvCuU/90yGx7GUAgAJ .
DecodeEscaped with hex or octal encodings.
DecodeOctal escaped string See https://www.postgresql.org/docs/current/static/datatype-binary.html#AEN5667.
EncodeToOctal escape string See https://www.postgresql.org/docs/current/static/datatype-binary.html#AEN5667.
FileExists returns true if file exists from path, path can be relative.
GetConfigPathByName returns filepath to config file named "name" from default configs folder.
GetParsedVersion return version as Version struct.
IsPrintableEscapeChar returns true if character is ASCII printable (code between 32 and 126).
IsPrintablePostgresqlString returns true if it's valid utf8 string.
LoadPrivateKey returns contents as PrivateKey from keyfile.
LoadPublicKey returns contents as PublicKey from keyfile.
Min returns minimum integer out of two.
ParseVersion and return as struct.
PgEncodeToHex encode binary data to hex SQL literal.
QuoteValue returns name in quotes, if name contains quotes, doubles them.
ReadData reads length of data block, then reads data content returns data content.
ReadDataLength return read data from reader, parsed data length or err.
ReadFile returns contents of file.
SendData writes length of data block to connection, then writes data itself.
WaitWithTimeout waits for the waitgroup for the specified max timeout.
WriteFull writes data to io.Writer.
ZeroizeBytes wipes a byte slice from memory, filling it with zeros.
ZeroizeKeyPair wipes a private key of a key pair from memory, filling it with zero bytes.
ZeroizePrivateKey wipes a private key from memory, filling it with zero bytes.
ZeroizePrivateKeys wipes a slice of private keys from memory, filling them with zero bytes.
ZeroizeSymmetricKey wipes a symmetric key from memory, filling it with zero bytes.
ZeroizeSymmetricKeys wipes a symmetric keys from memory, filling it with zero bytes.

# Constants

Set of types of product edition.
DefaultWaitGroupTimeoutDuration specifies how long should we wait for background goroutines finishing while ReaderServer shutdown.
Set of types of product edition.
0.
1.
Available constant values for ComparisonStatus.
-1.
Flags used for CompareOnly to mark parts to check.
Flags used for CompareOnly to mark parts to check.
NotFound indicated not found symbol.
Flags used for CompareOnly to mark parts to check.

# Variables

Edition type of product.
ErrDecodeOctalString on incorrect decoding with DecodeOctal.
ErrInvalidVersionFormat error for incorrectly formatted version value.
VERSION is current Acra suite version store it as string instead initialized struct value to easy change/grep/sed/replace value via scripts or with -ldflags "-X github.com/cossacklabs/acra/utils.VERSION=X.X.X".

# Structs

EscapeEncoder for Postgres.
HexEncoder for hex.
MysqlEncoder encodes MySQL packets.
PqEncoder wrap array with pq.Array.
Version store version info.

# Interfaces

BinaryEncoder encodes binary to string.

# Type aliases

CompareFlag flags what parts of version to compare.
ComparisonStatus result of comparison versions.
ProductEdition type for edition values.