Documentation
¶
Overview ¶
Package encryptionapi contains request definitions for the Encryption API. Requests can be sent by any HTTP client that implements the client.Sender interface. It is necessary to set API host in the HTTP client, see the ClientWithHost function.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClientWithHost ¶
ClientWithHost returns HTTP client with api host set.
func EncryptRequest ¶
func EncryptRequest(projectID int, componentID ComponentID, data map[string]string) client.APIRequest[*map[string]string]
EncryptRequest - https://keboolaencryption.docs.apiary.io/#reference/encrypt/encryption/encrypt-data
func IsEncrypted ¶
IsEncrypted returns true if value match format of encrypted value.
func IsKeyToEncrypt ¶
IsKeyToEncrypt returns true if given key represents an encrypted value.
Types ¶
type ComponentID ¶
type ComponentID = storageapi.ComponentID
ComponentID is id of a Keboola component.
type Error ¶
type Error struct { Message string `json:"error"` ErrCode int `json:"code"` ExceptionID string `json:"exceptionId"` // contains filtered or unexported fields }
Error represents the structure Encryption API error.
func (Error) ErrorExceptionID ¶
ErrorExceptionID returns exception ID to find details in logs.
func (Error) ErrorUserMessage ¶
ErrorUserMessage returns error message for end user.
func (*Error) SetRequest ¶
SetRequest method allows injection of HTTP request to the error, it implements client.errorWithRequest.
func (*Error) SetResponse ¶
SetResponse method allows injection of HTTP response to the error, it implements client.errorWithResponse.