# README
backend-go
Go client library for StaticBackend's backend API
# Functions
AddFunction adds a server-side function to an account.
AddUser adds a user into the same account as token.
CacheGet retrieves a cache value.
CacheSet sets a cache value.
ConvertURLToX converts a URL (web page) to either a PDF or a PNG.
Count returns the number of document in a repo matching the optional filters, which are same query filter as Query.
Create adds a new document to a repository and returns the created document.
CreateBulk creates multiple documents, useful when importing data.
Delete sends an HTTP DELETE request to the backend API.
Delete permanently delets a document.
DeleteBulk permanently deletes multiple documents matching filters.
DeleteFile deletes the file from storage and remove from space used for this account.
DeleteFunction removes a function.
DownloadFile retrieves the file content as []byte.
Find returns a slice of matching documents.
FindOne returns one document if it's found.
FunctionInfo gets info on a function, including execution histories.
Get sends an HTTP GET request to the backend API.
GetByID returns a specific document.
GetPasswordResetCode returns a unique code for a user to change their password.
Increase increases or decreases a field in a document based on n signed.
List returns a list of document in a specific repository.
ListForm returns submissions for all or a specific form.
ListFunctions lists all functions for this account.
Login authenticate a user and returns their session token.
Me returns the current user matching this session token This is the only way to get the user's role, account/user ids and email.
NewSystemAccount initiates the StaticBackend account creation process.
No description provided by the author
Post sends an HTTP POST request to the backend API.
Publish sends a message to a channel (topic) where usually a server-side function will process the message.
Put sends an HTTP POST request to the backend API.
QueueWork adds a work queue value that will be dequeue via WorkerQueue.
Register creates a new user and returns their session token.
RemoveUser removes a user from same account as token.
ResetPassword changes user password using a unique code.
ResizeImage upload and resize and image based on the max width allowed.
Search returns the matching document of "repo" based on keywords.
SendMail sends an email.
SetPassword changes the password of a user.
StoreFile uploads a new file and returns its public URL using SB CDN.
SudoAddIndex creates a new database index on a specific field.
SudoCreate adds a new document to a repository and returns the created document.
SudoFind returns a slice of matching documents if a "root token" is provided.
SudoSudoGetByID returns a specific document if a "root token" is provided.
SudoGetToken returns a token from an AccountID This is useful when performing creation that documents needs to be attached to a specific account id and therefor the SudoCreate would not work on those cases.
SudoList returns a list of documents in a specific repository if a "root token" is used.
SudoListRepositories lists all database repositories if a "root token" is provided.
SudoSendSMS sends a text message via the Twilio API.
SudoUpdate perform an update if a "root" token is specified This call cannot be done from JavaScript, only from a backend HTTP call.
Update updates a document.
UpdateBulk updates multiple documents based on filter clauses.
UpdateFunction updates a function.
Users returns all users for the account linked with this token.
WorkerQueue monitors a work queue each 5 seconds.
# Constants
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
local dev region default to http://localhost:8099.
managed hosting region of North-America.
# Variables
No description provided by the author
No description provided by the author
PublicKey is required for all HTTP requests.
PublicKey is required for all HTTP requests.
PublicKey is required for all HTTP requests.
# Structs
AccountParams represents a new StaticBackend account.
ConvertParam used for the ConvertURLToX request.
CurrentUser used to access current user's important information.
EmailData used to request the send email process.
Function represents a server-side function.
ListParams are used to page results and sort.
ListResult is used for list document.
NewSystemAccountData when bypassing Stripe, this struct will be returned when creating a new system account.
QueryItem used to perform query.
RunHistory represents a function execution result.
No description provided by the author
StoreFileResult incluses the file id and url.
# Type aliases
No description provided by the author
WorkerTask is the function type needed for work queue action.