trackProto

package
v0.0.0-...-704a905 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_track_trackProto_track_proto protoreflect.FileDescriptor
View Source
var TrackUseCase_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "track.TrackUseCase",
	HandlerType: (*TrackUseCaseServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetAll",
			Handler:    _TrackUseCase_GetAll_Handler,
		},
		{
			MethodName: "GetLastId",
			Handler:    _TrackUseCase_GetLastId_Handler,
		},
		{
			MethodName: "Create",
			Handler:    _TrackUseCase_Create_Handler,
		},
		{
			MethodName: "Update",
			Handler:    _TrackUseCase_Update_Handler,
		},
		{
			MethodName: "Delete",
			Handler:    _TrackUseCase_Delete_Handler,
		},
		{
			MethodName: "GetById",
			Handler:    _TrackUseCase_GetById_Handler,
		},
		{
			MethodName: "GetPopular",
			Handler:    _TrackUseCase_GetPopular_Handler,
		},
		{
			MethodName: "GetTracksFromAlbum",
			Handler:    _TrackUseCase_GetTracksFromAlbum_Handler,
		},
		{
			MethodName: "GetTracksFromPlaylist",
			Handler:    _TrackUseCase_GetTracksFromPlaylist_Handler,
		},
		{
			MethodName: "GetPopularTracksFromArtist",
			Handler:    _TrackUseCase_GetPopularTracksFromArtist_Handler,
		},
		{
			MethodName: "GetSize",
			Handler:    _TrackUseCase_GetSize_Handler,
		},
		{
			MethodName: "Like",
			Handler:    _TrackUseCase_Like_Handler,
		},
		{
			MethodName: "LikeCheckByUser",
			Handler:    _TrackUseCase_LikeCheckByUser_Handler,
		},
		{
			MethodName: "Listen",
			Handler:    _TrackUseCase_Listen_Handler,
		},
		{
			MethodName: "SearchByTitle",
			Handler:    _TrackUseCase_SearchByTitle_Handler,
		},
		{
			MethodName: "GetFavorites",
			Handler:    _TrackUseCase_GetFavorites_Handler,
		},
		{
			MethodName: "AddToFavorites",
			Handler:    _TrackUseCase_AddToFavorites_Handler,
		},
		{
			MethodName: "RemoveFromFavorites",
			Handler:    _TrackUseCase_RemoveFromFavorites_Handler,
		},
		{
			MethodName: "GetPopularTrackOfWeekTop20",
			Handler:    _TrackUseCase_GetPopularTrackOfWeekTop20_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "track/trackProto/track.proto",
}

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

Functions

func RegisterTrackUseCaseServer

func RegisterTrackUseCaseServer(s grpc.ServiceRegistrar, srv TrackUseCaseServer)

Types

type PopularTrackOfWeek

type PopularTrackOfWeek struct {
	Id            int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id" example:"8" db:"track_id" validate:"min=0,nonnil"` // @gotags: json:"id" example:"8" db:"track_id" validate:"min=0,nonnil"
	LastWeekLikes int64 ``                                                                                                   // @gotags: json:"lastWeekLikes" example:"54" db:"last_week_likes" validate:"min=0,nonnil"
	/* 149-byte string literal not displayed */
	CurrentWeekLikes int64 `` // @gotags: json:"currentWeekLikes" example:"54" db:"current_week_likes" validate:"min=0,nonnil"
	/* 161-byte string literal not displayed */
	Date int64 `protobuf:"varint,4,opt,name=date,proto3" json:"date" example:"0" db:"date,nonnil"` // @gotags: json:"date" example:"0" db:"date,nonnil"
	// contains filtered or unexported fields
}

func (*PopularTrackOfWeek) Descriptor deprecated

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

Deprecated: Use PopularTrackOfWeek.ProtoReflect.Descriptor instead.

func (*PopularTrackOfWeek) GetCurrentWeekLikes

func (x *PopularTrackOfWeek) GetCurrentWeekLikes() int64

func (*PopularTrackOfWeek) GetDate

func (x *PopularTrackOfWeek) GetDate() int64

func (*PopularTrackOfWeek) GetId

func (x *PopularTrackOfWeek) GetId() int64

func (*PopularTrackOfWeek) GetLastWeekLikes

func (x *PopularTrackOfWeek) GetLastWeekLikes() int64

func (*PopularTrackOfWeek) ProtoMessage

func (*PopularTrackOfWeek) ProtoMessage()

func (*PopularTrackOfWeek) ProtoReflect

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

func (*PopularTrackOfWeek) Reset

func (x *PopularTrackOfWeek) Reset()

func (*PopularTrackOfWeek) String

func (x *PopularTrackOfWeek) String() string

type Track

type Track struct {
	Id       int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id" example:"4" db:"id" validate:"min=0"`                               // @gotags: json:"id" example:"4" db:"id" validate:"min=0"
	AlbumId  int64 `protobuf:"varint,2,opt,name=album_id,json=albumId,proto3" json:"albumId" example:"8" db:"album_id" validate:"min=0"` // @gotags: json:"albumId" example:"8" db:"album_id" validate:"min=0"
	ArtistId int64 ``                                                                                                                    // @gotags: json:"artistId" example:"8" db:"artist_id" validate:"min=0,nonnil"
	/* 126-byte string literal not displayed */
	Title      string `protobuf:"bytes,4,opt,name=title,proto3" json:"title" example:"Rain" db:"title" validate:"max=256,nonnil"`        // @gotags: json:"title" example:"Rain" db:"title" validate:"max=256,nonnil"
	Duration   int64  `protobuf:"varint,5,opt,name=duration,proto3" json:"duration" example:"180" db:"duration" validate:"min=0,nonnil"` // @gotags: json:"duration" example:"180" db:"duration" validate:"min=0,nonnil"
	CountLikes int64  ``                                                                                                                 // @gotags: json:"countLikes" example:"54" db:"count_likes" validate:"min=0,nonnil"
	/* 135-byte string literal not displayed */
	CountListenings int64 `` // @gotags: json:"countListening" example:"15632" db:"count_listening" validate:"min=0,nonnil"
	/* 156-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Track) Descriptor deprecated

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

Deprecated: Use Track.ProtoReflect.Descriptor instead.

func (*Track) GetAlbumId

func (x *Track) GetAlbumId() int64

func (*Track) GetArtistId

func (x *Track) GetArtistId() int64

func (*Track) GetCountLikes

func (x *Track) GetCountLikes() int64

func (*Track) GetCountListenings

func (x *Track) GetCountListenings() int64

func (*Track) GetDuration

func (x *Track) GetDuration() int64

func (*Track) GetId

func (x *Track) GetId() int64

func (*Track) GetTitle

func (x *Track) GetTitle() string

func (*Track) ProtoMessage

func (*Track) ProtoMessage()

func (*Track) ProtoReflect

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

func (*Track) Reset

func (x *Track) Reset()

func (*Track) String

func (x *Track) String() string

type TrackDataTransfer

type TrackDataTransfer struct {
	Id         int64  `protobuf:"varint,1,opt,name=id,proto3" json:"id" example:"1"`                            // @gotags: json:"id" example:"1"
	Title      string `protobuf:"bytes,2,opt,name=title,proto3" json:"title" example:"Mercury"`                 // @gotags: json:"title" example:"Mercury"
	Artist     string `protobuf:"bytes,3,opt,name=artist,proto3" json:"artist" example:"Hexed"`                 // @gotags: json:"artist" example:"Hexed"
	ArtistId   int64  `protobuf:"varint,4,opt,name=artist_id,json=artistId,proto3" json:"artistId" example:"8"` // @gotags: json:"artistId" example:"8"
	AlbumId    int64  `protobuf:"varint,5,opt,name=album_id,json=albumId,proto3" json:"albumId" example:"8"`    // @gotags: json:"albumId" example:"8"
	Cover      string `protobuf:"bytes,6,opt,name=cover,proto3" json:"cover" example:"assets/track_1.png"`      // @gotags: json:"cover" example:"assets/track_1.png"
	Src        string `protobuf:"bytes,7,opt,name=src,proto3" json:"src" example:"assets/track_1.mp4"`          // @gotags: json:"src" example:"assets/track_1.mp4"
	Likes      int64  `protobuf:"varint,8,opt,name=likes,proto3" json:"likes" example:"5"`                      // @gotags: json:"likes" example:"5"
	Listenings int64  `protobuf:"varint,9,opt,name=listenings,proto3" json:"listenings" example:"500"`          // @gotags: json:"listenings" example:"500"
	Duration   int64  `protobuf:"varint,10,opt,name=duration,proto3" json:"duration" example:"531"`             // @gotags: json:"duration" example:"531"
	IsLiked    bool   `protobuf:"varint,11,opt,name=isLiked,proto3" json:"isLiked" example:"true"`              // @gotags: json:"isLiked" example:"true"
	// contains filtered or unexported fields
}

func (*TrackDataTransfer) Descriptor deprecated

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

Deprecated: Use TrackDataTransfer.ProtoReflect.Descriptor instead.

func (*TrackDataTransfer) GetAlbumId

func (x *TrackDataTransfer) GetAlbumId() int64

func (*TrackDataTransfer) GetArtist

func (x *TrackDataTransfer) GetArtist() string

func (*TrackDataTransfer) GetArtistId

func (x *TrackDataTransfer) GetArtistId() int64

func (*TrackDataTransfer) GetCover

func (x *TrackDataTransfer) GetCover() string

func (*TrackDataTransfer) GetDuration

func (x *TrackDataTransfer) GetDuration() int64

func (*TrackDataTransfer) GetId

func (x *TrackDataTransfer) GetId() int64

func (*TrackDataTransfer) GetIsLiked

func (x *TrackDataTransfer) GetIsLiked() bool

func (*TrackDataTransfer) GetLikes

func (x *TrackDataTransfer) GetLikes() int64

func (*TrackDataTransfer) GetListenings

func (x *TrackDataTransfer) GetListenings() int64

func (*TrackDataTransfer) GetSrc

func (x *TrackDataTransfer) GetSrc() string

func (*TrackDataTransfer) GetTitle

func (x *TrackDataTransfer) GetTitle() string

func (*TrackDataTransfer) ProtoMessage

func (*TrackDataTransfer) ProtoMessage()

func (*TrackDataTransfer) ProtoReflect

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

func (*TrackDataTransfer) Reset

func (x *TrackDataTransfer) Reset()

func (*TrackDataTransfer) String

func (x *TrackDataTransfer) String() string

type TrackUseCaseClient

type TrackUseCaseClient interface {
	GetAll(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*TracksResponse, error)
	GetLastId(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*gatewayProto.IntResponse, error)
	Create(ctx context.Context, in *Track, opts ...grpc.CallOption) (*empty.Empty, error)
	Update(ctx context.Context, in *Track, opts ...grpc.CallOption) (*empty.Empty, error)
	Delete(ctx context.Context, in *gatewayProto.IdArg, opts ...grpc.CallOption) (*empty.Empty, error)
	GetById(ctx context.Context, in *gatewayProto.IdArg, opts ...grpc.CallOption) (*Track, error)
	GetPopular(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*TracksResponse, error)
	GetTracksFromAlbum(ctx context.Context, in *gatewayProto.IdArg, opts ...grpc.CallOption) (*TracksResponse, error)
	GetTracksFromPlaylist(ctx context.Context, in *gatewayProto.IdArg, opts ...grpc.CallOption) (*TracksResponse, error)
	GetPopularTracksFromArtist(ctx context.Context, in *gatewayProto.IdArg, opts ...grpc.CallOption) (*TracksResponse, error)
	GetSize(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*gatewayProto.IntResponse, error)
	Like(ctx context.Context, in *gatewayProto.UserIdTrackIdArg, opts ...grpc.CallOption) (*empty.Empty, error)
	LikeCheckByUser(ctx context.Context, in *gatewayProto.UserIdTrackIdArg, opts ...grpc.CallOption) (*gatewayProto.LikeCheckResponse, error)
	Listen(ctx context.Context, in *gatewayProto.IdArg, opts ...grpc.CallOption) (*empty.Empty, error)
	SearchByTitle(ctx context.Context, in *gatewayProto.StringArg, opts ...grpc.CallOption) (*TracksResponse, error)
	GetFavorites(ctx context.Context, in *gatewayProto.IdArg, opts ...grpc.CallOption) (*TracksResponse, error)
	AddToFavorites(ctx context.Context, in *gatewayProto.UserIdTrackIdArg, opts ...grpc.CallOption) (*empty.Empty, error)
	RemoveFromFavorites(ctx context.Context, in *gatewayProto.UserIdTrackIdArg, opts ...grpc.CallOption) (*empty.Empty, error)
	GetPopularTrackOfWeekTop20(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*TracksResponse, error)
}

TrackUseCaseClient is the client API for TrackUseCase 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 TrackUseCaseResponse

type TrackUseCaseResponse struct {
	Data *TrackDataTransfer `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*TrackUseCaseResponse) Descriptor deprecated

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

Deprecated: Use TrackUseCaseResponse.ProtoReflect.Descriptor instead.

func (*TrackUseCaseResponse) GetData

func (*TrackUseCaseResponse) ProtoMessage

func (*TrackUseCaseResponse) ProtoMessage()

func (*TrackUseCaseResponse) ProtoReflect

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

func (*TrackUseCaseResponse) Reset

func (x *TrackUseCaseResponse) Reset()

func (*TrackUseCaseResponse) String

func (x *TrackUseCaseResponse) String() string

type TrackUseCaseServer

type TrackUseCaseServer interface {
	GetAll(context.Context, *empty.Empty) (*TracksResponse, error)
	GetLastId(context.Context, *empty.Empty) (*gatewayProto.IntResponse, error)
	Create(context.Context, *Track) (*empty.Empty, error)
	Update(context.Context, *Track) (*empty.Empty, error)
	Delete(context.Context, *gatewayProto.IdArg) (*empty.Empty, error)
	GetById(context.Context, *gatewayProto.IdArg) (*Track, error)
	GetPopular(context.Context, *empty.Empty) (*TracksResponse, error)
	GetTracksFromAlbum(context.Context, *gatewayProto.IdArg) (*TracksResponse, error)
	GetTracksFromPlaylist(context.Context, *gatewayProto.IdArg) (*TracksResponse, error)
	GetPopularTracksFromArtist(context.Context, *gatewayProto.IdArg) (*TracksResponse, error)
	GetSize(context.Context, *empty.Empty) (*gatewayProto.IntResponse, error)
	Like(context.Context, *gatewayProto.UserIdTrackIdArg) (*empty.Empty, error)
	LikeCheckByUser(context.Context, *gatewayProto.UserIdTrackIdArg) (*gatewayProto.LikeCheckResponse, error)
	Listen(context.Context, *gatewayProto.IdArg) (*empty.Empty, error)
	SearchByTitle(context.Context, *gatewayProto.StringArg) (*TracksResponse, error)
	GetFavorites(context.Context, *gatewayProto.IdArg) (*TracksResponse, error)
	AddToFavorites(context.Context, *gatewayProto.UserIdTrackIdArg) (*empty.Empty, error)
	RemoveFromFavorites(context.Context, *gatewayProto.UserIdTrackIdArg) (*empty.Empty, error)
	GetPopularTrackOfWeekTop20(context.Context, *empty.Empty) (*TracksResponse, error)
	// contains filtered or unexported methods
}

TrackUseCaseServer is the server API for TrackUseCase service. All implementations must embed UnimplementedTrackUseCaseServer for forward compatibility

type TracksResponse

type TracksResponse struct {
	Tracks []*Track `protobuf:"bytes,1,rep,name=tracks,proto3" json:"tracks,omitempty"`
	// contains filtered or unexported fields
}

func (*TracksResponse) Descriptor deprecated

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

Deprecated: Use TracksResponse.ProtoReflect.Descriptor instead.

func (*TracksResponse) GetTracks

func (x *TracksResponse) GetTracks() []*Track

func (*TracksResponse) ProtoMessage

func (*TracksResponse) ProtoMessage()

func (*TracksResponse) ProtoReflect

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

func (*TracksResponse) Reset

func (x *TracksResponse) Reset()

func (*TracksResponse) String

func (x *TracksResponse) String() string

type UnimplementedTrackUseCaseServer

type UnimplementedTrackUseCaseServer struct {
}

UnimplementedTrackUseCaseServer must be embedded to have forward compatible implementations.

func (UnimplementedTrackUseCaseServer) AddToFavorites

func (UnimplementedTrackUseCaseServer) Create

func (UnimplementedTrackUseCaseServer) Delete

func (UnimplementedTrackUseCaseServer) GetAll

func (UnimplementedTrackUseCaseServer) GetById

func (UnimplementedTrackUseCaseServer) GetFavorites

func (UnimplementedTrackUseCaseServer) GetLastId

func (UnimplementedTrackUseCaseServer) GetPopular

func (UnimplementedTrackUseCaseServer) GetPopularTrackOfWeekTop20

func (UnimplementedTrackUseCaseServer) GetPopularTracksFromArtist

func (UnimplementedTrackUseCaseServer) GetSize

func (UnimplementedTrackUseCaseServer) GetTracksFromAlbum

func (UnimplementedTrackUseCaseServer) GetTracksFromPlaylist

func (UnimplementedTrackUseCaseServer) Like

func (UnimplementedTrackUseCaseServer) Listen

func (UnimplementedTrackUseCaseServer) RemoveFromFavorites

func (UnimplementedTrackUseCaseServer) SearchByTitle

func (UnimplementedTrackUseCaseServer) Update

type UnsafeTrackUseCaseServer

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

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

Jump to

Keyboard shortcuts

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