package
0.0.0-20250226171102-4db14ec44d68
Repository: https://github.com/cozy/cozy-stack.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# Functions

APIManagerClient returns a client to talk to the manager via its API.
AuthModeToString encode authentication mode in a string.
CheckPassphrase confirm an instance password Deprecated: Use [InstanceService.CheckPassphrase] instead.
Delete removes the instance document in CouchDB.
ForeachInstances execute the given callback for each instances.
Get finds an instance from its domain by using CouchDB.
GetStore returns the store for temporary move objects.
No description provided by the author
List returns the list of declared instances.
NewMock instantiates a new [Mock].
No description provided by the author
PaginatedList can be used to list the instances, with pagination.
ParseTOSVersion returns the "major" and the date encoded in a version string with the following format: parseTOSVersion(A.B.C-YYYYMMDD) -> (A, YYYY, true).
StringToAuthMode converts a string encoded authentication mode into a AuthMode int.
Update saves the changes in CouchDB.

# Constants

Basic authentication mode, only passphrase.
DefaultTemplateTitle represents the default template title.
This is the lengths of our tokens (in bytes).
This is the lengths of our tokens (in bytes).
ManagerBaseURL is the kind for building other manager URLs.
ManagerBlockedURL is the kind for a redirection of a blocked instance.
ManagerPremiumURL is the kind for changing the account type of the instance.
ManagerTOSURL is the kind for changes of TOS URL.
This is the lengths of our tokens (in bytes).
This is the lengths of our tokens (in bytes).
PBKDF2_SHA256 is the value of kdf for using PBKDF2 with SHA256 to hash the password on client side.
This is the lengths of our tokens (in bytes).
This is the lengths of our tokens (in bytes).
This is the lengths of our tokens (in bytes).
TOSBlocked when the deadline is reached and the access should be blocked.
TOSNone when no deadline is reached.
TOSWarning when the warning deadline is reached, 2 weeks before the actual activation of the CGU.
TwoFactorMail authentication mode, with passcode sent via email.

# Variables

BlockedImporting is used when importing the data from another instance.
BlockedLoginFailed is used when a security issue has been detected on the instance.
BlockedMoving is used when moving data from another instance.
BlockedPaymentFailed is used when a payment is missing for the instance.
BlockedUnknown is used when an instance is blocked but the reason is unknown.
ErrBadTOSVersion is returned when a malformed TOS version is provided.
ErrDeletionAlreadyRequested is returned when a deletion has already been requested.
ErrExists is used the instance already exists.
ErrIllegalDomain is used when the domain named contains illegal characters.
ErrInvalidPassphrase is returned when the passphrase is invalid.
ErrInvalidSwiftLayout is returned when the Swift layout is unknown.
ErrInvalidToken is returned by RegisterPassphrase if token is invalid.
ErrInvalidTwoFactor is returned when the two-factor authentication verification is invalid.
ErrMissingPassphrase is returned when the new passphrase is missing.
ErrMissingToken is returned by RegisterPassphrase if token is empty.
ErrNotFound is used when the seeked instance was not found.
ErrResetAlreadyRequested is returned when a passphrase reset token is already set and valid.
ErrUnknownAuthMode is returned when an unknown authentication mode is used.

# Structs

No description provided by the author
BlockingReason structs holds a reason why an instance had been blocked.
An Instance has the informations relatives to the logical cozy instance, like the domain, the locale or the access to the databases and files storage It is a couchdb.Doc to be persisted in couchdb.
No description provided by the author
No description provided by the author
Mock implementation of.

# Interfaces

Service handle all the interactions with the "instance" domain.
Store is an object to store and retrieve session codes.

# Type aliases

AuthMode defines the authentication mode chosen for the connection to this instance.
ManagerURLKind is an enum type for the different kinds of manager URLs.
TOSDeadline represent the state for reaching the TOS deadline.