Documentation ¶
Index ¶
Constants ¶
const ( // StoreSlug is the slug of the store application: it can install // konnectors and applications. StoreSlug = "store" // HomeSlug is the slug of the default app, where the user is redirected // after login. HomeSlug = "home" // SettingsSlug is the slog of the settings application. SettingsSlug = "settings" // DriveSlug is the slug of the default app, files, where the user is // redirected after login. DriveSlug = "drive" )
const ( // DirType is the type attribute for directories DirType = "directory" // FileType is the type attribute for files FileType = "file" )
const ( // RootDirID is the root directory identifier RootDirID = "io.cozy.files.root-dir" // TrashDirID is the trash directory identifier TrashDirID = "io.cozy.files.trash-dir" // will put their folders for the shared files SharedWithMeDirID = "io.cozy.files.shared-with-me-dir" // folders removed from a sharing but still used via a reference are put NoLongerSharedDirID = "io.cozy.files.no-longer-shared-dir" )
const ( // ContextSettingsID is the id of the settings JSON-API response for the context ContextSettingsID = "io.cozy.settings.context" // DiskUsageID is the id of the settings JSON-API response for disk-usage DiskUsageID = "io.cozy.settings.disk-usage" // InstanceSettingsID is the id of settings document for the instance InstanceSettingsID = "io.cozy.settings.instance" )
const ( // Apps doc type for client-side application manifests Apps = "io.cozy.apps" // Konnectors doc type for konnector application manifests Konnectors = "io.cozy.konnectors" // Versions doc type for apps versions from the registries Versions = "io.cozy.registry.versions" // KonnectorLogs doc type for konnector last execution logs. KonnectorLogs = "io.cozy.konnectors.logs" // Archives doc type for zip archives with files and directories Archives = "io.cozy.files.archives" // Exports doc type for global exports archives Exports = "io.cozy.exports" // Doctypes doc type for doctype list Doctypes = "io.cozy.doctypes" // Files doc type for type for files and directories Files = "io.cozy.files" // PhotosAlbums doc type for photos albums PhotosAlbums = "io.cozy.photos.albums" // Intents doc type for intents persisted in couchdb Intents = "io.cozy.intents" // Jobs doc type for queued jobs Jobs = "io.cozy.jobs" // JobEvents doc type for real time events sent by jobs JobEvents = "io.cozy.jobs.events" // Notifications doc type for notifications Notifications = "io.cozy.notifications" // OAuthAccessCodes doc type for OAuth2 access codes OAuthAccessCodes = "io.cozy.oauth.access_codes" // OAuthClients doc type for OAuth2 clients OAuthClients = "io.cozy.oauth.clients" // Permissions doc type for permissions identifying a connection Permissions = "io.cozy.permissions" // Contacts doc type for sharing Contacts = "io.cozy.contacts" // RemoteRequests doc type for logging requests to remote websites RemoteRequests = "io.cozy.remote.requests" // Sessions doc type for sessions identifying a connection Sessions = "io.cozy.sessions" // SessionsLogins doc type for sessions identifying a connection SessionsLogins = "io.cozy.sessions.logins" // Settings doc type for settings to customize an instance Settings = "io.cozy.settings" Shared = "io.cozy.shared" // Sharings doc type for document and file sharing Sharings = "io.cozy.sharings" // SharingsAnswer doc type for credentials exchange for sharings SharingsAnswer = "io.cozy.sharings.answer" // SharingsInitialSync doc type for real-time events for initial sync of a // sharing SharingsInitialSync = "io.cozy.sharings.initial-sync" // Triggers doc type for triggers, jobs launchers Triggers = "io.cozy.triggers" // TriggersState doc type for triggers current state, jobs launchers TriggersState = "io.cozy.triggers.state" // Accounts doc type for accounts Accounts = "io.cozy.accounts" // AccountTypes doc type for account types AccountTypes = "io.cozy.account_types" )
const ( AppAudience = "app" // used by client-side apps KonnectorAudience = "konn" // used by konnectors CLIAudience = "cli" // used by command line interface RegistrationTokenAudience = "registration" // OAuth registration tokens AccessTokenAudience = "access" // OAuth access tokens RefreshTokenAudience = "refresh" // OAuth refresh tokens )
This is the list of possible audience values for JWT.
const Configs = "configs"
Configs doc type assets documents configuration
const DefaultLocale = "en"
DefaultLocale is the default locale when creating an instance and for i18n.
const Instances = "instances"
Instances doc type for User's instance document
const MaxItemsPerPageForMango = 1000
MaxItemsPerPageForMango is the maximal value accepted for the limit parameter used for mango pagination
const ShortCodeLen = 12
ShortCodeLen is the number of chars for the shortcode
Variables ¶
var ( DefaultValidityDuration = 24 * time.Hour AppTokenValidityDuration = 24 * time.Hour KonnectorTokenValidityDuration = 30 * time.Minute CLITokenValidityDuration = 30 * time.Minute AccessTokenValidityDuration = 7 * 24 * time.Hour )
TokenValidityDuration is the duration where a token is valid in seconds (1 week)
var KnownFlatDomains = []string{
"cozy.rocks",
"mycozy.cloud",
}
KnownFlatDomains is a list of top-domains that can hosts cozy instances with flat sub-domains.
var SupportedLocales = []string{"en", "fr"}
SupportedLocales is the list of supported locales tags.
Functions ¶
This section is empty.
Types ¶
type AppType ¶
type AppType int
AppType is an enum to represent the type of application: webapp clientside or konnector serverside.
func NewAppType ¶
NewAppType creates a new AppType from a string