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

# Packages

# Functions

AccessContextFromContext return AccessContext from ctx or new generated.
CheckReadWrite check that n == expectedN and err != nil.
ClientSessionFromContext return saved ClientSession from context or nil.
ColumnInfoFromContext return ColumnInfo and true if was assigned, otherwise empty ColumnInfo and false.
EncodedValueContext save encoded value in the context.
GetEncodedValueFromContext returns encoded value and true if it was saved, otherwise returns nil, false.
IsDecryptedFromContext return true if data was decrypted related to context.
IsErrorConvertedDataTypeFromContext return true if data was decrypted related to context.
MarkDecryptedContext save flag in context that data was decrypted.
MarkErrorConvertedDataTypeContext save flag in context that was error during data type conversion.
MarkNotDecryptedContext save flag in context that data wasn't decrypted.
NewAccessContext create new AccessContext and apply all options.
NewArrayClientIDObservableManager create new ArrayClientIDObservableManager.
NewChainProcessorWrapper return wrapped processor.
NewClientProxyError construct ProxyError object with Client interrupt side.
NewColumnDecryptionObserver makes a new observer.
NewColumnInfo return ColumnInfo implementation for metadata.
NewDataProcessorContext return context with initialized static data.
NewDBProxyError construct ProxyError object with DB interrupt side.
NewEncodingError returns new EncodingError with specified column.
NewProxySetting return new ProxySetting implementation with data from params.
NewTLSConnectionWrapper return wrapper over network.ConnectionWrapper to implement TLSConnectionWrapper interface.
OnlyDefaultEncryptorSettings returns true if config contains settings only for transparent decryption that works by default.
RegisterAcraStructProcessingMetrics register in default prometheus registry metrics related with AcraStruct decryption.
RegisterDbProcessingMetrics register in default prometheus registry metrics related with processing db requests/responses.
RegisterEncryptionDecryptionProcessingMetrics register in default prometheus registry metrics related with AcraBlock/AcraStruct decryption/encryption.
RegisterTokenizationProcessingMetrics register in default prometheus registry metrics related with tokenization/detokenization.
SetAccessContextToContext save accessContext to ctx.
SetClientSessionToContext return context with saved ClientSession.
WithClientID set clientID to AccessContext.

# Constants

AcraCensorBlockedThisQuery is an error message, that is sent to the user in case of query blockage.
Supported values of BoundValueFormat.
Labels and values about db type in processing.
Labels and values about db type in processing.
Labels and values about db type in processing.
LabelStatus base constants for prometheus metrics.
LabelStatus base constants for prometheus metrics.
LabelStatus base constants for prometheus metrics.
LabelStatus base constants for prometheus metrics.
LabelStatus base constants for prometheus metrics.
LabelStatus base constants for prometheus metrics.
LabelStatus base constants for prometheus metrics.
LabelStatus base constants for prometheus metrics.
LabelStatus base constants for prometheus metrics.
OldContainerDetectionOn is a stub for CLI/buildFlags configuration for containers detection.
Supported values of BoundValueFormat.

# Variables

AcraDecryptionCounter collect decryptions count success/failed for type acrablock/acrastruct.
AcraDetokenizationCounter collect tokenizations count success/failed for token_type.
AcraEncryptionCounter collect encryptions count success/failed for type acrablock/acrastruct.
AcrastructDecryptionCounter collect decryptions count success/failed.
AcraTokenizationCounter collect tokenizations count success/failed for token_type.
APIEncryptionCounter collect encryptions count success/failed.
RequestProcessingTimeHistogram collect metrics about request processing time.
ResponseProcessingTimeHistogram collect metrics about response processing time.

# Structs

AccessContext store attributes which may be used for access policies and data manipulations.
ArrayClientIDObservableManager store all subscribed observes and call sequentially OnQuery on each observer.
ChainProcessorWrapper chain of processors which store all processors and call all of them until one return decrypted data.
ColumnDecryptionObserver is a simple ColumnDecryptionNotifier implementation.
DataProcessorContext store data for DataProcessor.
DecryptProcessor default implementation of DataProcessor with AcraStruct decryption.
EncodingError is returned from encoding handlers when some failure occurs.
ProxyError custom error type for handling all related errors on Client/DB proxies.

# Interfaces

BoundValue is a value provided for prepared statement execution.
Callback represents function to call on detecting poison record.
ClientIDObservable used to subscribe for clientID changes.
ClientIDObservableManager used to subscribe for clientID changes and notify about changes.
ClientIDObserver used to notify subscribers about changed ClientID in encryption/decryption context.
ClientSession is a connection between the client and the database, mediated by AcraServer.
ColumnDecryptionNotifier interface to subscribe/unsubscribe on OnColumn events.
ColumnInfo interface describe available metadata for column.
DataProcessor for data from database with AcraStructs.
DecryptionSubscriber interface to subscribe on column's data in db responses.
EncodingValue represents a (possibly parsed and prepared) value that is ready to be encoded.
EncodingValueFactory represents a factory that produces ready for encoding value.
ExtendedDataProcessor extended with MatchDataSignature method to filter incoming data and skip extra processing.
PoisonRecordCallbackStorage stores all callbacks, on Call iterates and calls each callbacks until error or end of iterating.
ProcessorWrapper interface for wrappers of DataProcessor.
Proxy interface to process client's requests to database and responses.
ProxyFactory create new Proxy for specific database.
ProxySetting provide data access methods for proxy factories.
TLSConnectionWrapper used by proxy to wrap raw connections to TLS when intercepts client/database request about switching to TLS Reuse network.ConnectionWrapper to explicitly force TLS usage by name.

# Type aliases

AccessContextOption function used to configure AccessContext struct.
BoundValueFormat specifies how to interpret the bound data.
ProcessorFunc cast function to cast function as DataProcessor.