Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
matrix-media-repo
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
matrix-media-repo
Commits
fa27f2c8
Commit
fa27f2c8
authored
7 years ago
by
Travis Ralston
Browse files
Options
Downloads
Patches
Plain Diff
Preliminary model for URL preview cache
parent
3bd9f4c5
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/github.com/turt2live/matrix-media-repo/types/url_preview.go
+31
-0
31 additions, 0 deletions
...thub.com/turt2live/matrix-media-repo/types/url_preview.go
with
31 additions
and
0 deletions
src/github.com/turt2live/matrix-media-repo/types/url_preview.go
0 → 100644
+
31
−
0
View file @
fa27f2c8
package
types
import
"github.com/turt2live/matrix-media-repo/client/r0"
type
UrlPreview
struct
{
Url
string
SiteName
string
Type
string
Description
string
Title
string
ImageMxc
string
ImageType
string
ImageSize
int64
ImageWidth
int
ImageHeight
int
}
func
(
p
*
UrlPreview
)
ToOpenGraphResponse
()
r0
.
MatrixOpenGraph
{
return
r0
.
MatrixOpenGraph
{
Url
:
p
.
Url
,
SiteName
:
p
.
SiteName
,
Type
:
p
.
Type
,
Description
:
p
.
Description
,
Title
:
p
.
Title
,
ImageMxc
:
p
.
ImageMxc
,
ImageType
:
p
.
ImageType
,
ImageSize
:
p
.
ImageSize
,
ImageWidth
:
p
.
ImageWidth
,
ImageHeight
:
p
.
ImageHeight
,
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment