diff options
author | Homu <homu@barosl.com> | 2016-01-17 23:44:27 +0900 |
---|---|---|
committer | Homu <homu@barosl.com> | 2016-01-17 23:44:27 +0900 |
commit | 469bdd1d94439ba53883f11331d313f147b92f71 (patch) | |
tree | dc083223358690485b8bff73c8dbe023f19af9d1 /doc | |
parent | 1e337480d2ad26a96842d6e273869229488e4c19 (diff) | |
parent | 2f99f5561ac8b93844fb78b52b4aa5eaccb915eb (diff) |
Auto merge of #99 - TheNeikos:add-libstore, r=matthiasbeyer
Add libimagstore
Alright, do check the file and feel free to post comments/ask questions
Diffstat (limited to 'doc')
-rw-r--r-- | doc/src/04000-lib-store.md | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/doc/src/04000-lib-store.md b/doc/src/04000-lib-store.md index 628fafe0..502044ac 100644 --- a/doc/src/04000-lib-store.md +++ b/doc/src/04000-lib-store.md @@ -4,3 +4,67 @@ Store functionality --> +The "libstore" MUST define the programming-language level interface to the +store on the file system. +The library therefor MUST define and export types which can be used to get data +from the filesystem. + +## Types {#sec:libstore:types} + +The types in @tbl:libstore:types are exported by the library. + +| Type | Meaning | +| :------------ | :----------------------------------------------- | +| Entry | Entity on the Filesystem, File | +| EntryContent | User-Content of the Entry | +| EntryHeader | Header of the Entry | +| Store | Store interface | +| FileLockEntry | Handle to an Entry | + +Table: Types the store library exports {#tbl:libstore:types} + +Each of these types MUST export functions to work with the data the objects of +the types contain. + +### Entry {#sec:libstore:types:entry} + +The `Entry` type MUST hold the following content: + +- A path where on the filesystem the acutal file lives +- An instance of `EntryContent` as interface to the content of the file + (@sec:libstore:types:entrycontent). +- An instance of `EntryHeader` as interface to the header of the file + (@sec:libstore:types:entryheader). + +The entry type MUST export functions to get + +- The content object +- The header object +- The path of the actual file + +The entry type MUST export functions to set + +- The header object +- The content object + +### EntryContent {#sec:libstore:types:entrycontent} + +The `EntryContent` type is an type-alias for `String`. + +### EntryHeader {#sec:libstore:types:entryheader} + +The `EntryHeader` type is an wrapper around the type, the TOML-Parser library +exports. + +It SHOULD contain utility functions to work with the header in a convenient way. + +### Store {#sec:libstore:types:store} + +The `Store` type MUST represent the interface to the store on the filesystem. +It MUST contain CRUD-functionality to work with the entries in the store. +It MUST contain a variable which contains the path of the store on the +filesystem which is represented by an object of this type. +It also MUST contain a getter for this variable. +It MUST NOT contain a setter for this variable, as changing the store while the +programm is running is not allowed. + |