# Functions
ExtractSkylink extracts the skylink from the given skylink URL that might have protocol, path, etc.
New returns a new DB connection based on the passed parameters.
NewAPIKey creates a random new API key.
NewAPIKeyFromString creates an APIKey struct from a string and validates it.
NewCustomDB returns a new DB connection based on the passed parameters.
ValidSkylink returns true if the given string is a valid skylink.
# Constants
ChallengeSignatureSize is the size of the expected signature.
ChallengeSize defines the number of bytes of entropy to send as a challenge.
ChallengeTypeLogin is the type of the login challenge.
ChallengeTypeRegister is the type of the registration challenge.
ChallengeTypeUpdate is the type of the update challenge which we use when we register a new pubkey for the user.
DownloadUpdateWindow defines a time window during which instead of creating a new download record for the given skylink, we'll update the previous one, as long as it has been updated within the window.
EmailConfirmationTokenTTL defines the lifetime of an email confirmation token.
EmailMaxSendAttempts defines the maximum number of attempts we are going to make at sending a given email before giving up on it.
PubKeySize defines the length of the public key in bytes.
TierAnonymous reserved.
TierFree free.
TierMaxReserved is a guard value that helps us validate tier values.
TierPremium20 20.
TierPremium5 5.
TierPremium80 80.
# Variables
AnonUser is a helper struct that we can use when we don't have a relevant user, e.g.
ConfValFalse represents the falsy value for flag-like configuration options.
ConfValRegistrationsDisabled is the configuration value that disables new registration on the service.
ConfValTrue represents the truthy value for flag-like configuration options.
DefaultPageSize defines the default number of records to return.
ErrGeneralInternalFailure is returned when we do not want to disclose what kind of error occurred.
ErrInvalidAPIKey is an error returned when the given API key is invalid.
ErrInvalidAPIKeyOperation covers a range of invalid operations on API keys.
ErrInvalidChallengeResponse is returned when the received challenge response object is not valid, i.e.
ErrInvalidPublicKey is returned when the provided public key is invalid.
ErrInvalidSkylink is returned when the given string is not a valid skylink.
ErrInvalidToken is returned when the token is found to be invalid for any reason, including expiration.
ErrMaxNumAPIKeysExceeded is returned when a user tries to create a new API key after already having the maximum allowed number.
ErrUnexpectedNumberOfModifications is returned when a modification query, like Update or Replace, modifies an unexpected number of entries, for example as 0 or more than 1 when we expect a single update.
ErrUserAlreadyExists is returned when we try to use a sub to create a user and a user already exists with this identity.
ErrUserNotFound is returned when we can't find the user in question.
MaxNumAPIKeysPerUser sets the limit for number of API keys a single user can create.
PortalName is the name this portal uses to announce itself to the world.
Schema defines a mapping between a collection name and the indexes that must exist for that collection.
UserLimits defines the speed limits for each tier.
# 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
Download describes a single download of a skylink by a user.
DownloadResponse is the representation of a download we send as response to the caller.
No description provided by the author
RegistryRead describes a single registry read by a user.
RegistryWrite describes a single registry write by a user.
Skylink represents a skylink object in the DB.
No description provided by the author
No description provided by the author
Upload ...
UploadResponse is the representation of an upload we send as response to the caller.
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