# Functions

APIKeyResponseFromAPIKey creates a new APIKeyResponse from the given API key.
APIKeyResponseWithKeyFromAPIKey creates a new APIKeyResponseWithKey from the given API key.
New returns a new initialised API.
NewCustom returns a new initialised API and allows specifying custom dependencies.
NewMongoWriter creates a MongoWriter and starts a transaction.
StripePrices returns a mapping of Stripe price ids to Skynet tiers.
StripeTestMode tells us whether we're using a test key or a live key.
UserGETFromUser converts a database.User struct to a UserGET struct.

# Constants

CookieName is the name of the cookie where we store the user's JWT token.
DBTxnRetryCount specifies the number of times we should retry an API call in case we run into transaction errors.
LimitBodySizeLarge defines a size limit for requests that we expect to contain a lot of data.
LimitBodySizeSmall defines a size limit for requests that we don't expect to contain a lot of data.
MaxBodyBytes defines the maximum length of a webhook call's request body.

# Variables

#nosec.
DashboardURL is the dashboard address of this portal.
ErrAPIKeyNotAllowed is an error returned when an API key was passed to an endpoint that doesn't allow API key use.
ErrCheckoutDoesNotBelongToUser is returned when the given checkout session does not belong to the current user.
ErrCheckoutWithoutCustomer is the error returned when a checkout session doesn't have an associated customer.
ErrCheckoutWithoutSub is the error returned when a checkout session doesn't have an associated subscription.
ErrInvalidCredentials is a generic user-facing error, used when the login flow fails.
ErrNoAPIKey is an error returned when we expect an API key but we don't find one.
ErrNoToken is returned when we expected a JWT token to be provided but it was not.
ErrSubNotActive is returned when the given subscription is not active, so we cannot do anything based on it.
ErrSubWithoutPrice is returned when the subscription doesn't have a price, so we cannot determine the user's tier based on it.
MyskyAllowlist contains skylinks we need to make available in order for users to be able to use MySky on all portals, including ones that require user authentication.

# Structs

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

# Interfaces

No description provided by the author

# Type aliases

No description provided by the author