Documentation ¶
Index ¶
- Constants
- func ErrorResponseBadRequest(moreInfo string) (response *api.PublishEventResponses)
- func ErrorResponseMissingFieldData() (response *api.PublishEventResponses)
- func ErrorResponseMissingFieldEventTime() (response *api.PublishEventResponses)
- func ErrorResponseMissingFieldEventType() (response *api.PublishEventResponses)
- func ErrorResponseMissingFieldEventTypeVersion() (response *api.PublishEventResponses)
- func ErrorResponseWrongEventId() (response *api.PublishEventResponses)
- func ErrorResponseWrongEventTime(err error) (response *api.PublishEventResponses)
- func ErrorResponseWrongEventTypeVersion() (response *api.PublishEventResponses)
Constants ¶
View Source
const ( AllowedEventTypeVersionChars = `[a-zA-Z0-9]+` AllowedEventIdChars = `^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$` )
View Source
const ( ErrorMessageBadPayload = "Bad Payload Syntax" ErrorMessageMissingField = "Missing Field" ErrorMessageInvalidField = "Invalid Field" )
Error messages
View Source
const ( ErrorTypeBadPayload = "bad_payload_syntax" ErrorTypeMissingField = "missing_field" ErrorTypeValidationViolation = "validation_violation" ErrorTypeInvalidField = "invalid_field" )
Error type definition
View Source
const ( FieldEventId = "event-id" FieldEventTime = "event-time" FieldEventType = "event-type" FieldEventTypeVersion = "event-type-version" FieldData = "data" )
Field definition
View Source
const (
EventsPath = "/v1/events"
)
Handlers paths
Variables ¶
This section is empty.
Functions ¶
func ErrorResponseBadRequest ¶
func ErrorResponseBadRequest(moreInfo string) (response *api.PublishEventResponses)
func ErrorResponseMissingFieldData ¶
func ErrorResponseMissingFieldData() (response *api.PublishEventResponses)
func ErrorResponseMissingFieldEventTime ¶
func ErrorResponseMissingFieldEventTime() (response *api.PublishEventResponses)
func ErrorResponseMissingFieldEventType ¶
func ErrorResponseMissingFieldEventType() (response *api.PublishEventResponses)
func ErrorResponseMissingFieldEventTypeVersion ¶
func ErrorResponseMissingFieldEventTypeVersion() (response *api.PublishEventResponses)
func ErrorResponseWrongEventId ¶
func ErrorResponseWrongEventId() (response *api.PublishEventResponses)
func ErrorResponseWrongEventTime ¶
func ErrorResponseWrongEventTime(err error) (response *api.PublishEventResponses)
func ErrorResponseWrongEventTypeVersion ¶
func ErrorResponseWrongEventTypeVersion() (response *api.PublishEventResponses)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.