package
2.15.2
Repository: https://github.com/cloudevents/sdk-go.git
Documentation: pkg.go.dev

# Functions

Allocate allocates a new instance of type t and returns: asPtr is of type t if t is a pointer type and of type &t otherwise asValue is a Value of type t pointing to the same data as asPtr.
Clone v clones a CloudEvents attribute value, which is one of the valid types: bool, int32, string, []byte, types.URI, types.URIRef, types.Timestamp Returns the same type Panics if the type is not valid.
Format returns the canonical string format of v, where v can be any type that is convertible to a CloudEvents type.
FormatBinary returns canonical string format: standard base64 encoding.
FormatBool returns canonical string format: "true" or "false".
FormatInteger returns canonical string format: decimal notation.
FormatTime returns canonical string format: RFC3339 with nanoseconds.
No description provided by the author
ParseBinary parse canonical string format: standard base64 encoding.
ParseBool parse canonical string format: "true" or "false".
ParseInteger parse canonical string format: decimal notation.
ParseTime parse canonical string format: RFC3339 with nanoseconds.
ParseTimestamp attempts to parse the given time assuming RFC3339 layout.
ParseURI attempts to parse the given string as a URI.
ParseURIRef attempts to parse the given string as a URI-Reference.
ToBinary returns a []byte value, decoding from base64 string if necessary.
ToBool accepts a bool value or canonical "true"/"false" string.
ToInteger accepts any numeric value in int32 range, or canonical string.
ToString returns a string value unaltered.
ToTime returns a time.Time value, parsing from RFC3339 string if necessary.
ToURL returns a *url.URL value, parsing from string if necessary.
Validate v is a valid CloudEvents attribute value, convert it to one of: bool, int32, string, []byte, types.URI, types.URIRef, types.Timestamp.

# Structs

No description provided by the author
Timestamp wraps time.Time to normalize the time layout to RFC3339.
URI is a wrapper to url.URL.
URIRef is a wrapper to url.URL.