mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-23 07:41:25 +00:00
Gifs API (#223)
* gifs service * Commit from GitHub Actions (Publish APIs & Clients) Co-authored-by: domwong <domwong@users.noreply.github.com>
This commit is contained in:
969
gifs/proto/gifs.pb.go
Normal file
969
gifs/proto/gifs.pb.go
Normal file
@@ -0,0 +1,969 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.26.0
|
||||
// protoc v3.15.5
|
||||
// source: proto/gifs.proto
|
||||
|
||||
package gifs
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// Search for a gif
|
||||
type SearchRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// The search term
|
||||
Query string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"`
|
||||
// Max number of gifs to return. Defaults to 25
|
||||
Limit int32 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"`
|
||||
// The start position of results (used with pagination)
|
||||
Offset int32 `protobuf:"varint,3,opt,name=offset,proto3" json:"offset,omitempty"`
|
||||
// Apply age related content filter. "g", "pg", "pg-13", or "r". Defaults to "g"
|
||||
Rating string `protobuf:"bytes,4,opt,name=rating,proto3" json:"rating,omitempty"`
|
||||
// ISO 2 letter language code for regional content
|
||||
Lang string `protobuf:"bytes,5,opt,name=lang,proto3" json:"lang,omitempty"`
|
||||
}
|
||||
|
||||
func (x *SearchRequest) Reset() {
|
||||
*x = SearchRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_proto_gifs_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *SearchRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*SearchRequest) ProtoMessage() {}
|
||||
|
||||
func (x *SearchRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_proto_gifs_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use SearchRequest.ProtoReflect.Descriptor instead.
|
||||
func (*SearchRequest) Descriptor() ([]byte, []int) {
|
||||
return file_proto_gifs_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *SearchRequest) GetQuery() string {
|
||||
if x != nil {
|
||||
return x.Query
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *SearchRequest) GetLimit() int32 {
|
||||
if x != nil {
|
||||
return x.Limit
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *SearchRequest) GetOffset() int32 {
|
||||
if x != nil {
|
||||
return x.Offset
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *SearchRequest) GetRating() string {
|
||||
if x != nil {
|
||||
return x.Rating
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *SearchRequest) GetLang() string {
|
||||
if x != nil {
|
||||
return x.Lang
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type SearchResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// list of results
|
||||
Data []*Gif `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"`
|
||||
// information on pagination
|
||||
Pagination *Pagination `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
|
||||
}
|
||||
|
||||
func (x *SearchResponse) Reset() {
|
||||
*x = SearchResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_proto_gifs_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *SearchResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*SearchResponse) ProtoMessage() {}
|
||||
|
||||
func (x *SearchResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_proto_gifs_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use SearchResponse.ProtoReflect.Descriptor instead.
|
||||
func (*SearchResponse) Descriptor() ([]byte, []int) {
|
||||
return file_proto_gifs_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *SearchResponse) GetData() []*Gif {
|
||||
if x != nil {
|
||||
return x.Data
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *SearchResponse) GetPagination() *Pagination {
|
||||
if x != nil {
|
||||
return x.Pagination
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type Pagination struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// position in pagination
|
||||
Offset int32 `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"`
|
||||
// total number of results available
|
||||
TotalCount int32 `protobuf:"varint,2,opt,name=total_count,json=totalCount,proto3" json:"total_count,omitempty"`
|
||||
// total number returned in this response
|
||||
Count int32 `protobuf:"varint,3,opt,name=count,proto3" json:"count,omitempty"`
|
||||
}
|
||||
|
||||
func (x *Pagination) Reset() {
|
||||
*x = Pagination{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_proto_gifs_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *Pagination) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*Pagination) ProtoMessage() {}
|
||||
|
||||
func (x *Pagination) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_proto_gifs_proto_msgTypes[2]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use Pagination.ProtoReflect.Descriptor instead.
|
||||
func (*Pagination) Descriptor() ([]byte, []int) {
|
||||
return file_proto_gifs_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *Pagination) GetOffset() int32 {
|
||||
if x != nil {
|
||||
return x.Offset
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *Pagination) GetTotalCount() int32 {
|
||||
if x != nil {
|
||||
return x.TotalCount
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *Pagination) GetCount() int32 {
|
||||
if x != nil {
|
||||
return x.Count
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type Gif struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// The ID of the GIF
|
||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
// The slug used in the GIF's URL
|
||||
Slug string `protobuf:"bytes,2,opt,name=slug,proto3" json:"slug,omitempty"`
|
||||
// The URL for this GIF
|
||||
Url string `protobuf:"bytes,3,opt,name=url,proto3" json:"url,omitempty"`
|
||||
// A short URL for this GIF
|
||||
ShortUrl string `protobuf:"bytes,4,opt,name=short_url,json=shortUrl,proto3" json:"short_url,omitempty"`
|
||||
// URL used for embedding the GIF
|
||||
EmbedUrl string `protobuf:"bytes,5,opt,name=embed_url,json=embedUrl,proto3" json:"embed_url,omitempty"`
|
||||
// The page on which this GIF was found
|
||||
Source string `protobuf:"bytes,6,opt,name=source,proto3" json:"source,omitempty"`
|
||||
// The content rating for the GIF
|
||||
Rating string `protobuf:"bytes,7,opt,name=rating,proto3" json:"rating,omitempty"`
|
||||
// The title for this GIF
|
||||
Title string `protobuf:"bytes,8,opt,name=title,proto3" json:"title,omitempty"`
|
||||
// The different formats available for this GIF
|
||||
Images *ImageFormats `protobuf:"bytes,9,opt,name=images,proto3" json:"images,omitempty"`
|
||||
}
|
||||
|
||||
func (x *Gif) Reset() {
|
||||
*x = Gif{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_proto_gifs_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *Gif) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*Gif) ProtoMessage() {}
|
||||
|
||||
func (x *Gif) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_proto_gifs_proto_msgTypes[3]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use Gif.ProtoReflect.Descriptor instead.
|
||||
func (*Gif) Descriptor() ([]byte, []int) {
|
||||
return file_proto_gifs_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *Gif) GetId() string {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Gif) GetSlug() string {
|
||||
if x != nil {
|
||||
return x.Slug
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Gif) GetUrl() string {
|
||||
if x != nil {
|
||||
return x.Url
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Gif) GetShortUrl() string {
|
||||
if x != nil {
|
||||
return x.ShortUrl
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Gif) GetEmbedUrl() string {
|
||||
if x != nil {
|
||||
return x.EmbedUrl
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Gif) GetSource() string {
|
||||
if x != nil {
|
||||
return x.Source
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Gif) GetRating() string {
|
||||
if x != nil {
|
||||
return x.Rating
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Gif) GetTitle() string {
|
||||
if x != nil {
|
||||
return x.Title
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Gif) GetImages() *ImageFormats {
|
||||
if x != nil {
|
||||
return x.Images
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// A map of different formats (or renditions) of a GIF. See https://developers.giphy.com/docs/optional-settings#rendition-guide
|
||||
type ImageFormats struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// The original GIF. Good for desktop use
|
||||
Original *ImageFormat `protobuf:"bytes,1,opt,name=original,proto3" json:"original,omitempty"`
|
||||
// A downsized version of the GIF < 2MB
|
||||
Downsized *ImageFormat `protobuf:"bytes,2,opt,name=downsized,proto3" json:"downsized,omitempty"`
|
||||
// Version of the GIF with fixed height of 200 pixels. Good for mobile use
|
||||
FixedHeight *ImageFormat `protobuf:"bytes,3,opt,name=fixed_height,json=fixedHeight,proto3" json:"fixed_height,omitempty"`
|
||||
// Static image of the GIF with fixed height of 200 pixels
|
||||
FixedHeightStill *ImageFormat `protobuf:"bytes,4,opt,name=fixed_height_still,json=fixedHeightStill,proto3" json:"fixed_height_still,omitempty"`
|
||||
// Version of the GIF with fixed height of 200 pixels and number of frames reduced to 6
|
||||
FixedHeightDownsampled *ImageFormat `protobuf:"bytes,5,opt,name=fixed_height_downsampled,json=fixedHeightDownsampled,proto3" json:"fixed_height_downsampled,omitempty"`
|
||||
// Version of the GIF with fixed width of 200 pixels. Good for mobile use
|
||||
FixedWidth *ImageFormat `protobuf:"bytes,6,opt,name=fixed_width,json=fixedWidth,proto3" json:"fixed_width,omitempty"`
|
||||
// Static image of the GIF with fixed width of 200 pixels
|
||||
FixedWidthStill *ImageFormat `protobuf:"bytes,7,opt,name=fixed_width_still,json=fixedWidthStill,proto3" json:"fixed_width_still,omitempty"`
|
||||
// Version of the GIF with fixed width of 200 pixels and number of frames reduced to 6
|
||||
FixedWidthDownsampled *ImageFormat `protobuf:"bytes,8,opt,name=fixed_width_downsampled,json=fixedWidthDownsampled,proto3" json:"fixed_width_downsampled,omitempty"`
|
||||
// Version of the GIF with fixed height of 100 pixels. Good for mobile keyboards
|
||||
FixedHeightSmall *ImageFormat `protobuf:"bytes,9,opt,name=fixed_height_small,json=fixedHeightSmall,proto3" json:"fixed_height_small,omitempty"`
|
||||
// Static image of the GIF with fixed height of 100 pixels
|
||||
FixedHeightSmallStill *ImageFormat `protobuf:"bytes,10,opt,name=fixed_height_small_still,json=fixedHeightSmallStill,proto3" json:"fixed_height_small_still,omitempty"`
|
||||
// Version of the GIF with fixed width of 100 pixels. Good for mobile keyboards
|
||||
FixedWidthSmall *ImageFormat `protobuf:"bytes,11,opt,name=fixed_width_small,json=fixedWidthSmall,proto3" json:"fixed_width_small,omitempty"`
|
||||
// Static image of the GIF with fixed width of 100 pixels
|
||||
FixedWidthSmallStill *ImageFormat `protobuf:"bytes,12,opt,name=fixed_width_small_still,json=fixedWidthSmallStill,proto3" json:"fixed_width_small_still,omitempty"`
|
||||
// Static image of the downsized version of the GIF
|
||||
DownsizedStill *ImageFormat `protobuf:"bytes,13,opt,name=downsized_still,json=downsizedStill,proto3" json:"downsized_still,omitempty"`
|
||||
// A downsized version of the GIF < 8MB
|
||||
DownsizedLarge *ImageFormat `protobuf:"bytes,14,opt,name=downsized_large,json=downsizedLarge,proto3" json:"downsized_large,omitempty"`
|
||||
// A downsized version of the GIF < 5MB
|
||||
DownsizedMedium *ImageFormat `protobuf:"bytes,15,opt,name=downsized_medium,json=downsizedMedium,proto3" json:"downsized_medium,omitempty"`
|
||||
// A downsized version of the GIF < 200kb
|
||||
DownsizedSmall *ImageFormat `protobuf:"bytes,16,opt,name=downsized_small,json=downsizedSmall,proto3" json:"downsized_small,omitempty"`
|
||||
// Static image of the original version of the GIF
|
||||
OriginalStill *ImageFormat `protobuf:"bytes,17,opt,name=original_still,json=originalStill,proto3" json:"original_still,omitempty"`
|
||||
// 15 second version of the GIF looping
|
||||
Looping *ImageFormat `protobuf:"bytes,18,opt,name=looping,proto3" json:"looping,omitempty"`
|
||||
// mp4 version of the GIF <50kb displaying first 1-2 secs
|
||||
Preview *ImageFormat `protobuf:"bytes,19,opt,name=preview,proto3" json:"preview,omitempty"`
|
||||
// Version of the GIF <50kb displaying first 1-2 secs
|
||||
PreviewGif *ImageFormat `protobuf:"bytes,20,opt,name=preview_gif,json=previewGif,proto3" json:"preview_gif,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ImageFormats) Reset() {
|
||||
*x = ImageFormats{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_proto_gifs_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ImageFormats) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ImageFormats) ProtoMessage() {}
|
||||
|
||||
func (x *ImageFormats) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_proto_gifs_proto_msgTypes[4]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ImageFormats.ProtoReflect.Descriptor instead.
|
||||
func (*ImageFormats) Descriptor() ([]byte, []int) {
|
||||
return file_proto_gifs_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *ImageFormats) GetOriginal() *ImageFormat {
|
||||
if x != nil {
|
||||
return x.Original
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *ImageFormats) GetDownsized() *ImageFormat {
|
||||
if x != nil {
|
||||
return x.Downsized
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *ImageFormats) GetFixedHeight() *ImageFormat {
|
||||
if x != nil {
|
||||
return x.FixedHeight
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *ImageFormats) GetFixedHeightStill() *ImageFormat {
|
||||
if x != nil {
|
||||
return x.FixedHeightStill
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *ImageFormats) GetFixedHeightDownsampled() *ImageFormat {
|
||||
if x != nil {
|
||||
return x.FixedHeightDownsampled
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *ImageFormats) GetFixedWidth() *ImageFormat {
|
||||
if x != nil {
|
||||
return x.FixedWidth
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *ImageFormats) GetFixedWidthStill() *ImageFormat {
|
||||
if x != nil {
|
||||
return x.FixedWidthStill
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *ImageFormats) GetFixedWidthDownsampled() *ImageFormat {
|
||||
if x != nil {
|
||||
return x.FixedWidthDownsampled
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *ImageFormats) GetFixedHeightSmall() *ImageFormat {
|
||||
if x != nil {
|
||||
return x.FixedHeightSmall
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *ImageFormats) GetFixedHeightSmallStill() *ImageFormat {
|
||||
if x != nil {
|
||||
return x.FixedHeightSmallStill
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *ImageFormats) GetFixedWidthSmall() *ImageFormat {
|
||||
if x != nil {
|
||||
return x.FixedWidthSmall
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *ImageFormats) GetFixedWidthSmallStill() *ImageFormat {
|
||||
if x != nil {
|
||||
return x.FixedWidthSmallStill
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *ImageFormats) GetDownsizedStill() *ImageFormat {
|
||||
if x != nil {
|
||||
return x.DownsizedStill
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *ImageFormats) GetDownsizedLarge() *ImageFormat {
|
||||
if x != nil {
|
||||
return x.DownsizedLarge
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *ImageFormats) GetDownsizedMedium() *ImageFormat {
|
||||
if x != nil {
|
||||
return x.DownsizedMedium
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *ImageFormats) GetDownsizedSmall() *ImageFormat {
|
||||
if x != nil {
|
||||
return x.DownsizedSmall
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *ImageFormats) GetOriginalStill() *ImageFormat {
|
||||
if x != nil {
|
||||
return x.OriginalStill
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *ImageFormats) GetLooping() *ImageFormat {
|
||||
if x != nil {
|
||||
return x.Looping
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *ImageFormats) GetPreview() *ImageFormat {
|
||||
if x != nil {
|
||||
return x.Preview
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *ImageFormats) GetPreviewGif() *ImageFormat {
|
||||
if x != nil {
|
||||
return x.PreviewGif
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type ImageFormat struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// height
|
||||
Height int32 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
|
||||
// width
|
||||
Width int32 `protobuf:"varint,2,opt,name=width,proto3" json:"width,omitempty"`
|
||||
// size in bytes
|
||||
Size int32 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"`
|
||||
// URL of the gif
|
||||
Url string `protobuf:"bytes,4,opt,name=url,proto3" json:"url,omitempty"`
|
||||
// URL to an MP4 version of the gif
|
||||
Mp4Url string `protobuf:"bytes,5,opt,name=mp4_url,json=mp4Url,proto3" json:"mp4_url,omitempty"`
|
||||
// size of the MP4 version
|
||||
Mp4Size int32 `protobuf:"varint,6,opt,name=mp4_size,json=mp4Size,proto3" json:"mp4_size,omitempty"`
|
||||
// URL to a webp version of the gif
|
||||
WebpUrl string `protobuf:"bytes,7,opt,name=webp_url,json=webpUrl,proto3" json:"webp_url,omitempty"`
|
||||
// size of the webp version
|
||||
WebpSize int32 `protobuf:"varint,8,opt,name=webp_size,json=webpSize,proto3" json:"webp_size,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ImageFormat) Reset() {
|
||||
*x = ImageFormat{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_proto_gifs_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ImageFormat) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ImageFormat) ProtoMessage() {}
|
||||
|
||||
func (x *ImageFormat) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_proto_gifs_proto_msgTypes[5]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ImageFormat.ProtoReflect.Descriptor instead.
|
||||
func (*ImageFormat) Descriptor() ([]byte, []int) {
|
||||
return file_proto_gifs_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
func (x *ImageFormat) GetHeight() int32 {
|
||||
if x != nil {
|
||||
return x.Height
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ImageFormat) GetWidth() int32 {
|
||||
if x != nil {
|
||||
return x.Width
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ImageFormat) GetSize() int32 {
|
||||
if x != nil {
|
||||
return x.Size
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ImageFormat) GetUrl() string {
|
||||
if x != nil {
|
||||
return x.Url
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ImageFormat) GetMp4Url() string {
|
||||
if x != nil {
|
||||
return x.Mp4Url
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ImageFormat) GetMp4Size() int32 {
|
||||
if x != nil {
|
||||
return x.Mp4Size
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ImageFormat) GetWebpUrl() string {
|
||||
if x != nil {
|
||||
return x.WebpUrl
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ImageFormat) GetWebpSize() int32 {
|
||||
if x != nil {
|
||||
return x.WebpSize
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
var File_proto_gifs_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_proto_gifs_proto_rawDesc = []byte{
|
||||
0x0a, 0x10, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x69, 0x66, 0x73, 0x2e, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x12, 0x04, 0x67, 0x69, 0x66, 0x73, 0x22, 0x7f, 0x0a, 0x0d, 0x53, 0x65, 0x61, 0x72,
|
||||
0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65,
|
||||
0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12,
|
||||
0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05,
|
||||
0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18,
|
||||
0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x16, 0x0a,
|
||||
0x06, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72,
|
||||
0x61, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x61, 0x6e, 0x67, 0x18, 0x05, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x04, 0x6c, 0x61, 0x6e, 0x67, 0x22, 0x61, 0x0a, 0x0e, 0x53, 0x65, 0x61,
|
||||
0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x04, 0x64,
|
||||
0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x67, 0x69, 0x66, 0x73,
|
||||
0x2e, 0x47, 0x69, 0x66, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x30, 0x0a, 0x0a, 0x70, 0x61,
|
||||
0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10,
|
||||
0x2e, 0x67, 0x69, 0x66, 0x73, 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x5b, 0x0a, 0x0a,
|
||||
0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66,
|
||||
0x66, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73,
|
||||
0x65, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x63, 0x6f, 0x75, 0x6e,
|
||||
0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f,
|
||||
0x75, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01,
|
||||
0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xe7, 0x01, 0x0a, 0x03, 0x47, 0x69,
|
||||
0x66, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69,
|
||||
0x64, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x6c, 0x75, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x04, 0x73, 0x6c, 0x75, 0x67, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x03, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x68, 0x6f, 0x72, 0x74,
|
||||
0x5f, 0x75, 0x72, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x68, 0x6f, 0x72,
|
||||
0x74, 0x55, 0x72, 0x6c, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x6d, 0x62, 0x65, 0x64, 0x5f, 0x75, 0x72,
|
||||
0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x6d, 0x62, 0x65, 0x64, 0x55, 0x72,
|
||||
0x6c, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x61, 0x74,
|
||||
0x69, 0x6e, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x61, 0x74, 0x69, 0x6e,
|
||||
0x67, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x69, 0x6d, 0x61, 0x67, 0x65,
|
||||
0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x69, 0x66, 0x73, 0x2e, 0x49,
|
||||
0x6d, 0x61, 0x67, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x73, 0x52, 0x06, 0x69, 0x6d, 0x61,
|
||||
0x67, 0x65, 0x73, 0x22, 0xc0, 0x09, 0x0a, 0x0c, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x46, 0x6f, 0x72,
|
||||
0x6d, 0x61, 0x74, 0x73, 0x12, 0x2d, 0x0a, 0x08, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x67, 0x69, 0x66, 0x73, 0x2e, 0x49, 0x6d,
|
||||
0x61, 0x67, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x52, 0x08, 0x6f, 0x72, 0x69, 0x67, 0x69,
|
||||
0x6e, 0x61, 0x6c, 0x12, 0x2f, 0x0a, 0x09, 0x64, 0x6f, 0x77, 0x6e, 0x73, 0x69, 0x7a, 0x65, 0x64,
|
||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x67, 0x69, 0x66, 0x73, 0x2e, 0x49, 0x6d,
|
||||
0x61, 0x67, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x52, 0x09, 0x64, 0x6f, 0x77, 0x6e, 0x73,
|
||||
0x69, 0x7a, 0x65, 0x64, 0x12, 0x34, 0x0a, 0x0c, 0x66, 0x69, 0x78, 0x65, 0x64, 0x5f, 0x68, 0x65,
|
||||
0x69, 0x67, 0x68, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x67, 0x69, 0x66,
|
||||
0x73, 0x2e, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x52, 0x0b, 0x66,
|
||||
0x69, 0x78, 0x65, 0x64, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x3f, 0x0a, 0x12, 0x66, 0x69,
|
||||
0x78, 0x65, 0x64, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x73, 0x74, 0x69, 0x6c, 0x6c,
|
||||
0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x67, 0x69, 0x66, 0x73, 0x2e, 0x49, 0x6d,
|
||||
0x61, 0x67, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x52, 0x10, 0x66, 0x69, 0x78, 0x65, 0x64,
|
||||
0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x53, 0x74, 0x69, 0x6c, 0x6c, 0x12, 0x4b, 0x0a, 0x18, 0x66,
|
||||
0x69, 0x78, 0x65, 0x64, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x64, 0x6f, 0x77, 0x6e,
|
||||
0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e,
|
||||
0x67, 0x69, 0x66, 0x73, 0x2e, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74,
|
||||
0x52, 0x16, 0x66, 0x69, 0x78, 0x65, 0x64, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x44, 0x6f, 0x77,
|
||||
0x6e, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x64, 0x12, 0x32, 0x0a, 0x0b, 0x66, 0x69, 0x78, 0x65,
|
||||
0x64, 0x5f, 0x77, 0x69, 0x64, 0x74, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e,
|
||||
0x67, 0x69, 0x66, 0x73, 0x2e, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74,
|
||||
0x52, 0x0a, 0x66, 0x69, 0x78, 0x65, 0x64, 0x57, 0x69, 0x64, 0x74, 0x68, 0x12, 0x3d, 0x0a, 0x11,
|
||||
0x66, 0x69, 0x78, 0x65, 0x64, 0x5f, 0x77, 0x69, 0x64, 0x74, 0x68, 0x5f, 0x73, 0x74, 0x69, 0x6c,
|
||||
0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x67, 0x69, 0x66, 0x73, 0x2e, 0x49,
|
||||
0x6d, 0x61, 0x67, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x52, 0x0f, 0x66, 0x69, 0x78, 0x65,
|
||||
0x64, 0x57, 0x69, 0x64, 0x74, 0x68, 0x53, 0x74, 0x69, 0x6c, 0x6c, 0x12, 0x49, 0x0a, 0x17, 0x66,
|
||||
0x69, 0x78, 0x65, 0x64, 0x5f, 0x77, 0x69, 0x64, 0x74, 0x68, 0x5f, 0x64, 0x6f, 0x77, 0x6e, 0x73,
|
||||
0x61, 0x6d, 0x70, 0x6c, 0x65, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x67,
|
||||
0x69, 0x66, 0x73, 0x2e, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x52,
|
||||
0x15, 0x66, 0x69, 0x78, 0x65, 0x64, 0x57, 0x69, 0x64, 0x74, 0x68, 0x44, 0x6f, 0x77, 0x6e, 0x73,
|
||||
0x61, 0x6d, 0x70, 0x6c, 0x65, 0x64, 0x12, 0x3f, 0x0a, 0x12, 0x66, 0x69, 0x78, 0x65, 0x64, 0x5f,
|
||||
0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x73, 0x6d, 0x61, 0x6c, 0x6c, 0x18, 0x09, 0x20, 0x01,
|
||||
0x28, 0x0b, 0x32, 0x11, 0x2e, 0x67, 0x69, 0x66, 0x73, 0x2e, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x46,
|
||||
0x6f, 0x72, 0x6d, 0x61, 0x74, 0x52, 0x10, 0x66, 0x69, 0x78, 0x65, 0x64, 0x48, 0x65, 0x69, 0x67,
|
||||
0x68, 0x74, 0x53, 0x6d, 0x61, 0x6c, 0x6c, 0x12, 0x4a, 0x0a, 0x18, 0x66, 0x69, 0x78, 0x65, 0x64,
|
||||
0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x73, 0x6d, 0x61, 0x6c, 0x6c, 0x5f, 0x73, 0x74,
|
||||
0x69, 0x6c, 0x6c, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x67, 0x69, 0x66, 0x73,
|
||||
0x2e, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x52, 0x15, 0x66, 0x69,
|
||||
0x78, 0x65, 0x64, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x53, 0x6d, 0x61, 0x6c, 0x6c, 0x53, 0x74,
|
||||
0x69, 0x6c, 0x6c, 0x12, 0x3d, 0x0a, 0x11, 0x66, 0x69, 0x78, 0x65, 0x64, 0x5f, 0x77, 0x69, 0x64,
|
||||
0x74, 0x68, 0x5f, 0x73, 0x6d, 0x61, 0x6c, 0x6c, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11,
|
||||
0x2e, 0x67, 0x69, 0x66, 0x73, 0x2e, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61,
|
||||
0x74, 0x52, 0x0f, 0x66, 0x69, 0x78, 0x65, 0x64, 0x57, 0x69, 0x64, 0x74, 0x68, 0x53, 0x6d, 0x61,
|
||||
0x6c, 0x6c, 0x12, 0x48, 0x0a, 0x17, 0x66, 0x69, 0x78, 0x65, 0x64, 0x5f, 0x77, 0x69, 0x64, 0x74,
|
||||
0x68, 0x5f, 0x73, 0x6d, 0x61, 0x6c, 0x6c, 0x5f, 0x73, 0x74, 0x69, 0x6c, 0x6c, 0x18, 0x0c, 0x20,
|
||||
0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x67, 0x69, 0x66, 0x73, 0x2e, 0x49, 0x6d, 0x61, 0x67, 0x65,
|
||||
0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x52, 0x14, 0x66, 0x69, 0x78, 0x65, 0x64, 0x57, 0x69, 0x64,
|
||||
0x74, 0x68, 0x53, 0x6d, 0x61, 0x6c, 0x6c, 0x53, 0x74, 0x69, 0x6c, 0x6c, 0x12, 0x3a, 0x0a, 0x0f,
|
||||
0x64, 0x6f, 0x77, 0x6e, 0x73, 0x69, 0x7a, 0x65, 0x64, 0x5f, 0x73, 0x74, 0x69, 0x6c, 0x6c, 0x18,
|
||||
0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x67, 0x69, 0x66, 0x73, 0x2e, 0x49, 0x6d, 0x61,
|
||||
0x67, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x52, 0x0e, 0x64, 0x6f, 0x77, 0x6e, 0x73, 0x69,
|
||||
0x7a, 0x65, 0x64, 0x53, 0x74, 0x69, 0x6c, 0x6c, 0x12, 0x3a, 0x0a, 0x0f, 0x64, 0x6f, 0x77, 0x6e,
|
||||
0x73, 0x69, 0x7a, 0x65, 0x64, 0x5f, 0x6c, 0x61, 0x72, 0x67, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28,
|
||||
0x0b, 0x32, 0x11, 0x2e, 0x67, 0x69, 0x66, 0x73, 0x2e, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x46, 0x6f,
|
||||
0x72, 0x6d, 0x61, 0x74, 0x52, 0x0e, 0x64, 0x6f, 0x77, 0x6e, 0x73, 0x69, 0x7a, 0x65, 0x64, 0x4c,
|
||||
0x61, 0x72, 0x67, 0x65, 0x12, 0x3c, 0x0a, 0x10, 0x64, 0x6f, 0x77, 0x6e, 0x73, 0x69, 0x7a, 0x65,
|
||||
0x64, 0x5f, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11,
|
||||
0x2e, 0x67, 0x69, 0x66, 0x73, 0x2e, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61,
|
||||
0x74, 0x52, 0x0f, 0x64, 0x6f, 0x77, 0x6e, 0x73, 0x69, 0x7a, 0x65, 0x64, 0x4d, 0x65, 0x64, 0x69,
|
||||
0x75, 0x6d, 0x12, 0x3a, 0x0a, 0x0f, 0x64, 0x6f, 0x77, 0x6e, 0x73, 0x69, 0x7a, 0x65, 0x64, 0x5f,
|
||||
0x73, 0x6d, 0x61, 0x6c, 0x6c, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x67, 0x69,
|
||||
0x66, 0x73, 0x2e, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x52, 0x0e,
|
||||
0x64, 0x6f, 0x77, 0x6e, 0x73, 0x69, 0x7a, 0x65, 0x64, 0x53, 0x6d, 0x61, 0x6c, 0x6c, 0x12, 0x38,
|
||||
0x0a, 0x0e, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x69, 0x6c, 0x6c,
|
||||
0x18, 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x67, 0x69, 0x66, 0x73, 0x2e, 0x49, 0x6d,
|
||||
0x61, 0x67, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x52, 0x0d, 0x6f, 0x72, 0x69, 0x67, 0x69,
|
||||
0x6e, 0x61, 0x6c, 0x53, 0x74, 0x69, 0x6c, 0x6c, 0x12, 0x2b, 0x0a, 0x07, 0x6c, 0x6f, 0x6f, 0x70,
|
||||
0x69, 0x6e, 0x67, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x67, 0x69, 0x66, 0x73,
|
||||
0x2e, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x52, 0x07, 0x6c, 0x6f,
|
||||
0x6f, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x2b, 0x0a, 0x07, 0x70, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77,
|
||||
0x18, 0x13, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x67, 0x69, 0x66, 0x73, 0x2e, 0x49, 0x6d,
|
||||
0x61, 0x67, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x52, 0x07, 0x70, 0x72, 0x65, 0x76, 0x69,
|
||||
0x65, 0x77, 0x12, 0x32, 0x0a, 0x0b, 0x70, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x5f, 0x67, 0x69,
|
||||
0x66, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x67, 0x69, 0x66, 0x73, 0x2e, 0x49,
|
||||
0x6d, 0x61, 0x67, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x52, 0x0a, 0x70, 0x72, 0x65, 0x76,
|
||||
0x69, 0x65, 0x77, 0x47, 0x69, 0x66, 0x22, 0xcd, 0x01, 0x0a, 0x0b, 0x49, 0x6d, 0x61, 0x67, 0x65,
|
||||
0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x14,
|
||||
0x0a, 0x05, 0x77, 0x69, 0x64, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x77,
|
||||
0x69, 0x64, 0x74, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01,
|
||||
0x28, 0x05, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18,
|
||||
0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x17, 0x0a, 0x07, 0x6d, 0x70,
|
||||
0x34, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x70, 0x34,
|
||||
0x55, 0x72, 0x6c, 0x12, 0x19, 0x0a, 0x08, 0x6d, 0x70, 0x34, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18,
|
||||
0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x6d, 0x70, 0x34, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x19,
|
||||
0x0a, 0x08, 0x77, 0x65, 0x62, 0x70, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x07, 0x77, 0x65, 0x62, 0x70, 0x55, 0x72, 0x6c, 0x12, 0x1b, 0x0a, 0x09, 0x77, 0x65, 0x62,
|
||||
0x70, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x77, 0x65,
|
||||
0x62, 0x70, 0x53, 0x69, 0x7a, 0x65, 0x32, 0x3d, 0x0a, 0x04, 0x47, 0x69, 0x66, 0x73, 0x12, 0x35,
|
||||
0x0a, 0x06, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x13, 0x2e, 0x67, 0x69, 0x66, 0x73, 0x2e,
|
||||
0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e,
|
||||
0x67, 0x69, 0x66, 0x73, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||
0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x0e, 0x5a, 0x0c, 0x2e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x3b, 0x67, 0x69, 0x66, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_proto_gifs_proto_rawDescOnce sync.Once
|
||||
file_proto_gifs_proto_rawDescData = file_proto_gifs_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_proto_gifs_proto_rawDescGZIP() []byte {
|
||||
file_proto_gifs_proto_rawDescOnce.Do(func() {
|
||||
file_proto_gifs_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_gifs_proto_rawDescData)
|
||||
})
|
||||
return file_proto_gifs_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_proto_gifs_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
|
||||
var file_proto_gifs_proto_goTypes = []interface{}{
|
||||
(*SearchRequest)(nil), // 0: gifs.SearchRequest
|
||||
(*SearchResponse)(nil), // 1: gifs.SearchResponse
|
||||
(*Pagination)(nil), // 2: gifs.Pagination
|
||||
(*Gif)(nil), // 3: gifs.Gif
|
||||
(*ImageFormats)(nil), // 4: gifs.ImageFormats
|
||||
(*ImageFormat)(nil), // 5: gifs.ImageFormat
|
||||
}
|
||||
var file_proto_gifs_proto_depIdxs = []int32{
|
||||
3, // 0: gifs.SearchResponse.data:type_name -> gifs.Gif
|
||||
2, // 1: gifs.SearchResponse.pagination:type_name -> gifs.Pagination
|
||||
4, // 2: gifs.Gif.images:type_name -> gifs.ImageFormats
|
||||
5, // 3: gifs.ImageFormats.original:type_name -> gifs.ImageFormat
|
||||
5, // 4: gifs.ImageFormats.downsized:type_name -> gifs.ImageFormat
|
||||
5, // 5: gifs.ImageFormats.fixed_height:type_name -> gifs.ImageFormat
|
||||
5, // 6: gifs.ImageFormats.fixed_height_still:type_name -> gifs.ImageFormat
|
||||
5, // 7: gifs.ImageFormats.fixed_height_downsampled:type_name -> gifs.ImageFormat
|
||||
5, // 8: gifs.ImageFormats.fixed_width:type_name -> gifs.ImageFormat
|
||||
5, // 9: gifs.ImageFormats.fixed_width_still:type_name -> gifs.ImageFormat
|
||||
5, // 10: gifs.ImageFormats.fixed_width_downsampled:type_name -> gifs.ImageFormat
|
||||
5, // 11: gifs.ImageFormats.fixed_height_small:type_name -> gifs.ImageFormat
|
||||
5, // 12: gifs.ImageFormats.fixed_height_small_still:type_name -> gifs.ImageFormat
|
||||
5, // 13: gifs.ImageFormats.fixed_width_small:type_name -> gifs.ImageFormat
|
||||
5, // 14: gifs.ImageFormats.fixed_width_small_still:type_name -> gifs.ImageFormat
|
||||
5, // 15: gifs.ImageFormats.downsized_still:type_name -> gifs.ImageFormat
|
||||
5, // 16: gifs.ImageFormats.downsized_large:type_name -> gifs.ImageFormat
|
||||
5, // 17: gifs.ImageFormats.downsized_medium:type_name -> gifs.ImageFormat
|
||||
5, // 18: gifs.ImageFormats.downsized_small:type_name -> gifs.ImageFormat
|
||||
5, // 19: gifs.ImageFormats.original_still:type_name -> gifs.ImageFormat
|
||||
5, // 20: gifs.ImageFormats.looping:type_name -> gifs.ImageFormat
|
||||
5, // 21: gifs.ImageFormats.preview:type_name -> gifs.ImageFormat
|
||||
5, // 22: gifs.ImageFormats.preview_gif:type_name -> gifs.ImageFormat
|
||||
0, // 23: gifs.Gifs.Search:input_type -> gifs.SearchRequest
|
||||
1, // 24: gifs.Gifs.Search:output_type -> gifs.SearchResponse
|
||||
24, // [24:25] is the sub-list for method output_type
|
||||
23, // [23:24] is the sub-list for method input_type
|
||||
23, // [23:23] is the sub-list for extension type_name
|
||||
23, // [23:23] is the sub-list for extension extendee
|
||||
0, // [0:23] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_proto_gifs_proto_init() }
|
||||
func file_proto_gifs_proto_init() {
|
||||
if File_proto_gifs_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_proto_gifs_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*SearchRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_proto_gifs_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*SearchResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_proto_gifs_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*Pagination); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_proto_gifs_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*Gif); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_proto_gifs_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ImageFormats); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_proto_gifs_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ImageFormat); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_proto_gifs_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 6,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_proto_gifs_proto_goTypes,
|
||||
DependencyIndexes: file_proto_gifs_proto_depIdxs,
|
||||
MessageInfos: file_proto_gifs_proto_msgTypes,
|
||||
}.Build()
|
||||
File_proto_gifs_proto = out.File
|
||||
file_proto_gifs_proto_rawDesc = nil
|
||||
file_proto_gifs_proto_goTypes = nil
|
||||
file_proto_gifs_proto_depIdxs = nil
|
||||
}
|
||||
93
gifs/proto/gifs.pb.micro.go
Normal file
93
gifs/proto/gifs.pb.micro.go
Normal file
@@ -0,0 +1,93 @@
|
||||
// Code generated by protoc-gen-micro. DO NOT EDIT.
|
||||
// source: proto/gifs.proto
|
||||
|
||||
package gifs
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
math "math"
|
||||
)
|
||||
|
||||
import (
|
||||
context "context"
|
||||
api "github.com/micro/micro/v3/service/api"
|
||||
client "github.com/micro/micro/v3/service/client"
|
||||
server "github.com/micro/micro/v3/service/server"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the proto package it is being compiled against.
|
||||
// A compilation error at this line likely means your copy of the
|
||||
// proto package needs to be updated.
|
||||
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ api.Endpoint
|
||||
var _ context.Context
|
||||
var _ client.Option
|
||||
var _ server.Option
|
||||
|
||||
// Api Endpoints for Gifs service
|
||||
|
||||
func NewGifsEndpoints() []*api.Endpoint {
|
||||
return []*api.Endpoint{}
|
||||
}
|
||||
|
||||
// Client API for Gifs service
|
||||
|
||||
type GifsService interface {
|
||||
Search(ctx context.Context, in *SearchRequest, opts ...client.CallOption) (*SearchResponse, error)
|
||||
}
|
||||
|
||||
type gifsService struct {
|
||||
c client.Client
|
||||
name string
|
||||
}
|
||||
|
||||
func NewGifsService(name string, c client.Client) GifsService {
|
||||
return &gifsService{
|
||||
c: c,
|
||||
name: name,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *gifsService) Search(ctx context.Context, in *SearchRequest, opts ...client.CallOption) (*SearchResponse, error) {
|
||||
req := c.c.NewRequest(c.name, "Gifs.Search", in)
|
||||
out := new(SearchResponse)
|
||||
err := c.c.Call(ctx, req, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// Server API for Gifs service
|
||||
|
||||
type GifsHandler interface {
|
||||
Search(context.Context, *SearchRequest, *SearchResponse) error
|
||||
}
|
||||
|
||||
func RegisterGifsHandler(s server.Server, hdlr GifsHandler, opts ...server.HandlerOption) error {
|
||||
type gifs interface {
|
||||
Search(ctx context.Context, in *SearchRequest, out *SearchResponse) error
|
||||
}
|
||||
type Gifs struct {
|
||||
gifs
|
||||
}
|
||||
h := &gifsHandler{hdlr}
|
||||
return s.Handle(s.NewHandler(&Gifs{h}, opts...))
|
||||
}
|
||||
|
||||
type gifsHandler struct {
|
||||
GifsHandler
|
||||
}
|
||||
|
||||
func (h *gifsHandler) Search(ctx context.Context, in *SearchRequest, out *SearchResponse) error {
|
||||
return h.GifsHandler.Search(ctx, in, out)
|
||||
}
|
||||
126
gifs/proto/gifs.proto
Normal file
126
gifs/proto/gifs.proto
Normal file
@@ -0,0 +1,126 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package gifs;
|
||||
|
||||
option go_package = "./proto;gifs";
|
||||
|
||||
service Gifs {
|
||||
rpc Search(SearchRequest) returns (SearchResponse) {}
|
||||
}
|
||||
|
||||
// Search for a gif
|
||||
message SearchRequest {
|
||||
// The search term
|
||||
string query = 1;
|
||||
// Max number of gifs to return. Defaults to 25
|
||||
int32 limit = 2;
|
||||
// The start position of results (used with pagination)
|
||||
int32 offset = 3;
|
||||
// Apply age related content filter. "g", "pg", "pg-13", or "r". Defaults to "g"
|
||||
string rating = 4;
|
||||
// ISO 2 letter language code for regional content
|
||||
string lang = 5;
|
||||
}
|
||||
|
||||
message SearchResponse {
|
||||
// list of results
|
||||
repeated Gif data = 1;
|
||||
// information on pagination
|
||||
Pagination pagination = 2;
|
||||
}
|
||||
|
||||
message Pagination {
|
||||
// position in pagination
|
||||
int32 offset = 1;
|
||||
// total number of results available
|
||||
int32 total_count = 2;
|
||||
// total number returned in this response
|
||||
int32 count = 3;
|
||||
|
||||
}
|
||||
|
||||
message Gif {
|
||||
// The ID of the GIF
|
||||
string id = 1;
|
||||
// The slug used in the GIF's URL
|
||||
string slug = 2;
|
||||
// The URL for this GIF
|
||||
string url = 3;
|
||||
// A short URL for this GIF
|
||||
string short_url = 4;
|
||||
// URL used for embedding the GIF
|
||||
string embed_url = 5;
|
||||
// The page on which this GIF was found
|
||||
string source = 6;
|
||||
// The content rating for the GIF
|
||||
string rating = 7;
|
||||
// The title for this GIF
|
||||
string title = 8;
|
||||
// The different formats available for this GIF
|
||||
ImageFormats images = 9;
|
||||
}
|
||||
|
||||
// A map of different formats (or renditions) of a GIF. See https://developers.giphy.com/docs/optional-settings#rendition-guide
|
||||
message ImageFormats {
|
||||
// The original GIF. Good for desktop use
|
||||
ImageFormat original = 1;
|
||||
// A downsized version of the GIF < 2MB
|
||||
ImageFormat downsized = 2;
|
||||
// Version of the GIF with fixed height of 200 pixels. Good for mobile use
|
||||
ImageFormat fixed_height = 3;
|
||||
// Static image of the GIF with fixed height of 200 pixels
|
||||
ImageFormat fixed_height_still = 4;
|
||||
// Version of the GIF with fixed height of 200 pixels and number of frames reduced to 6
|
||||
ImageFormat fixed_height_downsampled = 5;
|
||||
// Version of the GIF with fixed width of 200 pixels. Good for mobile use
|
||||
ImageFormat fixed_width = 6;
|
||||
// Static image of the GIF with fixed width of 200 pixels
|
||||
ImageFormat fixed_width_still = 7;
|
||||
// Version of the GIF with fixed width of 200 pixels and number of frames reduced to 6
|
||||
ImageFormat fixed_width_downsampled = 8;
|
||||
// Version of the GIF with fixed height of 100 pixels. Good for mobile keyboards
|
||||
ImageFormat fixed_height_small = 9;
|
||||
// Static image of the GIF with fixed height of 100 pixels
|
||||
ImageFormat fixed_height_small_still = 10;
|
||||
// Version of the GIF with fixed width of 100 pixels. Good for mobile keyboards
|
||||
ImageFormat fixed_width_small = 11;
|
||||
// Static image of the GIF with fixed width of 100 pixels
|
||||
ImageFormat fixed_width_small_still = 12;
|
||||
// Static image of the downsized version of the GIF
|
||||
ImageFormat downsized_still = 13;
|
||||
// A downsized version of the GIF < 8MB
|
||||
ImageFormat downsized_large = 14;
|
||||
// A downsized version of the GIF < 5MB
|
||||
ImageFormat downsized_medium = 15;
|
||||
// A downsized version of the GIF < 200kb
|
||||
ImageFormat downsized_small = 16;
|
||||
// Static image of the original version of the GIF
|
||||
ImageFormat original_still = 17;
|
||||
// 15 second version of the GIF looping
|
||||
ImageFormat looping = 18;
|
||||
// mp4 version of the GIF <50kb displaying first 1-2 secs
|
||||
ImageFormat preview = 19;
|
||||
// Version of the GIF <50kb displaying first 1-2 secs
|
||||
ImageFormat preview_gif = 20;
|
||||
|
||||
}
|
||||
|
||||
message ImageFormat {
|
||||
// height
|
||||
int32 height = 1;
|
||||
// width
|
||||
int32 width = 2;
|
||||
// size in bytes
|
||||
int32 size = 3;
|
||||
// URL of the gif
|
||||
string url = 4;
|
||||
// URL to an MP4 version of the gif
|
||||
string mp4_url = 5;
|
||||
// size of the MP4 version
|
||||
int32 mp4_size = 6;
|
||||
// URL to a webp version of the gif
|
||||
string webp_url = 7;
|
||||
// size of the webp version
|
||||
int32 webp_size = 8;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user