package
2.263.0
Repository: https://github.com/onsdigital/dp-api-clients-go.git
Documentation: pkg.go.dev

# Functions

Get Accept returns the value of the "Accept" request header if it exists, returns ErrHeaderNotFound if the header is not found.
GetCollectionID returns the value of the "Collection-Id" request header if it exists, returns ErrHeaderNotFound if the header is not found.
GetDownloadServiceToken returns the value of the "X-Download-Service-Token" request header if it exists, returns ErrHeaderNotFound if the header is not found.
GetETag returns the value of the "ETag" request header if it exists, returns ErrHeaderNotFound if the header is not found.
GetIfMatch returns the value of the "If-Match" request header if it exists, returns ErrHeaderNotFound if the header is not found.
GetLocaleCode returns the value of the "LocaleCode" request header if it exists, returns ErrHeaderNotFound if the header is not found.
GetRequestID returns the value of the "X-Request-Id" request header if it exists, returns ErrHeaderNotFound if the header is not found.
GetResponseETag returns the value of "ETag" response header if it exists, returns ErrResponseNil if the header is not found.
GetServiceAuthToken returns the value of the "Authorization" request header if it exists, returns ErrHeaderNotFound if the header is not found.
GetUserAuthToken returns the value of the "X-Florence-Token" request header if it exists, returns ErrHeaderNotFound if the header is not found.
GetUserIdentity returns the value of the "User-Identity" request header if it exists, returns ErrHeaderNotFound if the header is not found.
IsErrNotFound return true if the err equal to ErrHeaderNotFound.
IsNotErrNotFound return true if error is not nil and not equal to ErrHeaderNotFound.
SetAccept set the Accept header on the provided request.
No description provided by the author
SetAuthToken set the access token header on the provided request.
SetCollectionID set the collection ID header on the provided request.
SetDownloadServiceToken set the download service auth token header on the provided request.
SetETag set the ETag header on the provided request.
SetIDTokenHeader set the ID token header on the provided request.
SetIfMatch set the If-Match header on the provided request.
SetLocaleCode set the locale code header on the provided request.
SetRefreshTokenHeader set the refresh token header on the provided request.
SetRequestID set the unique request ID header on the provided request.
SetServiceAuthToken set the service authentication token header on the provided request.
SetUserIdentity set the user identity header on the provided request.

# Constants

IfMatchAnyETag is a wildchar value for If-Match header to ask the API to ignore the ETag check.

# Variables

ErrHeaderNotFound returned if the requested header is not present in the provided request.
ErrRequestNil return if SetX header function is called with a nil request.
ErrResponseNil return if GetResponseX header function is called with a nil response.
ErrValueEmpty returned if an empty value is passed when a non-empty value is required.