github.com/nhannv/mattermost-server@v5.11.1+incompatible/model/post_embed.go (about) 1 // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. 2 // See License.txt for license information. 3 4 package model 5 6 const ( 7 POST_EMBED_IMAGE PostEmbedType = "image" 8 POST_EMBED_MESSAGE_ATTACHMENT PostEmbedType = "message_attachment" 9 POST_EMBED_OPENGRAPH PostEmbedType = "opengraph" 10 ) 11 12 type PostEmbedType string 13 14 type PostEmbed struct { 15 Type PostEmbedType `json:"type"` 16 17 // The URL of the embedded content. Used for image and OpenGraph embeds. 18 URL string `json:"url,omitempty"` 19 20 // Any additional data for the embedded content. Only used for OpenGraph embeds. 21 Data interface{} `json:"data,omitempty"` 22 }