encryptionapi

package
v0.18.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 19, 2022 License: MIT Imports: 7 Imported by: 0

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

func ClientWithHost(c client.Client, apiHost string) client.Client

ClientWithHost returns HTTP client with api host set.

func IsEncrypted

func IsEncrypted(value string) bool

IsEncrypted returns true if value match format of encrypted value.

func IsKeyToEncrypt

func IsKeyToEncrypt(key string) bool

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) Error

func (e Error) Error() string

func (Error) ErrorExceptionID

func (e Error) ErrorExceptionID() string

ErrorExceptionID returns exception ID to find details in logs.

func (Error) ErrorName

func (e Error) ErrorName() string

ErrorName returns a human-readable name of the error.

func (Error) ErrorUserMessage

func (e Error) ErrorUserMessage() string

ErrorUserMessage returns error message for end user.

func (*Error) SetRequest

func (e *Error) SetRequest(request *http.Request)

SetRequest method allows injection of HTTP request to the error, it implements client.errorWithRequest.

func (*Error) SetResponse

func (e *Error) SetResponse(response *http.Response)

SetResponse method allows injection of HTTP response to the error, it implements client.errorWithResponse.

func (Error) StatusCode

func (e Error) StatusCode() int

StatusCode returns HTTP status code.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL