github.com/mattermosttest/mattermost-server/v5@v5.0.0-20200917143240-9dfa12e121f9/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  	POST_EMBED_LINK               PostEmbedType = "link"
    11  )
    12  
    13  type PostEmbedType string
    14  
    15  type PostEmbed struct {
    16  	Type PostEmbedType `json:"type"`
    17  
    18  	// The URL of the embedded content. Used for image and OpenGraph embeds.
    19  	URL string `json:"url,omitempty"`
    20  
    21  	// Any additional data for the embedded content. Only used for OpenGraph embeds.
    22  	Data interface{} `json:"data,omitempty"`
    23  }