Documentation ¶
Index ¶
- func AddRecord(w http.ResponseWriter, r *http.Request) error
- func GetRecord(w http.ResponseWriter, r *http.Request) error
- func NewHTTPError(err error, status int, detail string) error
- func Serve()
- func Serverless(c Client) *mux.Router
- func SetClient() error
- type BoltDB
- type Client
- type ClientError
- type ErrHandler
- type Fauna
- type HTTPError
- type Record
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddRecord ¶
func AddRecord(w http.ResponseWriter, r *http.Request) error
AddRecord is a handler that creates a record
func GetRecord ¶
func GetRecord(w http.ResponseWriter, r *http.Request) error
getRecord is a handler that retrieves a record
func Serverless ¶ added in v0.0.5
Types ¶
type BoltDB ¶
type BoltDB struct {
// contains filtered or unexported fields
}
type ClientError ¶
type ErrHandler ¶
type ErrHandler func(http.ResponseWriter, *http.Request) error
func (ErrHandler) ServeHTTP ¶
func (fn ErrHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type Fauna ¶
type Fauna struct {
// contains filtered or unexported fields
}
func (*Fauna) Delete ¶
Delete deletes a document from a collection in FaunaDB based on the ID from the Record.
type HTTPError ¶
Click to show internal directories.
Click to hide internal directories.