media

package
v0.0.0-...-a23a89c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 25, 2024 License: MIT Imports: 9 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_media_proto protoreflect.FileDescriptor
View Source
var MediaService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "media.MediaService",
	HandlerType: (*MediaServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetMediaByUrl",
			Handler:    _MediaService_GetMediaByUrl_Handler,
		},
		{
			MethodName: "SearchMedias",
			Handler:    _MediaService_SearchMedias_Handler,
		},
		{
			MethodName: "GetMedias",
			Handler:    _MediaService_GetMedias_Handler,
		},
		{
			MethodName: "CreateMedia",
			Handler:    _MediaService_CreateMedia_Handler,
		},
		{
			MethodName: "EditMedia",
			Handler:    _MediaService_EditMedia_Handler,
		},
		{
			MethodName: "SetMediaThumbnail",
			Handler:    _MediaService_SetMediaThumbnail_Handler,
		},
		{
			MethodName: "DeleteMedia",
			Handler:    _MediaService_DeleteMedia_Handler,
		},
		{
			MethodName: "AddTagToMedia",
			Handler:    _MediaService_AddTagToMedia_Handler,
		},
		{
			MethodName: "RemoveTagFromMedia",
			Handler:    _MediaService_RemoveTagFromMedia_Handler,
		},
		{
			MethodName: "CreateLikeMedia",
			Handler:    _MediaService_CreateLikeMedia_Handler,
		},
		{
			MethodName: "DeleteLikeMedia",
			Handler:    _MediaService_DeleteLikeMedia_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "media.proto",
}

MediaService_ServiceDesc is the grpc.ServiceDesc for MediaService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterMediaServiceServer

func RegisterMediaServiceServer(s grpc.ServiceRegistrar, srv MediaServiceServer)

Types

type EidtMediaData

type EidtMediaData struct {
	Title         string           `protobuf:"bytes,1,opt,name=Title,proto3" json:"Title,omitempty"`
	Text          string           `protobuf:"bytes,2,opt,name=Text,proto3" json:"Text,omitempty"`
	Url           string           `protobuf:"bytes,3,opt,name=Url,proto3" json:"Url,omitempty"`
	CurrentUserId int64            `protobuf:"varint,4,opt,name=CurrentUserId,proto3" json:"CurrentUserId,omitempty"`
	TypeId        helper.MediaType `protobuf:"varint,5,opt,name=TypeId,proto3,enum=helper.MediaType" json:"TypeId,omitempty"` //0:video 1:music 2:photo
	// contains filtered or unexported fields
}

func (*EidtMediaData) Descriptor deprecated

func (*EidtMediaData) Descriptor() ([]byte, []int)

Deprecated: Use EidtMediaData.ProtoReflect.Descriptor instead.

func (*EidtMediaData) GetCurrentUserId

func (x *EidtMediaData) GetCurrentUserId() int64

func (*EidtMediaData) GetText

func (x *EidtMediaData) GetText() string

func (*EidtMediaData) GetTitle

func (x *EidtMediaData) GetTitle() string

func (*EidtMediaData) GetTypeId

func (x *EidtMediaData) GetTypeId() helper.MediaType

func (*EidtMediaData) GetUrl

func (x *EidtMediaData) GetUrl() string

func (*EidtMediaData) ProtoMessage

func (*EidtMediaData) ProtoMessage()

func (*EidtMediaData) ProtoReflect

func (x *EidtMediaData) ProtoReflect() protoreflect.Message

func (*EidtMediaData) Reset

func (x *EidtMediaData) Reset()

func (*EidtMediaData) String

func (x *EidtMediaData) String() string

type MediaData

