Documentation: Fix placement

This commit is contained in:
kayos@tcp.direct 2022-01-08 22:09:53 -08:00
parent e3420d7dd5
commit 8bb8e0c0cb
4 changed files with 30 additions and 9 deletions

21
LICENSE Normal file
View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2021 kayos (kayos@tcp.direct)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -25,6 +25,11 @@ Filer is is a way to implement any generic key/value store. These functions
should be plug and play with most of the popular key/value store golang
libraries.
NOTE: Many key/value golang libraries will already implement this interface
already. This exists for more potential granular control in the case that they
don't. Otherwise you'd have to build a wrapper around an existing key/value
store to satisfy an overencompassing interface.
#### type Keeper
```go
@ -49,11 +54,6 @@ Keeper will be in charge of the more meta operations involving Filers. This
includes operations like initialization, syncing to disk if applicable, and
backing up.
NOTE: Many key/value golang libraries will already implement this interface
already. This exists for more potential granular control in the case that they
don't. Otherwise you'd have to build a wrapper around an existing key/value
store to satisfy an overencompassing interface.
#### type Key
```go

View File

@ -2,6 +2,10 @@ package database
// Filer is is a way to implement any generic key/value store.
// These functions should be plug and play with most of the popular key/value store golang libraries.
//
// NOTE: Many key/value golang libraries will already implement this interface already.
// This exists for more potential granular control in the case that they don't.
// Otherwise you'd have to build a wrapper around an existing key/value store to satisfy an overencompassing interface.
type Filer interface {
// NOTE: One can easily cast anything to a byte slice. (e.g: []byte("fuckholejones") )
// json.Marshal also returns a byte slice by default ;)

View File

@ -2,10 +2,6 @@ package database
// Keeper will be in charge of the more meta operations involving Filers.
// This includes operations like initialization, syncing to disk if applicable, and backing up.
//
// NOTE: Many key/value golang libraries will already implement this interface already.
// This exists for more potential granular control in the case that they don't.
// Otherwise you'd have to build a wrapper around an existing key/value store to satisfy an overencompassing interface.
type Keeper interface {
// Path should return the base path where all buckets should be stored under. (likely as subdirectories)
Path() string