Documentation ¶
Index ¶
Constants ¶
View Source
const ( // OrganizationIDContextKey is the key used to add an organizationID to the context OrganizationIDContextKey = ContextKey("OrganizationID") // FacilityIDContextKey is the key used to add a facility to the context FacilityIDContextKey = ContextKey("FacilityID") )
View Source
const (
// TopicVersion defines the topic version. That standard one is `v1`
TopicVersion = "v2"
)
Variables ¶
This section is empty.
Functions ¶
func AddPubSubNamespace ¶ added in v1.0.0
func ReportErrorToSentry ¶ added in v1.0.0
func ReportErrorToSentry(err error)
ReportErrorToSentry captures the exception thrown and registers an issue in sentry
func ValidateEmail ¶
ValidateEmail returns an error if the supplied string does not have a valid format or resolvable host
Types ¶
type ContextKey ¶ added in v1.0.0
type ContextKey string
ContextKey is a custom type used as a key value when adding IDs to the context This is because using a built-in type as a context key can cause collisions with keys used by other packages, leading to unexpected behavior.
type CustomError ¶ added in v1.0.0
type CustomError struct { Err error `json:"error,omitempty"` Message string `json:"message,omitempty"` }
CustomError represents a custom error struct Reference https://blog.golang.org/error-handling-and-go
func NewCustomError ¶ added in v1.0.0
func NewCustomError(err error, message string) CustomError
NewCustomError is a helper function to create a new custom error
func (CustomError) Error ¶ added in v1.0.0
func (e CustomError) Error() string
Error implements the error interface
Click to show internal directories.
Click to hide internal directories.