# README
cloudfunctions-go-utils
utilities in golang to use un the cloud functions
# Functions
AddEntityToFirestore - adds any entity to the firestore collection with retries.
No description provided by the author
DeleteEntityFromFirestore - delets any entity from the firestore collection with retries.
EditEntityInFirestore - edits any entity in the firestore collection with retries.
FirebaseDocumentIteratorWithRetry - gets firestore iterator with retries.
GetEntityFromFirestore - gets any entity from the firestore collection with retries getting only one by one.
GetFirestoreClient Get a new Firestore Client.
No description provided by the author
GetIEAccessToken - return Imprint Engine access token from DB or regenerates it by API.
GetImprintEngineMNGraphQLClient - returns GraphQL client.
No description provided by the author
GetSecret returns a string and error for a secret using Google's Secret Manager It gets the latest version of the secret.
GetSecretRaw returns a bytes array and error for a secret using Google's Secret Manager It gets the latest version of the secret.
GetShippingSecretDataModel - returns Shipping secret data model by ID from DB.
No description provided by the author
LogWrite function to be called for all logs to be able to parse logs in the right format user ID is optional since may be unavailable at some points, ex: parsing request.
LogWriteDebug - function used for logging some extra data needed for debugging it works only in "DEBUG" env variable was set to true in deploy instruction.
No description provided by the author
No description provided by the author
No description provided by the author
WriteHTTPError allows you to create an error http with json as a response, and "message" as the map key.
# Constants
message which Firestore returns connection issue error.
connection error message which Firestore returns.
# Variables
ErrorCodeExternalAPI - external API ErrorCode.
ErrorCodeFirebase - Firebase API ErrorCode.
ErrorCodeInternal - internal API ErrorCode.
No description provided by the author
each time new collection is added to firestore - add it to this list.
LogTypeError1 - error log level with higher priority (than LogTypeError2).
LogTypeError2 - error log level with lower priority (than LogTypeError1).
LogTypeInfo - informational log level.
No description provided by the author
No description provided by the author
# Structs
FCShippingSecretData - database model for saving shipping secret and key for each fulfilment center.
IEWarehouseMN - response model for getBluebirdAppID function.
LogEntryPayload - used as a data model for Log Entry payload.
Logger - the main model LoggerInvoker - the name of the log invoker.
No description provided by the author