Documentation ¶
Index ¶
- func CreateDatabase(w http.ResponseWriter, r *http.Request)
- func CreateQuery(w http.ResponseWriter, r *http.Request)
- func DeleteDatabase(w http.ResponseWriter, r *http.Request)
- func GetData(w http.ResponseWriter, r *http.Request)
- func InsertData(w http.ResponseWriter, r *http.Request)
- func Login(w http.ResponseWriter, r *http.Request)
- func Signin(w http.ResponseWriter, r *http.Request)
- type Claims
- type Credentials
- type Database
- type Insert
- type Query
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateDatabase ¶
func CreateDatabase(w http.ResponseWriter, r *http.Request)
CreateDatabase with the given name
func CreateQuery ¶
func CreateQuery(w http.ResponseWriter, r *http.Request)
CreateQuery compile query and lookup for results on a specified database
func DeleteDatabase ¶
func DeleteDatabase(w http.ResponseWriter, r *http.Request)
DeleteDatabase with the given name
func InsertData ¶
func InsertData(w http.ResponseWriter, r *http.Request)
InsertData into a specified table into a specified database
Types ¶
type Claims ¶
type Claims struct { Username string `json:"username"` jwt.StandardClaims }
Claims struct that will be encoded to a JWT. We add jwt.StandardClaims as an embedded type, to provide fields like expiry time
type Credentials ¶
type Credentials struct {
Username string `json:"username"`
}
Credentials struct to read the username from the request body
type Database ¶
type Database struct {
Name string `json:"name"`
}
Database struct to read database name from the request body
Click to show internal directories.
Click to hide internal directories.