Documentation ¶
Overview ¶
Collection management handlers.
Document management handlers.
Index management handlers.
Miscellaneous function handlers.
Query handlers.
HTTP service API handler registration.
Index ¶
- Constants
- Variables
- func All(w http.ResponseWriter, r *http.Request)
- func ApproxDocCount(w http.ResponseWriter, r *http.Request)
- func Count(w http.ResponseWriter, r *http.Request)
- func Create(w http.ResponseWriter, r *http.Request)
- func Delete(w http.ResponseWriter, r *http.Request)
- func Drop(w http.ResponseWriter, r *http.Request)
- func Dump(w http.ResponseWriter, r *http.Request)
- func Get(w http.ResponseWriter, r *http.Request)
- func GetPage(w http.ResponseWriter, r *http.Request)
- func Index(w http.ResponseWriter, r *http.Request)
- func Indexes(w http.ResponseWriter, r *http.Request)
- func Insert(w http.ResponseWriter, r *http.Request)
- func MemStats(w http.ResponseWriter, r *http.Request)
- func Query(w http.ResponseWriter, r *http.Request)
- func Rename(w http.ResponseWriter, r *http.Request)
- func Require(w http.ResponseWriter, r *http.Request, key string, val *string) bool
- func Scrub(w http.ResponseWriter, r *http.Request)
- func ServeEndpoints()
- func ServeJWTEnabledEndpoints(jwtPubKey, jwtPrivateKey string)
- func Shutdown(w http.ResponseWriter, r *http.Request)
- func Start(dir string, port int, tlsCrt, tlsKey, jwtPubKey, jwtPrivateKey string)
- func Sync(w http.ResponseWriter, r *http.Request)
- func Unindex(w http.ResponseWriter, r *http.Request)
- func Update(w http.ResponseWriter, r *http.Request)
- func Version(w http.ResponseWriter, r *http.Request)
- func Welcome(w http.ResponseWriter, r *http.Request)
Constants ¶
const ( // JWT Record and claim JWT_COL_NAME = "jwt" JWT_USER_ATTR = "user" JWT_PASS_ATTR = "pass" JWT_ENDPOINTS_ATTR = "endpoints" JWT_COLLECTIONS_ATTR = "collections" JWT_USER_ADMIN = "admin" // JWT claim JWT_EXPIRY = "exp" )
Variables ¶
var (
HttpDB *db.DB
)
Functions ¶
func ApproxDocCount ¶
func ApproxDocCount(w http.ResponseWriter, r *http.Request)
Return approximate number of documents in the collection.
func Count ¶
func Count(w http.ResponseWriter, r *http.Request)
Execute a query and return number of documents from the result.
func Dump ¶
func Dump(w http.ResponseWriter, r *http.Request)
Copy this database into destination directory.
func GetPage ¶
func GetPage(w http.ResponseWriter, r *http.Request)
Divide documents into roughly equally sized pages, and return documents in the specified page.
func Insert ¶
func Insert(w http.ResponseWriter, r *http.Request)
Insert a document into collection.
func MemStats ¶
func MemStats(w http.ResponseWriter, r *http.Request)
Return server memory statistics.
func Query ¶
func Query(w http.ResponseWriter, r *http.Request)
Execute a query and return documents from the result.
func Require ¶
Store form parameter value of specified key to *val and return true; if key does not exist, set HTTP status 400 and return false.
func Scrub ¶
func Scrub(w http.ResponseWriter, r *http.Request)
De-fragment collection free space and fix corrupted documents.
func ServeEndpoints ¶
func ServeEndpoints()
func ServeJWTEnabledEndpoints ¶
func ServeJWTEnabledEndpoints(jwtPubKey, jwtPrivateKey string)
func Shutdown ¶
func Shutdown(w http.ResponseWriter, r *http.Request)
Flush and close all data files and shutdown the entire program.
Types ¶
This section is empty.