type MediaData struct {
	Title               string `protobuf:"bytes,1,opt,name=Title,json=title,proto3" json:"Title,omitempty"`
	Text                string `protobuf:"bytes,2,opt,name=Text,json=description,proto3" json:"Text,omitempty"`
	Url                 string `protobuf:"bytes,3,opt,name=Url,json=url,proto3" json:"Url,omitempty"`
	Type                string `protobuf:"bytes,4,opt,name=Type,json=type,proto3" json:"Type,omitempty"`
	CreatedAt           int64  `protobuf:"varint,5,opt,name=CreatedAt,json=created_at_unix,proto3" json:"CreatedAt,omitempty"`
	UpdatedAt           int64  `protobuf:"varint,6,opt,name=UpdatedAt,json=updated_at_unix,proto3" json:"UpdatedAt,omitempty"`
	Thumbnail           string `protobuf:"bytes,7,opt,name=Thumbnail,json=thumbnail,proto3" json:"Thumbnail,omitempty"`
	CreatorUsername     string `protobuf:"bytes,8,opt,name=CreatorUsername,json=creator_username,proto3" json:"CreatorUsername,omitempty"`
	CreatorProfile      string `protobuf:"bytes,9,opt,name=CreatorProfile,json=creator_profile,proto3" json:"CreatorProfile,omitempty"`
	ChannelName         string `protobuf:"bytes,10,opt,name=ChannelName,json=creator_channel_name,proto3" json:"ChannelName,omitempty"`
	Tags                string `protobuf:"bytes,11,opt,name=Tags,json=tags,proto3" json:"Tags,omitempty"`
	UserSubscribesCount int64  `protobuf:"varint,12,opt,name=UserSubscribesCount,json=creator_subscribers_count,proto3" json:"UserSubscribesCount,omitempty"`
	ViewsCount          int64  `protobuf:"varint,13,opt,name=ViewsCount,json=views_count,proto3" json:"ViewsCount,omitempty"`
	LikesCount          int64  `protobuf:"varint,14,opt,name=LikesCount,json=likes_count,proto3" json:"LikesCount,omitempty"`
	DislikesCount       int64  `protobuf:"varint,15,opt,name=DislikesCount,json=dislikes_count,proto3" json:"DislikesCount,omitempty"`
	CommentsCount       int64  `protobuf:"varint,16,opt,name=CommentsCount,json=comments_count,proto3" json:"CommentsCount,omitempty"`
	UserLike            string `protobuf:"bytes,17,opt,name=UserLike,json=current_user_like,proto3" json:"UserLike,omitempty"`
	IsUserSubbed        bool   `protobuf:"varint,18,opt,name=IsUserSubbed,json=is_curretn_user_subbed,proto3" json:"IsUserSubbed,omitempty"`
	// contains filtered or unexported fields
}

func (*MediaData) Descriptor deprecated

func (*MediaData) Descriptor() ([]byte, []int)

Deprecated: Use MediaData.ProtoReflect.Descriptor instead.

func (*MediaData) GetChannelName

func (x *MediaData) GetChannelName() string

func (*MediaData) GetCommentsCount

func (x *MediaData) GetCommentsCount() int64

func (*MediaData) GetCreatedAt

func (x *MediaData) GetCreatedAt() int64

func (*MediaData) GetCreatorProfile

func (x *MediaData) GetCreatorProfile() string

func (*MediaData) GetCreatorUsername

func (x *MediaData) GetCreatorUsername() string

func (*MediaData) GetDislikesCount

func (x *MediaData) GetDislikesCount() int64

func (*MediaData) GetIsUserSubbed

func (x *MediaData) GetIsUserSubbed() bool

func (*MediaData) GetLikesCount

func (x *MediaData) GetLikesCount() int64

func (*MediaData) GetTags

func (x *MediaData) GetTags() string

func (*MediaData) GetText

func (x *MediaData) GetText() string

func (*MediaData) GetThumbnail

func (x *MediaData) GetThumbnail() string

func (*MediaData) GetTitle

func (x *MediaData) GetTitle() string

func (*MediaData) GetType

func (x *MediaData) GetType() string

func (*MediaData) GetUpdatedAt

func (x *MediaData) GetUpdatedAt() int64

func (*MediaData) GetUrl

func (x *MediaData) GetUrl() string

func (*MediaData) GetUserLike

func (x *MediaData) GetUserLike() string

func (*MediaData) GetUserSubscribesCount

func (x *MediaData) GetUserSubscribesCount() int64

func (*MediaData) GetViewsCount

func (x *MediaData) GetViewsCount() int64

func (*MediaData) ProtoMessage

func (*MediaData) ProtoMessage()

func (*MediaData) ProtoReflect

func (x *MediaData) ProtoReflect() protoreflect.Message

func (*MediaData) Reset

func (x *MediaData) Reset()

func (*MediaData) String

func (x *MediaData) String() string

type MediaReq

