shared

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 8, 2018 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL