Documentation
¶
Index ¶
- Variables
- func AppIndexName(name string) string
- func CreateVersionsDateView(db *kivik.DB) error
- func CreateVersionsViews(c *Space, db *kivik.DB, appSlug string) error
- func GetSpacesNames() []string
- func InitializeSpaces() error
- func Register(name string) error
- func VersViewDocName(appSlug string) string
- type Space
Constants ¶
This section is empty.
Variables ¶
var AppsIndexes = map[string][]string{
"slug": {"slug", "editor", "type"},
"type": {"type", "slug", "editor"},
"editor": {"editor", "slug", "type"},
"created_at": {"created_at", "slug", "editor", "type"},
"maintenance": {"maintenance_activated"},
}
AppsIndexes is the list of the mango indexes that can be used.
var Spaces map[string]*Space
Spaces is a global map of name -> space.
Functions ¶
func AppIndexName ¶
AppIndexName returns the long name of the index.
func CreateVersionsDateView ¶
func CreateVersionsDateView(db *kivik.DB) error
func CreateVersionsViews ¶
func GetSpacesNames ¶
func GetSpacesNames() []string
GetSpacesNames returns the list of the space names.
func InitializeSpaces ¶
func InitializeSpaces() error
InitializeSpaces can be used to initialize again the spaces (ie check that the databases exist, have their indexes, etc.)
func VersViewDocName ¶
Types ¶
type Space ¶
type Space struct { Name string // contains filtered or unexported fields }
Space is a way to regroup applications that are available to the same cozy instances. For example, it can make sense to have a space for the self-hosted users, with dedicated apps and konnectors.
func (*Space) AppsDB ¶
func (s *Space) AppsDB() *kivik.DB
AppsDB returns the database used for storing the apps in this space.
func (*Space) Clone ¶
Clone takes an optionnal name parameter. If empty, use the original space name.
func (*Space) DBs ¶
func (s *Space) DBs() []*kivik.DB
DBs returns the three databases used by this space.
func (*Space) PendingVersDB ¶
func (s *Space) PendingVersDB() *kivik.DB
PendingVersDB returns the database used for storing the pending versions in this space.