github.com/cozy/cozy-stack@v0.0.0-20240603063001-31110fa4cae1/pkg/consts/consts.go (about) 1 // Package consts is only for declaring some constants used by the stack, like 2 // some slugs, IDs, doctypes, etc. 3 package consts 4 5 const ( 6 // StoreSlug is the slug of the store application: it can install 7 // konnectors and applications. 8 StoreSlug = "store" 9 // HomeSlug is the slug of the default app, where the user is redirected 10 // after login. 11 HomeSlug = "home" 12 // SettingsSlug is the slug of the settings application. 13 SettingsSlug = "settings" 14 // DriveSlug is the slug of the drive app, where the user can be sent if 15 // the disk quota alert is raised. 16 DriveSlug = "drive" 17 // NotesSlug is the slug of notes app, which is used by the stack for 18 // referencing a directory that contains the notes with collaborative 19 // edition. 20 NotesSlug = "notes" 21 // PassSlug is the slug of cozy-pass webapp, which is used by the stack for 22 // linking the bitwarden OAuth clients. 23 PassSlug = "passwords" 24 ) 25 26 const ( 27 // BitwardenSettingsID is the id of the settings document for bitwarden 28 BitwardenSettingsID = "io.cozy.settings.bitwarden" 29 // ContextSettingsID is the id of the settings JSON-API response for the context 30 ContextSettingsID = "io.cozy.settings.context" 31 // ClientsUsageID is the id of the settings JSON-API response for clients-usage 32 ClientsUsageID = "io.cozy.settings.clients-usage" 33 // DiskUsageID is the id of the settings JSON-API response for disk-usage 34 DiskUsageID = "io.cozy.settings.disk-usage" 35 // InstanceSettingsID is the id of settings document for the instance 36 InstanceSettingsID = "io.cozy.settings.instance" 37 // CapabilitiesSettingsID is the id of the settings document with the 38 // capabilities for a given instance 39 CapabilitiesSettingsID = "io.cozy.settings.capabilities" 40 // ExternalTiesID is the id of the settings document with the external ties 41 // for a given instance 42 ExternalTiesID = "io.cozy.settings.external-ties" 43 // PassphraseParametersID is the id of settings document for the passphrase 44 // parameters used to hash the master password on client side. 45 PassphraseParametersID = "io.cozy.settings.passphrase" 46 // FlagsSettingsID is the id of settings document with the feature flags. 47 FlagsSettingsID = "io.cozy.settings.flags" 48 // InstanceFlagsSettingsID is the id of the settings documents with the 49 // feature flags specific to this instance. 50 InstanceFlagsSettingsID = "io.cozy.settings.flags.instance" 51 // ManagerFlagsSettingsID is the id of the settings documents with the 52 // feature flags coming from the manager (via the feature sets). 53 ManagerFlagsSettingsID = "io.cozy.settings.flags.manager" 54 // ConfigFlagsSettingsID is the id of the settings documents with the 55 // feature flags defined in the contexts section of the configuration file. 56 ConfigFlagsSettingsID = "io.cozy.settings.flags.config" 57 // ContextFlagsSettingsID is the id of the settings documents with the 58 // feature flags defined with a ratio on the contexts. 59 ContextFlagsSettingsID = "io.cozy.settings.flags.context" 60 // DefaultFlagsSettingsID is the id of the settings documents with the 61 // default feature flags. 62 DefaultFlagsSettingsID = "io.cozy.settings.flags.default" 63 ) 64 65 const ( 66 // BitwardenCozyOrganizationName is the name of the organization used to 67 // share passwords between Cozy and Bitwarden clients. 68 BitwardenCozyOrganizationName = "Cozy" 69 // BitwardenCozyCollectionName is the name of the collection used to 70 // share passwords between Cozy and Bitwarden clients. 71 BitwardenCozyCollectionName = "Cozy Connectors" 72 73 // BitwardenProtocol is the name of the bitwarden protocol 74 BitwardenProtocol = "Bitwarden" 75 // BitwardenCipherRelationship is the name of the account-cipher relationship 76 BitwardenCipherRelationship = "vaultCipher" 77 ) 78 79 // MaxItemsPerPageForMango is the maximal value accepted for the limit 80 // parameter used for mango pagination 81 const MaxItemsPerPageForMango = 1000 82 83 // ShortCodeLen is the number of chars for the shortcode 84 const ShortCodeLen = 12 85 86 // TinyCodeLen is the number of digits for the tinycode 87 const TinyCodeLen = 6 88 89 // KnownFlatDomains is a list of top-domains that can hosts cozy instances with 90 // flat sub-domains. 91 var KnownFlatDomains = []string{ 92 "mycozy.cloud", 93 "cozy.rocks", 94 } 95 96 // DefaultLocale is the default locale when creating an instance and for i18n. 97 const DefaultLocale = "en" 98 99 // SupportedLocales is the list of supported locales tags. 100 var SupportedLocales = []string{"en", "fr"} 101 102 // PlatformApps is the list of applications that can be updated automatically 103 // even if their permissions have changed. 104 var PlatformApps = []string{ 105 "banks", 106 "contacts", 107 "drive", 108 "home", 109 "notes", 110 "passwords", 111 "photos", 112 "settings", 113 "store", 114 "coachco2", 115 "mespapiers", 116 }