type MediaReq struct {
	Type helper.MediaType `protobuf:"varint,1,opt,name=Type,proto3,enum=helper.MediaType" json:"Type,omitempty"`
	Page *helper.Paging   `protobuf:"bytes,2,opt,name=Page,proto3" json:"Page,omitempty"`
	// int32 PerPage = 2; // limit
	// int32 PageNumber = 3; // offset
	UserName   string          `protobuf:"bytes,3,opt,name=UserName,proto3" json:"UserName,omitempty"`
	Sort       helper.SortType `protobuf:"varint,4,opt,name=Sort,proto3,enum=helper.SortType" json:"Sort,omitempty"`
	SearchTerm string          `protobuf:"bytes,5,opt,name=SearchTerm,proto3" json:"SearchTerm,omitempty"` // bool isAllTypes = 6;
	// contains filtered or unexported fields
}

func (*MediaReq) Descriptor deprecated

func (*MediaReq) Descriptor() ([]byte, []int)

Deprecated: Use MediaReq.ProtoReflect.Descriptor instead.

func (*MediaReq) GetPage

func (x *MediaReq) GetPage() *helper.Paging

func (*MediaReq) GetSearchTerm

func (x *MediaReq) GetSearchTerm() string

func (*MediaReq) GetSort

func (x *MediaReq) GetSort() helper.SortType

func (*MediaReq) GetType

func (x *MediaReq) GetType() helper.MediaType

func (*MediaReq) GetUserName

func (x *MediaReq) GetUserName() string

func (*MediaReq) ProtoMessage

func (*MediaReq) ProtoMessage()

func (*MediaReq) ProtoReflect

func (x *MediaReq) ProtoReflect() protoreflect.Message

func (*MediaReq) Reset

func (x *MediaReq) Reset()

func (*MediaReq) String

func (x *MediaReq) String() string

type MediaServiceClient

type MediaServiceClient interface {
	GetMediaByUrl(ctx context.Context, in *MediaUrl, opts ...grpc.CallOption) (*Response, error)
	SearchMedias(ctx context.Context, in *MediaReq, opts ...grpc.CallOption) (*Response, error)
	GetMedias(ctx context.Context, in *MediaReq, opts ...grpc.CallOption) (*Response, error)
	CreateMedia(ctx context.Context, in *EidtMediaData, opts ...grpc.CallOption) (*Response, error)
	EditMedia(ctx context.Context, in *EidtMediaData, opts ...grpc.CallOption) (*Response, error)
	SetMediaThumbnail(ctx context.Context, in *EidtMediaData, opts ...grpc.CallOption) (*Response, error)
	DeleteMedia(ctx context.Context, in *EidtMediaData, opts ...grpc.CallOption) (*Response, error)
	AddTagToMedia(ctx context.Context, in *TagMedia, opts ...grpc.CallOption) (*Response, error)
	RemoveTagFromMedia(ctx context.Context, in *TagMedia, opts ...grpc.CallOption) (*Response, error)
	CreateLikeMedia(ctx context.Context, in *helper.LikeReq, opts ...grpc.CallOption) (*Response, error)
	DeleteLikeMedia(ctx context.Context, in *helper.LikeReq, opts ...grpc.CallOption) (*Response, error)
}

MediaServiceClient is the client API for MediaService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type MediaServiceServer

type MediaServiceServer interface {
	GetMediaByUrl(context.Context, *MediaUrl) (*Response, error)
	SearchMedias(context.Context, *MediaReq) (*Response, error)
	GetMedias(context.Context, *MediaReq) (*Response, error)
	CreateMedia(context.Context, *EidtMediaData) (*Response, error)
	EditMedia(context.Context, *EidtMediaData) (*Response, error)
	SetMediaThumbnail(context.Context, *EidtMediaData) (*Response, error)
	DeleteMedia(context.Context, *EidtMediaData) (*Response, error)
	AddTagToMedia(context.Context, *TagMedia) (*Response, error)
	RemoveTagFromMedia(context.Context, *TagMedia) (*Response, error)
	CreateLikeMedia(context.Context, *helper.LikeReq) (*Response, error)
	DeleteLikeMedia(context.Context, *helper.LikeReq) (*Response, error)
	// contains filtered or unexported methods
}

MediaServiceServer is the server API for MediaService service. All implementations must embed UnimplementedMediaServiceServer for forward compatibility

type MediaShortData

type MediaShortData struct {
	Title           string `protobuf:"bytes,1,opt,name=Title,json=title,proto3" json:"Title,omitempty"`
	Url             string `protobuf:"bytes,2,opt,name=Url,json=url,proto3" json:"Url,omitempty"`
	CreatorUsername string `protobuf:"bytes,3,opt,name=CreatorUsername,json=creator_username,proto3" json:"CreatorUsername,omitempty"`
	ChannelName     string `protobuf:"bytes,4,opt,name=ChannelName,json=creator_channel_name,proto3" json:"ChannelName,omitempty"`
	ViewsCount      int64  `protobuf:"varint,5,opt,name=ViewsCount,json=views_count,proto3" json:"ViewsCount,omitempty"`
	CreatedAt       int64  `protobuf:"varint,6,opt,name=CreatedAt,json=created_at_unix,proto3" json:"CreatedAt,omitempty"`
	UserLike        string `protobuf:"bytes,7,opt,name=UserLike,json=current_user_like,proto3" json:"UserLike,omitempty"`
	MediaType       string `protobuf:"bytes,8,opt,name=MediaType,json=type,proto3" json:"MediaType,omitempty"`
	Thumbnail       string `protobuf:"bytes,9,opt,name=Thumbnail,json=thumbnail,proto3" json:"Thumbnail,omitempty"`
	CreatorProfile  string `protobuf:"bytes,10,opt,name=CreatorProfile,json=creator_profile,proto3" json:"CreatorProfile,omitempty"`
	// contains filtered or unexported fields
}

func (*MediaShortData) Descriptor deprecated

func (*MediaShortData) Descriptor() ([]byte, []int)

Deprecated: Use MediaShortData.ProtoReflect.Descriptor instead.

func (*MediaShortData) GetChannelName

func (x *MediaShortData) GetChannelName() string

func (*MediaShortData) GetCreatedAt

func (x *MediaShortData) GetCreatedAt() int64

func (*MediaShortData) GetCreatorProfile

func (x *MediaShortData) GetCreatorProfile() string

func (*MediaShortData) GetCreatorUsername

func (x *MediaShortData) GetCreatorUsername() string

func (*MediaShortData) GetMediaType

func (x *MediaShortData) GetMediaType() string

func (*MediaShortData) GetThumbnail

func (x *MediaShortData) GetThumbnail() string

func (*MediaShortData) GetTitle

func (x *MediaShortData) GetTitle() string

func (*MediaShortData) GetUrl

func (x *MediaShortData) GetUrl() string

func (*MediaShortData) GetUserLike

func (x *MediaShortData) GetUserLike() string

func (*MediaShortData) GetViewsCount

func (x *MediaShortData) GetViewsCount() int64

func (*MediaShortData) ProtoMessage

func (*MediaShortData) ProtoMessage()

func (*MediaShortData) ProtoReflect

func (x *MediaShortData) ProtoReflect() protoreflect.Message

func (*MediaShortData) Reset

func (x *MediaShortData) Reset()

func (*MediaShortData) String

func (x *MediaShortData) String() string

type MediaUrl

type MediaUrl struct {
	MediaUrl      string `protobuf:"bytes,1,opt,name=MediaUrl,proto3" json:"MediaUrl,omitempty"`
	CurrentUserId int64  `protobuf:"varint,2,opt,name=CurrentUserId,proto3" json:"CurrentUserId,omitempty"`
	// contains filtered or unexported fields
}

func (*MediaUrl) Descriptor deprecated

func (*MediaUrl) Descriptor() ([]byte, []int)

Deprecated: Use MediaUrl.ProtoReflect.Descriptor instead.

func (*MediaUrl) GetCurrentUserId

func (x *MediaUrl) GetCurrentUserId() int64

func (*MediaUrl) GetMediaUrl

func (x *MediaUrl) GetMediaUrl() string

func (*MediaUrl) ProtoMessage

func (*MediaUrl) ProtoMessage()

func (*MediaUrl) ProtoReflect

func (x *MediaUrl) ProtoReflect() protoreflect.Message

func (*MediaUrl) Reset

func (x *MediaUrl) Reset()

func (*MediaUrl) String

func (x *MediaUrl) String() string

type MediasData

type MediasData struct {
	Medias    []*MediaShortData `protobuf:"bytes,1,rep,name=Medias,json=medias,proto3" json:"Medias,omitempty"`
	PagesInfo *helper.PagesInfo `protobuf:"bytes,2,opt,name=PagesInfo,json=pages_info,proto3" json:"PagesInfo,omitempty"`
	// contains filtered or unexported fields
}

func (*MediasData) Descriptor deprecated

func (*MediasData) Descriptor() ([]byte, []int)

Deprecated: Use MediasData.ProtoReflect.Descriptor instead.

func (*MediasData) GetMedias

func (x *MediasData) GetMedias() []*MediaShortData

func (*MediasData) GetPagesInfo

func (x *MediasData) GetPagesInfo() *helper.PagesInfo

func (*MediasData) ProtoMessage

func (*MediasData) ProtoMessage()

func (*MediasData) ProtoReflect

func (x *MediasData) ProtoReflect() protoreflect.Message

func (*MediasData) Reset

func (x *MediasData) Reset()

func (*MediasData) String

func (x *MediasData) String() string

type Response

type Response struct {

	// Types that are assignable to Res:
	//
	//	*Response_Media
	//	*Response_Err
	//	*Response_Empty
	//	*Response_Medias
	Res isResponse_Res `protobuf_oneof:"Res"`
	// contains filtered or unexported fields
}

func (*Response) Descriptor deprecated

func (*Response) Descriptor() ([]byte, []int)

Deprecated: Use Response.ProtoReflect.Descriptor instead.

func (*Response) GetEmpty

func (x *Response) GetEmpty() *helper.Empty

func (*Response) GetErr

func (x *Response) GetErr() *helper.HttpError

func (*Response) GetMedia

func (x *Response) GetMedia() *MediaData

func (*Response) GetMedias

func (x *Response) GetMedias() *MediasData

func (*Response) GetRes

func (m *Response) GetRes() isResponse_Res

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) ProtoReflect

func (x *Response) ProtoReflect() protoreflect.Message

func (*Response) Reset

func (x *Response) Reset()

func (*Response) String

func (x *Response) String() string

type Response_Empty

type Response_Empty struct {
	Empty *helper.Empty `protobuf:"bytes,3,opt,name=empty,proto3,oneof"`
}

type Response_Err

type Response_Err struct {
	Err *helper.HttpError `protobuf:"bytes,2,opt,name=Err,proto3,oneof"`
}

type Response_Media

type Response_Media struct {
	Media *MediaData `protobuf:"bytes,1,opt,name=Media,proto3,oneof"`
}

type Response_Medias

type Response_Medias struct {
	Medias *MediasData `protobuf:"bytes,4,opt,name=Medias,proto3,oneof"` // UserApikey UserApi=2;
}

type TagMedia

type TagMedia struct {
	TagName       string `protobuf:"bytes,1,opt,name=TagName,proto3" json:"TagName,omitempty"`
	MediaUrl      string `protobuf:"bytes,2,opt,name=MediaUrl,proto3" json:"MediaUrl,omitempty"`
	CurrentUserId int64  `protobuf:"varint,3,opt,name=CurrentUserId,proto3" json:"CurrentUserId,omitempty"`
	// contains filtered or unexported fields
}

func (*TagMedia) Descriptor deprecated

func (*TagMedia) Descriptor() ([]byte, []int)

Deprecated: Use TagMedia.ProtoReflect.Descriptor instead.

func (*TagMedia) GetCurrentUserId

func (x *TagMedia) GetCurrentUserId() int64

func (*TagMedia) GetMediaUrl

func (x *TagMedia) GetMediaUrl() string

func (*TagMedia) GetTagName

func (x *TagMedia) GetTagName() string

func (*TagMedia) ProtoMessage

func (*TagMedia) ProtoMessage()

func (*TagMedia) ProtoReflect

func (x *TagMedia) ProtoReflect() protoreflect.Message

func (*TagMedia) Reset

func (x *TagMedia) Reset()

func (*TagMedia) String

func (x *TagMedia) String() string

type UnimplementedMediaServiceServer

type UnimplementedMediaServiceServer struct {
}

UnimplementedMediaServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedMediaServiceServer) AddTagToMedia

func (UnimplementedMediaServiceServer) CreateLikeMedia

func (UnimplementedMediaServiceServer) CreateMedia

func (UnimplementedMediaServiceServer) DeleteLikeMedia

func (UnimplementedMediaServiceServer) DeleteMedia

func (UnimplementedMediaServiceServer) EditMedia

func (UnimplementedMediaServiceServer) GetMediaByUrl

func (UnimplementedMediaServiceServer) GetMedias

func (UnimplementedMediaServiceServer) RemoveTagFromMedia

func (UnimplementedMediaServiceServer) SearchMedias

func (UnimplementedMediaServiceServer) SetMediaThumbnail

type UnsafeMediaServiceServer

type UnsafeMediaServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeMediaServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to MediaServiceServer will result in compilation errors.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL