Documentation ¶
Index ¶
- Variables
- func CreatePostHandler(w http.ResponseWriter, r *http.Request)
- func DeletePost(path, col, id string)
- func DeletePostHandler(w http.ResponseWriter, r *http.Request)
- func Host(h string) *jdb
- func NewJDB(path string, options *Options) (*jdb, error)
- func ReadData(path string) [][]byte
- func ReadPost(path, col, id string) mod.Post
- func ReadPostCollection(path, col string) []mod.Post
- func ReadPostCollectionHandler(w http.ResponseWriter, r *http.Request)
- func ReadPostHandler(w http.ResponseWriter, r *http.Request)
- func UpdatePost(path, col, id string, post mod.Post) error
- func UpdatePostHandler(w http.ResponseWriter, r *http.Request)
- type Logger
- type Options
Constants ¶
This section is empty.
Variables ¶
View Source
var JDB, _ = NewJDB(cfg.Path, nil)
Functions ¶
func CreatePostHandler ¶
func CreatePostHandler(w http.ResponseWriter, r *http.Request)
Create appends post path prefix for a database write
func DeletePostHandler ¶
func DeletePostHandler(w http.ResponseWriter, r *http.Request)
Delete data from the database
func NewJDB ¶
New creates a new scribble database at the desired directory location, and returns a *Driver to then use for interacting with the database
func ReadPostCollection ¶
Read all items from the database, unmarshaling the response.
func ReadPostCollectionHandler ¶
func ReadPostCollectionHandler(w http.ResponseWriter, r *http.Request)
Rresponse Handler.
func ReadPostHandler ¶
func ReadPostHandler(w http.ResponseWriter, r *http.Request)
// Response Handler
func UpdatePost ¶
Update appends post path prefix for a database write
func UpdatePostHandler ¶
func UpdatePostHandler(w http.ResponseWriter, r *http.Request)
Update appends post path prefix for a database write
Types ¶
Click to show internal directories.
Click to hide internal directories.