Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Content ¶
type Content []Item
func FromAny ¶
FromAny marshals the given value to JSON and returns a new JSON content item with the marshalled JSON data.
func FromRawJSON ¶
func FromRawJSON(data json.RawMessage) Content
FromRawJSON returns a new JSON content item with the given raw JSON data.
func FromTextAndImage ¶
FromTextAndImage returns a new content item with the given text and image URL.
func (*Content) Append ¶
Append adds the text to the last content item if it's a text item, otherwise it adds a new text item to the end of the list.
func (Content) MarshalJSON ¶
MarshalJSON implements the json.Marshaler interface for Content.
func (*Content) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface for Content.
type JSON ¶
type JSON struct {
Data json.RawMessage `json:"data"`
}
Click to show internal directories.
Click to hide internal directories.