Documentation ¶
Index ¶
- func FindKeyValue(data []byte, key string) (value interface{}, err error)
- func HasErrors(e model.ErrorHandler, data *[]byte) (err error)
- func NewClient(config *configuration.Config, errorHandler model.ErrorHandler, ...) *nerdgraph
- func NewCommonErrorHandler(m model.Model) (eh model.ErrorHandler)
- func NewResultHandler() (h model.ResultHandler)
- type CommonErrorHandler
- type ResultHandler
- func (n ResultHandler) Create(m model.Model, body []byte) (err error)
- func (n ResultHandler) Delete(m model.Model, body []byte) (err error)
- func (n ResultHandler) List(m model.Model, body []byte) (err error)
- func (n ResultHandler) Read(m model.Model, body []byte) (err error)
- func (n ResultHandler) Update(m model.Model, body []byte) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindKeyValue ¶
func HasErrors ¶
func HasErrors(e model.ErrorHandler, data *[]byte) (err error)
HasErrors can't be a method on ErrorHandler due to the way Go handles (or doesn't) dispatch- no v-table :-(
func NewClient ¶
func NewClient(config *configuration.Config, errorHandler model.ErrorHandler, resultHandler model.ResultHandler) *nerdgraph
func NewCommonErrorHandler ¶
func NewCommonErrorHandler(m model.Model) (eh model.ErrorHandler)
func NewResultHandler ¶
func NewResultHandler() (h model.ResultHandler)
Types ¶
type CommonErrorHandler ¶
CommonErrorHandler implements ErrorHandler and provides a common, default, implementation of dealing with errors coming out of API calls.
func (*CommonErrorHandler) GetErrorMap ¶
func (e *CommonErrorHandler) GetErrorMap(v interface{}, result map[string]interface{})
func (*CommonErrorHandler) ServerError ¶
func (e *CommonErrorHandler) ServerError(data *[]byte, s string) (err error)
ServerError is relatively simple, we know its shape
func (*CommonErrorHandler) TypeSpecificError ¶
func (e *CommonErrorHandler) TypeSpecificError(data *[]byte, s string) (err error)
TypeSpecificError is a bit complex, we don't know the shape so we have to travel a map[string]interface{}
type ResultHandler ¶
type ResultHandler struct { }
Click to show internal directories.
Click to hide internal directories.