Documentation ¶
Index ¶
- func Check(err error)
- type Controllersdb
- func (db *Controllersdb) Add(w http.ResponseWriter, req *http.Request)
- func (db *Controllersdb) CloseDB() string
- func (db *Controllersdb) DbExists() bool
- func (db *Controllersdb) Delete(writer http.ResponseWriter, req *http.Request)
- func (db *Controllersdb) Fetch(w http.ResponseWriter, req *http.Request)
- func (db *Controllersdb) OpenDB() (*sql.DB, error)
- type MyStdResp
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Controllersdb ¶
func (*Controllersdb) Add ¶
func (db *Controllersdb) Add(w http.ResponseWriter, req *http.Request)
swagger:route PUT /api/contacts controllers update adds new contacts to a phoneBook responses: 200: updateResponse 401: updateUnauthorized 409: updateConflictError 500: updateInternalError
func (*Controllersdb) CloseDB ¶
func (db *Controllersdb) CloseDB() string
func (*Controllersdb) DbExists ¶
func (db *Controllersdb) DbExists() bool
func (*Controllersdb) Delete ¶
func (db *Controllersdb) Delete(writer http.ResponseWriter, req *http.Request)
swagger:route DELETE /api/contacts controllers delete delete contact from phone book responses: 200: deleteResponse 400: deleteUnauthorized 500: deleteInternalError
func (*Controllersdb) Fetch ¶
func (db *Controllersdb) Fetch(w http.ResponseWriter, req *http.Request)
swagger:route GET /api/contacts controllers fetch returns all phonebook contacts responses: 200: fetchResponse 401: fetchUnauthorized 500: fetchInternalError
Click to show internal directories.
Click to hide internal directories.