Documentation ¶
Index ¶
- Variables
- func GetByStatusCode(statusCode int) func(string) error
- func GetWrapByStatusCode(statusCode int) func(error) error
- func NewErrAccepted(message string) error
- func NewErrAlreadyReported(message string) error
- func NewErrBadGateway(message string) error
- func NewErrBadRequest(message string) error
- func NewErrConflict(message string) error
- func NewErrContinue(message string) error
- func NewErrCreated(message string) error
- func NewErrEarlyHints(message string) error
- func NewErrExpectationFailed(message string) error
- func NewErrFailedDependency(message string) error
- func NewErrForbidden(message string) error
- func NewErrFound(message string) error
- func NewErrGatewayTimeout(message string) error
- func NewErrGone(message string) error
- func NewErrHTTPVersionNotSupported(message string) error
- func NewErrIMUsed(message string) error
- func NewErrInsufficientStorage(message string) error
- func NewErrInternalServerError(message string) error
- func NewErrLengthRequired(message string) error
- func NewErrLocked(message string) error
- func NewErrLoopDetected(message string) error
- func NewErrMethodNotAllowed(message string) error
- func NewErrMisdirectedRequest(message string) error
- func NewErrMovedPermanently(message string) error
- func NewErrMultiStatus(message string) error
- func NewErrMultipleChoices(message string) error
- func NewErrNetworkAuthenticationRequired(message string) error
- func NewErrNoContent(message string) error
- func NewErrNonAuthoritativeInfo(message string) error
- func NewErrNotAcceptable(message string) error
- func NewErrNotExtended(message string) error
- func NewErrNotFound(message string) error
- func NewErrNotImplemented(message string) error
- func NewErrNotModified(message string) error
- func NewErrPartialContent(message string) error
- func NewErrPaymentRequired(message string) error
- func NewErrPermanentRedirect(message string) error
- func NewErrPreconditionFailed(message string) error
- func NewErrPreconditionRequired(message string) error
- func NewErrProcessing(message string) error
- func NewErrProxyAuthRequired(message string) error
- func NewErrRequestEntityTooLarge(message string) error
- func NewErrRequestHeaderFieldsTooLarge(message string) error
- func NewErrRequestTimeout(message string) error
- func NewErrRequestURITooLong(message string) error
- func NewErrRequestedRangeNotSatisfiable(message string) error
- func NewErrResetContent(message string) error
- func NewErrSeeOther(message string) error
- func NewErrServiceUnavailable(message string) error
- func NewErrSwitchingProtocols(message string) error
- func NewErrTeapot(message string) error
- func NewErrTemporaryRedirect(message string) error
- func NewErrTooEarly(message string) error
- func NewErrTooManyRequests(message string) error
- func NewErrUnauthorized(message string) error
- func NewErrUnavailableForLegalReasons(message string) error
- func NewErrUnprocessableEntity(message string) error
- func NewErrUnsupportedMediaType(message string) error
- func NewErrUpgradeRequired(message string) error
- func NewErrUseProxy(message string) error
- func NewErrVariantAlsoNegotiates(message string) error
- func WrapErrAccepted(err error) error
- func WrapErrAlreadyReported(err error) error
- func WrapErrBadGateway(err error) error
- func WrapErrBadRequest(err error) error
- func WrapErrConflict(err error) error
- func WrapErrContinue(err error) error
- func WrapErrCreated(err error) error
- func WrapErrEarlyHints(err error) error
- func WrapErrExpectationFailed(err error) error
- func WrapErrFailedDependency(err error) error
- func WrapErrForbidden(err error) error
- func WrapErrFound(err error) error
- func WrapErrGatewayTimeout(err error) error
- func WrapErrGone(err error) error
- func WrapErrHTTPVersionNotSupported(err error) error
- func WrapErrIMUsed(err error) error
- func WrapErrInsufficientStorage(err error) error
- func WrapErrInternalServerError(err error) error
- func WrapErrLengthRequired(err error) error
- func WrapErrLocked(err error) error
- func WrapErrLoopDetected(err error) error
- func WrapErrMethodNotAllowed(err error) error
- func WrapErrMisdirectedRequest(err error) error
- func WrapErrMovedPermanently(err error) error
- func WrapErrMultiStatus(err error) error
- func WrapErrMultipleChoices(err error) error
- func WrapErrNetworkAuthenticationRequired(err error) error
- func WrapErrNoContent(err error) error
- func WrapErrNonAuthoritativeInfo(err error) error
- func WrapErrNotAcceptable(err error) error
- func WrapErrNotExtended(err error) error
- func WrapErrNotFound(err error) error
- func WrapErrNotImplemented(err error) error
- func WrapErrNotModified(err error) error
- func WrapErrPartialContent(err error) error
- func WrapErrPaymentRequired(err error) error
- func WrapErrPermanentRedirect(err error) error
- func WrapErrPreconditionFailed(err error) error
- func WrapErrPreconditionRequired(err error) error
- func WrapErrProcessing(err error) error
- func WrapErrProxyAuthRequired(err error) error
- func WrapErrRequestEntityTooLarge(err error) error
- func WrapErrRequestHeaderFieldsTooLarge(err error) error
- func WrapErrRequestTimeout(err error) error
- func WrapErrRequestURITooLong(err error) error
- func WrapErrRequestedRangeNotSatisfiable(err error) error
- func WrapErrResetContent(err error) error
- func WrapErrSeeOther(err error) error
- func WrapErrServiceUnavailable(err error) error
- func WrapErrSwitchingProtocols(err error) error
- func WrapErrTeapot(err error) error
- func WrapErrTemporaryRedirect(err error) error
- func WrapErrTooEarly(err error) error
- func WrapErrTooManyRequests(err error) error
- func WrapErrUnauthorized(err error) error
- func WrapErrUnavailableForLegalReasons(err error) error
- func WrapErrUnprocessableEntity(err error) error
- func WrapErrUnsupportedMediaType(err error) error
- func WrapErrUpgradeRequired(err error) error
- func WrapErrUseProxy(err error) error
- func WrapErrVariantAlsoNegotiates(err error) error
- type AbstractEvent
- func (ae *AbstractEvent) GetBody() []byte
- func (ae *AbstractEvent) GetBodyObject() interface{}
- func (ae *AbstractEvent) GetContentType() string
- func (ae *AbstractEvent) GetField(key string) interface{}
- func (ae *AbstractEvent) GetFieldByteSlice(key string) []byte
- func (ae *AbstractEvent) GetFieldInt(key string) (int, error)
- func (ae *AbstractEvent) GetFieldString(key string) string
- func (ae *AbstractEvent) GetFields() map[string]interface{}
- func (ae *AbstractEvent) GetHeader(key string) interface{}
- func (ae *AbstractEvent) GetHeaderByteSlice(key string) []byte
- func (ae *AbstractEvent) GetHeaderInt(key string) (int, error)
- func (ae *AbstractEvent) GetHeaderString(key string) string
- func (ae *AbstractEvent) GetHeaders() map[string]interface{}
- func (ae *AbstractEvent) GetID() ID
- func (ae *AbstractEvent) GetLastInBatch() bool
- func (ae *AbstractEvent) GetMethod() string
- func (ae *AbstractEvent) GetOffset() int
- func (ae *AbstractEvent) GetPath() string
- func (ae *AbstractEvent) GetShardID() int
- func (ae *AbstractEvent) GetTimestamp() time.Time
- func (ae *AbstractEvent) GetTopic() string
- func (ae *AbstractEvent) GetTotalNumShards() int
- func (ae *AbstractEvent) GetTriggerInfo() TriggerInfoProvider
- func (ae *AbstractEvent) GetType() string
- func (ae *AbstractEvent) GetTypeVersion() string
- func (ae *AbstractEvent) GetURL() string
- func (ae *AbstractEvent) GetVersion() string
- func (ae *AbstractEvent) SetID(id ID)
- func (ae *AbstractEvent) SetTriggerInfoProvider(triggerInfoProvider TriggerInfoProvider)
- type Context
- type DataBinding
- type ErrorWithStatusCode
- type Event
- type ID
- type MemoryEvent
- type Platform
- type Response
- type TriggerInfoProvider
- type WithStatusCode
Constants ¶
This section is empty.
Variables ¶
var ErrAccepted = ErrorWithStatusCode{/* contains filtered or unexported fields */}
ErrAccepted is a StatusAccepted Error
var ErrAlreadyReported = ErrorWithStatusCode{/* contains filtered or unexported fields */}
ErrAlreadyReported is a StatusAlreadyReported Error
var ErrBadGateway = ErrorWithStatusCode{/* contains filtered or unexported fields */}
ErrBadGateway is a StatusBadGateway Error
var ErrBadRequest = ErrorWithStatusCode{/* contains filtered or unexported fields */}
ErrBadRequest is a StatusBadRequest Error
var ErrConflict = ErrorWithStatusCode{/* contains filtered or unexported fields */}
ErrConflict is a StatusConflict Error
var ErrContinue = ErrorWithStatusCode{/* contains filtered or unexported fields */}
ErrContinue is a StatusContinue Error
var ErrCreated = ErrorWithStatusCode{/* contains filtered or unexported fields */}
ErrCreated is a StatusCreated Error
var ErrEarlyHints = ErrorWithStatusCode{/* contains filtered or unexported fields */}
ErrEarlyHints is a StatusEarlyHints Error
var ErrExpectationFailed = ErrorWithStatusCode{/* contains filtered or unexported fields */}
ErrExpectationFailed is a StatusExpectationFailed Error
var ErrFailedDependency = ErrorWithStatusCode{/* contains filtered or unexported fields */}
ErrFailedDependency is a StatusFailedDependency Error
var ErrForbidden = ErrorWithStatusCode{/* contains filtered or unexported fields */}
ErrForbidden is a StatusForbidden Error
var ErrFound = ErrorWithStatusCode{/* contains filtered or unexported fields */}
ErrFound is a StatusFound Error
var ErrGatewayTimeout = ErrorWithStatusCode{/* contains filtered or unexported fields */}
ErrGatewayTimeout is a StatusGatewayTimeout Error
var ErrGone = ErrorWithStatusCode{/* contains filtered or unexported fields */}
ErrGone is a StatusGone Error
var ErrHTTPVersionNotSupported = ErrorWithStatusCode{/* contains filtered or unexported fields */}
ErrHTTPVersionNotSupported is a StatusHTTPVersionNotSupported Error
var ErrIMUsed = ErrorWithStatusCode{/* contains filtered or unexported fields */}
ErrIMUsed is a StatusIMUsed Error
var ErrInsufficientStorage = ErrorWithStatusCode{/* contains filtered or unexported fields */}
ErrInsufficientStorage is a StatusInsufficientStorage Error
var ErrInternalServerError = ErrorWithStatusCode{/* contains filtered or unexported fields */}
ErrInternalServerError is a StatusInternalServerError Error
var ErrLengthRequired = ErrorWithStatusCode{/* contains filtered or unexported fields */}
ErrLengthRequired is a StatusLengthRequired Error
var ErrLocked = ErrorWithStatusCode{/* contains filtered or unexported fields */}
ErrLocked is a StatusLocked Error
var ErrLoopDetected = ErrorWithStatusCode{/* contains filtered or unexported fields */}
ErrLoopDetected is a StatusLoopDetected Error
var ErrMethodNotAllowed = ErrorWithStatusCode{/* contains filtered or unexported fields */}
ErrMethodNotAllowed is a StatusMethodNotAllowed Error
var ErrMisdirectedRequest = ErrorWithStatusCode{/* contains filtered or unexported fields */}
ErrMisdirectedRequest is a StatusMisdirectedRequest Error
var ErrMovedPermanently = ErrorWithStatusCode{/* contains filtered or unexported fields */}
ErrMovedPermanently is a StatusMovedPermanently Error
var ErrMultiStatus = ErrorWithStatusCode{/* contains filtered or unexported fields */}
ErrMultiStatus is a StatusMultiStatus Error
var ErrMultipleChoices = ErrorWithStatusCode{/* contains filtered or unexported fields */}
ErrMultipleChoices is a StatusMultipleChoices Error
var ErrNetworkAuthenticationRequired = ErrorWithStatusCode{/* contains filtered or unexported fields */}
ErrNetworkAuthenticationRequired is a StatusNetworkAuthenticationRequired Error
var ErrNoContent = ErrorWithStatusCode{/* contains filtered or unexported fields */}
ErrNoContent is a StatusNoContent Error
var ErrNonAuthoritativeInfo = ErrorWithStatusCode{/* contains filtered or unexported fields */}
ErrNonAuthoritativeInfo is a StatusNonAuthoritativeInfo Error
var ErrNotAcceptable = ErrorWithStatusCode{/* contains filtered or unexported fields */}
ErrNotAcceptable is a StatusNotAcceptable Error
var ErrNotExtended = ErrorWithStatusCode{/* contains filtered or unexported fields */}
ErrNotExtended is a StatusNotExtended Error
var ErrNotFound = ErrorWithStatusCode{/* contains filtered or unexported fields */}
ErrNotFound is a StatusNotFound Error
var ErrNotImplemented = ErrorWithStatusCode{/* contains filtered or unexported fields */}
ErrNotImplemented is a StatusNotImplemented Error
var ErrNotModified = ErrorWithStatusCode{/* contains filtered or unexported fields */}
ErrNotModified is a StatusNotModified Error
var ErrPartialContent = ErrorWithStatusCode{/* contains filtered or unexported fields */}
ErrPartialContent is a StatusPartialContent Error
var ErrPaymentRequired = ErrorWithStatusCode{/* contains filtered or unexported fields */}
ErrPaymentRequired is a StatusPaymentRequired Error
var ErrPermanentRedirect = ErrorWithStatusCode{/* contains filtered or unexported fields */}
ErrPermanentRedirect is a StatusPermanentRedirect Error
var ErrPreconditionFailed = ErrorWithStatusCode{/* contains filtered or unexported fields */}
ErrPreconditionFailed is a StatusPreconditionFailed Error
var ErrPreconditionRequired = ErrorWithStatusCode{/* contains filtered or unexported fields */}
ErrPreconditionRequired is a StatusPreconditionRequired Error
var ErrProcessing = ErrorWithStatusCode{/* contains filtered or unexported fields */}
ErrProcessing is a StatusProcessing Error
var ErrProxyAuthRequired = ErrorWithStatusCode{/* contains filtered or unexported fields */}
ErrProxyAuthRequired is a StatusProxyAuthRequired Error
var ErrRequestEntityTooLarge = ErrorWithStatusCode{/* contains filtered or unexported fields */}
ErrRequestEntityTooLarge is a StatusRequestEntityTooLarge Error
var ErrRequestHeaderFieldsTooLarge = ErrorWithStatusCode{/* contains filtered or unexported fields */}
ErrRequestHeaderFieldsTooLarge is a StatusRequestHeaderFieldsTooLarge Error
var ErrRequestTimeout = ErrorWithStatusCode{/* contains filtered or unexported fields */}
ErrRequestTimeout is a StatusRequestTimeout Error
var ErrRequestURITooLong = ErrorWithStatusCode{/* contains filtered or unexported fields */}
ErrRequestURITooLong is a StatusRequestURITooLong Error
var ErrRequestedRangeNotSatisfiable = ErrorWithStatusCode{/* contains filtered or unexported fields */}
ErrRequestedRangeNotSatisfiable is a StatusRequestedRangeNotSatisfiable Error
var ErrResetContent = ErrorWithStatusCode{/* contains filtered or unexported fields */}
ErrResetContent is a StatusResetContent Error
var ErrSeeOther = ErrorWithStatusCode{/* contains filtered or unexported fields */}
ErrSeeOther is a StatusSeeOther Error
ErrServiceUnavailable is a StatusServiceUnavailable Error
var ErrSwitchingProtocols = ErrorWithStatusCode{/* contains filtered or unexported fields */}
ErrSwitchingProtocols is a StatusSwitchingProtocols Error
var ErrTeapot = ErrorWithStatusCode{/* contains filtered or unexported fields */}
ErrTeapot is a StatusTeapot Error
var ErrTemporaryRedirect = ErrorWithStatusCode{/* contains filtered or unexported fields */}
ErrTemporaryRedirect is a StatusTemporaryRedirect Error
var ErrTooEarly = ErrorWithStatusCode{/* contains filtered or unexported fields */}
ErrTooEarly is a StatusTooEarly Error
var ErrTooManyRequests = ErrorWithStatusCode{/* contains filtered or unexported fields */}
ErrTooManyRequests is a StatusTooManyRequests Error
var ErrTypeConversion = errors.New("Cannot convert to this type")
ErrTypeConversion is returned when a type conversion for headers / fields fails
ErrUnauthorized is a StatusUnauthorized Error
ErrUnavailableForLegalReasons is a StatusUnavailableForLegalReasons Error
var ErrUnprocessableEntity = ErrorWithStatusCode{/* contains filtered or unexported fields */}
ErrUnprocessableEntity is a StatusUnprocessableEntity Error
var ErrUnsupported = errors.New("Event does not support this interface")
ErrUnsupported is returned when an unsupported interface on the event is called
var ErrUnsupportedMediaType = ErrorWithStatusCode{/* contains filtered or unexported fields */}
ErrUnsupportedMediaType is a StatusUnsupportedMediaType Error
var ErrUpgradeRequired = ErrorWithStatusCode{/* contains filtered or unexported fields */}
ErrUpgradeRequired is a StatusUpgradeRequired Error
var ErrUseProxy = ErrorWithStatusCode{/* contains filtered or unexported fields */}
ErrUseProxy is a StatusUseProxy Error
var ErrVariantAlsoNegotiates = ErrorWithStatusCode{/* contains filtered or unexported fields */}
ErrVariantAlsoNegotiates is a StatusVariantAlsoNegotiates Error
Functions ¶
func GetByStatusCode ¶ added in v0.3.0
func GetWrapByStatusCode ¶ added in v0.3.0
func NewErrAccepted ¶
NewErrAccepted returns a new ErrAccepted with custom error message
func NewErrAlreadyReported ¶
NewErrAlreadyReported returns a new ErrAlreadyReported with custom error message
func NewErrBadGateway ¶
NewErrBadGateway returns a new ErrBadGateway with custom error message
func NewErrBadRequest ¶
NewErrBadRequest returns a new ErrBadRequest with custom error message
func NewErrConflict ¶
NewErrConflict returns a new ErrConflict with custom error message
func NewErrContinue ¶
NewErrContinue returns a new ErrContinue with custom error message
func NewErrCreated ¶
NewErrCreated returns a new ErrCreated with custom error message
func NewErrEarlyHints ¶ added in v0.3.0
NewErrEarlyHints returns a new ErrEarlyHints with custom error message
func NewErrExpectationFailed ¶
NewErrExpectationFailed returns a new ErrExpectationFailed with custom error message
func NewErrFailedDependency ¶
NewErrFailedDependency returns a new ErrFailedDependency with custom error message
func NewErrForbidden ¶
NewErrForbidden returns a new ErrForbidden with custom error message
func NewErrFound ¶
NewErrFound returns a new ErrFound with custom error message
func NewErrGatewayTimeout ¶
NewErrGatewayTimeout returns a new ErrGatewayTimeout with custom error message
func NewErrGone ¶
NewErrGone returns a new ErrGone with custom error message
func NewErrHTTPVersionNotSupported ¶
NewErrHTTPVersionNotSupported returns a new ErrHTTPVersionNotSupported with custom error message
func NewErrIMUsed ¶
NewErrIMUsed returns a new ErrIMUsed with custom error message
func NewErrInsufficientStorage ¶
NewErrInsufficientStorage returns a new ErrInsufficientStorage with custom error message
func NewErrInternalServerError ¶
NewErrInternalServerError returns a new ErrInternalServerError with custom error message
func NewErrLengthRequired ¶
NewErrLengthRequired returns a new ErrLengthRequired with custom error message
func NewErrLocked ¶
NewErrLocked returns a new ErrLocked with custom error message
func NewErrLoopDetected ¶
NewErrLoopDetected returns a new ErrLoopDetected with custom error message
func NewErrMethodNotAllowed ¶
NewErrMethodNotAllowed returns a new ErrMethodNotAllowed with custom error message
func NewErrMisdirectedRequest ¶ added in v0.3.0
NewErrMisdirectedRequest returns a new ErrMisdirectedRequest with custom error message
func NewErrMovedPermanently ¶
NewErrMovedPermanently returns a new ErrMovedPermanently with custom error message
func NewErrMultiStatus ¶
NewErrMultiStatus returns a new ErrMultiStatus with custom error message
func NewErrMultipleChoices ¶
NewErrMultipleChoices returns a new ErrMultipleChoices with custom error message
func NewErrNetworkAuthenticationRequired ¶
NewErrNetworkAuthenticationRequired returns a new ErrNetworkAuthenticationRequired with custom error message
func NewErrNoContent ¶
NewErrNoContent returns a new ErrNoContent with custom error message
func NewErrNonAuthoritativeInfo ¶
NewErrNonAuthoritativeInfo returns a new ErrNonAuthoritativeInfo with custom error message
func NewErrNotAcceptable ¶
NewErrNotAcceptable returns a new ErrNotAcceptable with custom error message
func NewErrNotExtended ¶
NewErrNotExtended returns a new ErrNotExtended with custom error message
func NewErrNotFound ¶
NewErrNotFound returns a new ErrNotFound with custom error message
func NewErrNotImplemented ¶
NewErrNotImplemented returns a new ErrNotImplemented with custom error message
func NewErrNotModified ¶
NewErrNotModified returns a new ErrNotModified with custom error message
func NewErrPartialContent ¶
NewErrPartialContent returns a new ErrPartialContent with custom error message
func NewErrPaymentRequired ¶
NewErrPaymentRequired returns a new ErrPaymentRequired with custom error message
func NewErrPermanentRedirect ¶
NewErrPermanentRedirect returns a new ErrPermanentRedirect with custom error message
func NewErrPreconditionFailed ¶
NewErrPreconditionFailed returns a new ErrPreconditionFailed with custom error message
func NewErrPreconditionRequired ¶
NewErrPreconditionRequired returns a new ErrPreconditionRequired with custom error message
func NewErrProcessing ¶
NewErrProcessing returns a new ErrProcessing with custom error message
func NewErrProxyAuthRequired ¶
NewErrProxyAuthRequired returns a new ErrProxyAuthRequired with custom error message
func NewErrRequestEntityTooLarge ¶
NewErrRequestEntityTooLarge returns a new ErrRequestEntityTooLarge with custom error message
func NewErrRequestHeaderFieldsTooLarge ¶
NewErrRequestHeaderFieldsTooLarge returns a new ErrRequestHeaderFieldsTooLarge with custom error message
func NewErrRequestTimeout ¶
NewErrRequestTimeout returns a new ErrRequestTimeout with custom error message
func NewErrRequestURITooLong ¶
NewErrRequestURITooLong returns a new ErrRequestURITooLong with custom error message
func NewErrRequestedRangeNotSatisfiable ¶
NewErrRequestedRangeNotSatisfiable returns a new ErrRequestedRangeNotSatisfiable with custom error message
func NewErrResetContent ¶
NewErrResetContent returns a new ErrResetContent with custom error message
func NewErrSeeOther ¶
NewErrSeeOther returns a new ErrSeeOther with custom error message
func NewErrServiceUnavailable ¶
NewErrServiceUnavailable returns a new ErrServiceUnavailable with custom error message
func NewErrSwitchingProtocols ¶
NewErrSwitchingProtocols returns a new ErrSwitchingProtocols with custom error message
func NewErrTeapot ¶
NewErrTeapot returns a new ErrTeapot with custom error message
func NewErrTemporaryRedirect ¶
NewErrTemporaryRedirect returns a new ErrTemporaryRedirect with custom error message
func NewErrTooEarly ¶ added in v0.3.0
NewErrTooEarly returns a new ErrTooEarly with custom error message
func NewErrTooManyRequests ¶
NewErrTooManyRequests returns a new ErrTooManyRequests with custom error message
func NewErrUnauthorized ¶
NewErrUnauthorized returns a new ErrUnauthorized with custom error message
func NewErrUnavailableForLegalReasons ¶
NewErrUnavailableForLegalReasons returns a new ErrUnavailableForLegalReasons with custom error message
func NewErrUnprocessableEntity ¶
NewErrUnprocessableEntity returns a new ErrUnprocessableEntity with custom error message
func NewErrUnsupportedMediaType ¶
NewErrUnsupportedMediaType returns a new ErrUnsupportedMediaType with custom error message
func NewErrUpgradeRequired ¶
NewErrUpgradeRequired returns a new ErrUpgradeRequired with custom error message
func NewErrUseProxy ¶
NewErrUseProxy returns a new ErrUseProxy with custom error message
func NewErrVariantAlsoNegotiates ¶
NewErrVariantAlsoNegotiates returns a new ErrVariantAlsoNegotiates with custom error message
func WrapErrAccepted ¶
WrapErrAccepted returns a new ErrAccepted, wrapping an existing error
func WrapErrAlreadyReported ¶
WrapErrAlreadyReported returns a new ErrAlreadyReported, wrapping an existing error
func WrapErrBadGateway ¶
WrapErrBadGateway returns a new ErrBadGateway, wrapping an existing error
func WrapErrBadRequest ¶
WrapErrBadRequest returns a new ErrBadRequest, wrapping an existing error
func WrapErrConflict ¶
WrapErrConflict returns a new ErrConflict, wrapping an existing error
func WrapErrContinue ¶
WrapErrContinue returns a new ErrContinue, wrapping an existing error
func WrapErrCreated ¶
WrapErrCreated returns a new ErrCreated, wrapping an existing error
func WrapErrEarlyHints ¶ added in v0.3.0
WrapErrEarlyHints returns a new ErrEarlyHints, wrapping an existing error
func WrapErrExpectationFailed ¶
WrapErrExpectationFailed returns a new ErrExpectationFailed, wrapping an existing error
func WrapErrFailedDependency ¶
WrapErrFailedDependency returns a new ErrFailedDependency, wrapping an existing error
func WrapErrForbidden ¶
WrapErrForbidden returns a new ErrForbidden, wrapping an existing error
func WrapErrFound ¶
WrapErrFound returns a new ErrFound, wrapping an existing error
func WrapErrGatewayTimeout ¶
WrapErrGatewayTimeout returns a new ErrGatewayTimeout, wrapping an existing error
func WrapErrGone ¶
WrapErrGone returns a new ErrGone, wrapping an existing error
func WrapErrHTTPVersionNotSupported ¶
WrapErrHTTPVersionNotSupported returns a new ErrHTTPVersionNotSupported, wrapping an existing error
func WrapErrIMUsed ¶
WrapErrIMUsed returns a new ErrIMUsed, wrapping an existing error
func WrapErrInsufficientStorage ¶
WrapErrInsufficientStorage returns a new ErrInsufficientStorage, wrapping an existing error
func WrapErrInternalServerError ¶
WrapErrInternalServerError returns a new ErrInternalServerError, wrapping an existing error
func WrapErrLengthRequired ¶
WrapErrLengthRequired returns a new ErrLengthRequired, wrapping an existing error
func WrapErrLocked ¶
WrapErrLocked returns a new ErrLocked, wrapping an existing error
func WrapErrLoopDetected ¶
WrapErrLoopDetected returns a new ErrLoopDetected, wrapping an existing error
func WrapErrMethodNotAllowed ¶
WrapErrMethodNotAllowed returns a new ErrMethodNotAllowed, wrapping an existing error
func WrapErrMisdirectedRequest ¶ added in v0.3.0
WrapErrMisdirectedRequest returns a new ErrMisdirectedRequest, wrapping an existing error
func WrapErrMovedPermanently ¶
WrapErrMovedPermanently returns a new ErrMovedPermanently, wrapping an existing error
func WrapErrMultiStatus ¶
WrapErrMultiStatus returns a new ErrMultiStatus, wrapping an existing error
func WrapErrMultipleChoices ¶
WrapErrMultipleChoices returns a new ErrMultipleChoices, wrapping an existing error
func WrapErrNetworkAuthenticationRequired ¶
WrapErrNetworkAuthenticationRequired returns a new ErrNetworkAuthenticationRequired, wrapping an existing error
func WrapErrNoContent ¶
WrapErrNoContent returns a new ErrNoContent, wrapping an existing error
func WrapErrNonAuthoritativeInfo ¶
WrapErrNonAuthoritativeInfo returns a new ErrNonAuthoritativeInfo, wrapping an existing error
func WrapErrNotAcceptable ¶
WrapErrNotAcceptable returns a new ErrNotAcceptable, wrapping an existing error
func WrapErrNotExtended ¶
WrapErrNotExtended returns a new ErrNotExtended, wrapping an existing error
func WrapErrNotFound ¶
WrapErrNotFound returns a new ErrNotFound, wrapping an existing error
func WrapErrNotImplemented ¶
WrapErrNotImplemented returns a new ErrNotImplemented, wrapping an existing error
func WrapErrNotModified ¶
WrapErrNotModified returns a new ErrNotModified, wrapping an existing error
func WrapErrPartialContent ¶
WrapErrPartialContent returns a new ErrPartialContent, wrapping an existing error
func WrapErrPaymentRequired ¶
WrapErrPaymentRequired returns a new ErrPaymentRequired, wrapping an existing error
func WrapErrPermanentRedirect ¶
WrapErrPermanentRedirect returns a new ErrPermanentRedirect, wrapping an existing error
func WrapErrPreconditionFailed ¶
WrapErrPreconditionFailed returns a new ErrPreconditionFailed, wrapping an existing error
func WrapErrPreconditionRequired ¶
WrapErrPreconditionRequired returns a new ErrPreconditionRequired, wrapping an existing error
func WrapErrProcessing ¶
WrapErrProcessing returns a new ErrProcessing, wrapping an existing error
func WrapErrProxyAuthRequired ¶
WrapErrProxyAuthRequired returns a new ErrProxyAuthRequired, wrapping an existing error
func WrapErrRequestEntityTooLarge ¶
WrapErrRequestEntityTooLarge returns a new ErrRequestEntityTooLarge, wrapping an existing error
func WrapErrRequestHeaderFieldsTooLarge ¶
WrapErrRequestHeaderFieldsTooLarge returns a new ErrRequestHeaderFieldsTooLarge, wrapping an existing error
func WrapErrRequestTimeout ¶
WrapErrRequestTimeout returns a new ErrRequestTimeout, wrapping an existing error
func WrapErrRequestURITooLong ¶
WrapErrRequestURITooLong returns a new ErrRequestURITooLong, wrapping an existing error
func WrapErrRequestedRangeNotSatisfiable ¶
WrapErrRequestedRangeNotSatisfiable returns a new ErrRequestedRangeNotSatisfiable, wrapping an existing error
func WrapErrResetContent ¶
WrapErrResetContent returns a new ErrResetContent, wrapping an existing error
func WrapErrSeeOther ¶
WrapErrSeeOther returns a new ErrSeeOther, wrapping an existing error
func WrapErrServiceUnavailable ¶
WrapErrServiceUnavailable returns a new ErrServiceUnavailable, wrapping an existing error
func WrapErrSwitchingProtocols ¶
WrapErrSwitchingProtocols returns a new ErrSwitchingProtocols, wrapping an existing error
func WrapErrTeapot ¶
WrapErrTeapot returns a new ErrTeapot, wrapping an existing error
func WrapErrTemporaryRedirect ¶
WrapErrTemporaryRedirect returns a new ErrTemporaryRedirect, wrapping an existing error
func WrapErrTooEarly ¶ added in v0.3.0
WrapErrTooEarly returns a new ErrTooEarly, wrapping an existing error
func WrapErrTooManyRequests ¶
WrapErrTooManyRequests returns a new ErrTooManyRequests, wrapping an existing error
func WrapErrUnauthorized ¶
WrapErrUnauthorized returns a new ErrUnauthorized, wrapping an existing error
func WrapErrUnavailableForLegalReasons ¶
WrapErrUnavailableForLegalReasons returns a new ErrUnavailableForLegalReasons, wrapping an existing error
func WrapErrUnprocessableEntity ¶
WrapErrUnprocessableEntity returns a new ErrUnprocessableEntity, wrapping an existing error
func WrapErrUnsupportedMediaType ¶
WrapErrUnsupportedMediaType returns a new ErrUnsupportedMediaType, wrapping an existing error
func WrapErrUpgradeRequired ¶
WrapErrUpgradeRequired returns a new ErrUpgradeRequired, wrapping an existing error
func WrapErrUseProxy ¶
WrapErrUseProxy returns a new ErrUseProxy, wrapping an existing error
func WrapErrVariantAlsoNegotiates ¶
WrapErrVariantAlsoNegotiates returns a new ErrVariantAlsoNegotiates, wrapping an existing error
Types ¶
type AbstractEvent ¶
type AbstractEvent struct {
// contains filtered or unexported fields
}
AbstractEvent provides a base implementation of an event
func (*AbstractEvent) GetBody ¶
func (ae *AbstractEvent) GetBody() []byte
GetBody returns the body of the event
func (*AbstractEvent) GetBodyObject ¶
func (ae *AbstractEvent) GetBodyObject() interface{}
GetBodyObject returns the body of the event as an object
func (*AbstractEvent) GetContentType ¶
func (ae *AbstractEvent) GetContentType() string
GetContentType returns the content type of the body
func (*AbstractEvent) GetField ¶
func (ae *AbstractEvent) GetField(key string) interface{}
GetField returns the field by name as an interface{}
func (*AbstractEvent) GetFieldByteSlice ¶
func (ae *AbstractEvent) GetFieldByteSlice(key string) []byte
GetFieldByteSlice returns the field by name as a byte slice
func (*AbstractEvent) GetFieldInt ¶
func (ae *AbstractEvent) GetFieldInt(key string) (int, error)
GetFieldInt returns the field by name as an integer
func (*AbstractEvent) GetFieldString ¶
func (ae *AbstractEvent) GetFieldString(key string) string
GetFieldString returns the field by name as a string
func (*AbstractEvent) GetFields ¶
func (ae *AbstractEvent) GetFields() map[string]interface{}
GetFields loads all fields into a map of string / interface{}
func (*AbstractEvent) GetHeader ¶
func (ae *AbstractEvent) GetHeader(key string) interface{}
GetHeader returns the header by name as an interface{}
func (*AbstractEvent) GetHeaderByteSlice ¶
func (ae *AbstractEvent) GetHeaderByteSlice(key string) []byte
GetHeaderByteSlice returns the header by name as a byte slice
func (*AbstractEvent) GetHeaderInt ¶
func (ae *AbstractEvent) GetHeaderInt(key string) (int, error)
GetHeaderInt returns the field by name as an integer
func (*AbstractEvent) GetHeaderString ¶
func (ae *AbstractEvent) GetHeaderString(key string) string
GetHeaderString returns the header by name as a string
func (*AbstractEvent) GetHeaders ¶
func (ae *AbstractEvent) GetHeaders() map[string]interface{}
GetHeaders loads all headers into a map of string / interface{}
func (*AbstractEvent) GetLastInBatch ¶ added in v0.1.0
func (ae *AbstractEvent) GetLastInBatch() bool
GetLastInBatch returns whether the event is the last event in a trigger specific batch
func (*AbstractEvent) GetMethod ¶
func (ae *AbstractEvent) GetMethod() string
GetMethod returns the method of the event, if applicable
func (*AbstractEvent) GetOffset ¶ added in v0.1.0
func (ae *AbstractEvent) GetOffset() int
GetOffset returns the offset of the event
func (*AbstractEvent) GetPath ¶
func (ae *AbstractEvent) GetPath() string
GetPath returns the path of the event
func (*AbstractEvent) GetShardID ¶
func (ae *AbstractEvent) GetShardID() int
GetShardID returns the ID of the shard from which this event arrived, if applicable
func (*AbstractEvent) GetTimestamp ¶
func (ae *AbstractEvent) GetTimestamp() time.Time
GetTimestamp returns when the event originated
func (*AbstractEvent) GetTopic ¶ added in v0.5.1
func (ae *AbstractEvent) GetTopic() string
GetTopic returns the topic of the event
func (*AbstractEvent) GetTotalNumShards ¶
func (ae *AbstractEvent) GetTotalNumShards() int
GetTotalNumShards returns the total number of shards, if applicable
func (*AbstractEvent) GetTriggerInfo ¶
func (ae *AbstractEvent) GetTriggerInfo() TriggerInfoProvider
GetTriggerInfo returns a trigger info provider
func (*AbstractEvent) GetType ¶
func (ae *AbstractEvent) GetType() string
GetType returns the type of event
func (*AbstractEvent) GetTypeVersion ¶
func (ae *AbstractEvent) GetTypeVersion() string
GetTypeVersion returns the version of the type
func (*AbstractEvent) GetURL ¶
func (ae *AbstractEvent) GetURL() string
GetURL returns the URL of the event
func (*AbstractEvent) GetVersion ¶
func (ae *AbstractEvent) GetVersion() string
GetVersion returns the version of the event
func (*AbstractEvent) SetTriggerInfoProvider ¶
func (ae *AbstractEvent) SetTriggerInfoProvider(triggerInfoProvider TriggerInfoProvider)
SetTriggerInfoProvider sets the information about the trigger who triggered this event
type Context ¶
type Context struct { // Logger allows submitting information to logger sinks configured in the platform Logger logger.Logger // DataBinding holds a map of <data binding name> <data binding object>. For example, if the user // configured the function to bind to an Azure Event Hub, it will hold an instance of an Event Hub // client. The user can type cast this to the client type DataBinding map[string]DataBinding // Platform is set of platform-specific functions like "invoking other function" Platform *Platform // WorkerID holds the unique identifier of the worker currently handling the event. It can be used // to key into shared datasets to prevent locking WorkerID int // UserData is nil by default. This holds information set by the user should he need access to long // living data. The lifetime of this pointer is that of the _worker_ and workers can come and go. // Treat this like cache - always check if it's nil prior to access and re-populate if necessary UserData interface{} // FunctionName holds the name of the function currently running FunctionName string // FunctionVersion holds the version of the function currently running FunctionVersion int // TriggerKind holds the information about the invoking trigger in this context TriggerKind string // TriggerName holds the information about the invoking trigger in this context TriggerName string // WorkerAllocatorName holds the name of the worker allocator WorkerAllocatorName string }
Context holds objects whose lifetime is that of the function instance
type DataBinding ¶
type DataBinding interface{}
DataBinding defines a generic interface to data sources configured in the function. For the time being there is no "abstract" data interface and user will cast this to the specific data source client
type ErrorWithStatusCode ¶
type ErrorWithStatusCode struct {
// contains filtered or unexported fields
}
ErrorWithStatusCode implements both error and WithStatusCode
func (ErrorWithStatusCode) Error ¶
func (e ErrorWithStatusCode) Error() string
Error returns the error message
func (*ErrorWithStatusCode) GetError ¶
func (e *ErrorWithStatusCode) GetError() error
GetError returns the underlying error
func (*ErrorWithStatusCode) StatusCode ¶
func (e *ErrorWithStatusCode) StatusCode() int
StatusCode returns the status code
type Event ¶
type Event interface { // GetID returns the ID of the event GetID() ID // SetID sets the ID of the event SetID(ID) // SetTriggerInfoProvider sets the information about the trigger who triggered this event SetTriggerInfoProvider(TriggerInfoProvider) // GetTriggerInfo retruns a trigger info provider GetTriggerInfo() TriggerInfoProvider // GetContentType returns the content type of the body GetContentType() string // GetBody returns the body of the event GetBody() []byte // GetBodyObject returns the body of the event as an object GetBodyObject() interface{} // GetHeader returns the header by name as an interface{} GetHeader(string) interface{} // GetHeaderByteSlice returns the header by name as a byte slice GetHeaderByteSlice(string) []byte // GetHeaderString returns the header by name as a string GetHeaderString(string) string // GetHeaderInt returns the field by name as an integer GetHeaderInt(string) (int, error) // GetHeaders loads all headers into a map of string / interface{} GetHeaders() map[string]interface{} // GetField returns the field by name as an interface{} GetField(string) interface{} // GetFieldByteSlice returns the field by name as a byte slice GetFieldByteSlice(string) []byte // GetFieldString returns the field by name as a string GetFieldString(string) string // GetFieldInt returns the field by name as an integer GetFieldInt(string) (int, error) // GetFields loads all fields into a map of string / interface{} GetFields() map[string]interface{} // GetTimestamp returns when the event originated GetTimestamp() time.Time // GetPath returns the path of the event GetPath() string // GetURL returns the URL of the event GetURL() string // GetMethod returns the method of the event, if applicable GetMethod() string // GetShardID returns the ID of the shard from which this event arrived, if applicable GetShardID() int // GetTotalNumShards returns the total number of shards, if applicable GetTotalNumShards() int // GetType returns the type of event GetType() string // GetTypeVersion returns the version of the type GetTypeVersion() string // GetVersion returns the version of the event GetVersion() string // GetLastInBatch returns whether the event is the last event in a trigger specific batch GetLastInBatch() bool // GetOffset returns the offset of the event GetOffset() int // GetTopic returns the topic of the event GetTopic() string }
Event allows access to the concrete event
type MemoryEvent ¶
type MemoryEvent struct { AbstractEvent Method string ContentType string Body []byte Headers map[string]interface{} Path string }
func (*MemoryEvent) GetBody ¶
func (me *MemoryEvent) GetBody() []byte
func (*MemoryEvent) GetContentType ¶
func (me *MemoryEvent) GetContentType() string
func (*MemoryEvent) GetHeader ¶
func (me *MemoryEvent) GetHeader(key string) interface{}
func (*MemoryEvent) GetHeaders ¶
func (me *MemoryEvent) GetHeaders() map[string]interface{}
func (*MemoryEvent) GetMethod ¶
func (me *MemoryEvent) GetMethod() string
func (*MemoryEvent) GetPath ¶
func (me *MemoryEvent) GetPath() string
type Platform ¶
type Platform struct {
// contains filtered or unexported fields
}
func NewPlatform ¶
type Response ¶
type Response struct { StatusCode int ContentType string Headers map[string]interface{} Body []byte }
Response can be returned from functions, allowing the user to specify various fields
type TriggerInfoProvider ¶
type TriggerInfoProvider interface { // GetClass gets the class of source (sync, async, etc) GetClass() string // GetKind gets specific kind of source (http, rabbit mq, etc) GetKind() string // GetName get given name of trigger GetName() string }
TriggerInfoProvider provides information about the trigger in which this event originated
type WithStatusCode ¶
type WithStatusCode interface {
StatusCode() int
}
WithStatusCode is an error with status code