Documentation ¶
Index ¶
Constants ¶
View Source
const (
METHOD_NOT_ALLOWED = "isA should not be invoked, this is to only be used as a default error concept"
)
Variables ¶
View Source
var Addressable addressableErrorConcept
View Source
var CBOR cborErrorConcept
View Source
var Command commandErrorConcept
View Source
var Common commonErrorConcept
View Source
var Database databaseErrorConcept
View Source
var Default defaultErrorConcept
View Source
var Device deviceErrorConcept
View Source
var DeviceProfile deviceProfileErrorConcept
View Source
var DeviceReport deviceReportErrorConcept
View Source
var DeviceService deviceServiceErrorConcept
View Source
var Events eventErrorConcept
View Source
var ProvisionWatcher provisionWatcherErrorConcept
View Source
var ValueDescriptors valueDescriptorsErrorConcept
Functions ¶
func NewDeviceServiceDuplicate ¶
NewDeviceServiceDuplicate instantiates a new deviceServiceDuplicate error concept in effort to handle stateful DeviceService duplicate errors
func NewServiceClientHttpError ¶
func NewServiceClientHttpError(err error) *serviceClientHttpError
NewServiceClientHttpError represents the accessor for the service-client-specific error concepts
Types ¶
type ErrorConceptType ¶
type ErrorConceptType interface {
// contains filtered or unexported methods
}
type ErrorHandler ¶
type ErrorHandler interface { Handle(w http.ResponseWriter, err error, ec ErrorConceptType) HandleManyVariants(w http.ResponseWriter, err error, allowableErrors []ErrorConceptType, defaultError ErrorConceptType) HandleOneVariant(w http.ResponseWriter, err error, allowableError ErrorConceptType, defaultError ErrorConceptType) }
func NewErrorHandler ¶
func NewErrorHandler(l logger.LoggingClient) ErrorHandler
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func (*Handler) Handle ¶
func (e *Handler) Handle(w http.ResponseWriter, err error, ec ErrorConceptType)
Handle applies the specified error and error concept tot he HTTP response writer
func (*Handler) HandleManyVariants ¶
func (e *Handler) HandleManyVariants(w http.ResponseWriter, err error, allowableErrors []ErrorConceptType, defaultError ErrorConceptType)
HandleManyVariants applies general error-handling for the specified set of allowable errors and a default error to be used as a fallback when none of the allowable errors are matched
func (*Handler) HandleOneVariant ¶
func (e *Handler) HandleOneVariant(w http.ResponseWriter, err error, allowableError ErrorConceptType, defaultError ErrorConceptType)
HandleOneVariant applies general error-handling with a single allowable error and a default error to be used as a fallback when none of the allowable errors are matched
Click to show internal directories.
Click to hide internal directories.