feat: add test database setup and usage helpers
- Introduced a new test file for setting up an in-memory SQLite database for testing purposes. - Added helper functions for seeding test data, including users, plans, subscriptions, and wallet transactions. - Implemented usage helpers to load user video counts and storage usage. - Created user payload struct and functions to build user payloads with preferences and wallet balance. - Refactored gRPC server setup to include new services and handlers. - Updated proto files to simplify service definitions by removing redundant service prefixes.
This commit is contained in:
1091
internal/api/proto/app/v1/account.pb.go
Normal file
1091
internal/api/proto/app/v1/account.pb.go
Normal file
File diff suppressed because it is too large
Load Diff
706
internal/api/proto/app/v1/account_grpc.pb.go
Normal file
706
internal/api/proto/app/v1/account_grpc.pb.go
Normal file
@@ -0,0 +1,706 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.6.1
|
||||
// - protoc (unknown)
|
||||
// source: app/v1/account.proto
|
||||
|
||||
package appv1
|
||||
|
||||
import (
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
wrapperspb "google.golang.org/protobuf/types/known/wrapperspb"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
// Requires gRPC-Go v1.64.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion9
|
||||
|
||||
const (
|
||||
Account_GetMe_FullMethodName = "/stream.app.v1.Account/GetMe"
|
||||
Account_UpdateMe_FullMethodName = "/stream.app.v1.Account/UpdateMe"
|
||||
Account_DeleteMe_FullMethodName = "/stream.app.v1.Account/DeleteMe"
|
||||
Account_ClearMyData_FullMethodName = "/stream.app.v1.Account/ClearMyData"
|
||||
Account_GetUserById_FullMethodName = "/stream.app.v1.Account/GetUserById"
|
||||
Account_GetPreferences_FullMethodName = "/stream.app.v1.Account/GetPreferences"
|
||||
Account_UpdatePreferences_FullMethodName = "/stream.app.v1.Account/UpdatePreferences"
|
||||
)
|
||||
|
||||
// AccountClient is the client API for Account 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 AccountClient interface {
|
||||
GetMe(ctx context.Context, in *GetMeRequest, opts ...grpc.CallOption) (*GetMeResponse, error)
|
||||
UpdateMe(ctx context.Context, in *UpdateMeRequest, opts ...grpc.CallOption) (*UpdateMeResponse, error)
|
||||
DeleteMe(ctx context.Context, in *DeleteMeRequest, opts ...grpc.CallOption) (*MessageResponse, error)
|
||||
ClearMyData(ctx context.Context, in *ClearMyDataRequest, opts ...grpc.CallOption) (*MessageResponse, error)
|
||||
GetUserById(ctx context.Context, in *wrapperspb.StringValue, opts ...grpc.CallOption) (*User, error)
|
||||
GetPreferences(ctx context.Context, in *GetPreferencesRequest, opts ...grpc.CallOption) (*GetPreferencesResponse, error)
|
||||
UpdatePreferences(ctx context.Context, in *UpdatePreferencesRequest, opts ...grpc.CallOption) (*UpdatePreferencesResponse, error)
|
||||
}
|
||||
|
||||
type accountClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewAccountClient(cc grpc.ClientConnInterface) AccountClient {
|
||||
return &accountClient{cc}
|
||||
}
|
||||
|
||||
func (c *accountClient) GetMe(ctx context.Context, in *GetMeRequest, opts ...grpc.CallOption) (*GetMeResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(GetMeResponse)
|
||||
err := c.cc.Invoke(ctx, Account_GetMe_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *accountClient) UpdateMe(ctx context.Context, in *UpdateMeRequest, opts ...grpc.CallOption) (*UpdateMeResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(UpdateMeResponse)
|
||||
err := c.cc.Invoke(ctx, Account_UpdateMe_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *accountClient) DeleteMe(ctx context.Context, in *DeleteMeRequest, opts ...grpc.CallOption) (*MessageResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(MessageResponse)
|
||||
err := c.cc.Invoke(ctx, Account_DeleteMe_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *accountClient) ClearMyData(ctx context.Context, in *ClearMyDataRequest, opts ...grpc.CallOption) (*MessageResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(MessageResponse)
|
||||
err := c.cc.Invoke(ctx, Account_ClearMyData_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *accountClient) GetUserById(ctx context.Context, in *wrapperspb.StringValue, opts ...grpc.CallOption) (*User, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(User)
|
||||
err := c.cc.Invoke(ctx, Account_GetUserById_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *accountClient) GetPreferences(ctx context.Context, in *GetPreferencesRequest, opts ...grpc.CallOption) (*GetPreferencesResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(GetPreferencesResponse)
|
||||
err := c.cc.Invoke(ctx, Account_GetPreferences_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *accountClient) UpdatePreferences(ctx context.Context, in *UpdatePreferencesRequest, opts ...grpc.CallOption) (*UpdatePreferencesResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(UpdatePreferencesResponse)
|
||||
err := c.cc.Invoke(ctx, Account_UpdatePreferences_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// AccountServer is the server API for Account service.
|
||||
// All implementations must embed UnimplementedAccountServer
|
||||
// for forward compatibility.
|
||||
type AccountServer interface {
|
||||
GetMe(context.Context, *GetMeRequest) (*GetMeResponse, error)
|
||||
UpdateMe(context.Context, *UpdateMeRequest) (*UpdateMeResponse, error)
|
||||
DeleteMe(context.Context, *DeleteMeRequest) (*MessageResponse, error)
|
||||
ClearMyData(context.Context, *ClearMyDataRequest) (*MessageResponse, error)
|
||||
GetUserById(context.Context, *wrapperspb.StringValue) (*User, error)
|
||||
GetPreferences(context.Context, *GetPreferencesRequest) (*GetPreferencesResponse, error)
|
||||
UpdatePreferences(context.Context, *UpdatePreferencesRequest) (*UpdatePreferencesResponse, error)
|
||||
mustEmbedUnimplementedAccountServer()
|
||||
}
|
||||
|
||||
// UnimplementedAccountServer must be embedded to have
|
||||
// forward compatible implementations.
|
||||
//
|
||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedAccountServer struct{}
|
||||
|
||||
func (UnimplementedAccountServer) GetMe(context.Context, *GetMeRequest) (*GetMeResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method GetMe not implemented")
|
||||
}
|
||||
func (UnimplementedAccountServer) UpdateMe(context.Context, *UpdateMeRequest) (*UpdateMeResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method UpdateMe not implemented")
|
||||
}
|
||||
func (UnimplementedAccountServer) DeleteMe(context.Context, *DeleteMeRequest) (*MessageResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method DeleteMe not implemented")
|
||||
}
|
||||
func (UnimplementedAccountServer) ClearMyData(context.Context, *ClearMyDataRequest) (*MessageResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method ClearMyData not implemented")
|
||||
}
|
||||
func (UnimplementedAccountServer) GetUserById(context.Context, *wrapperspb.StringValue) (*User, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method GetUserById not implemented")
|
||||
}
|
||||
func (UnimplementedAccountServer) GetPreferences(context.Context, *GetPreferencesRequest) (*GetPreferencesResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method GetPreferences not implemented")
|
||||
}
|
||||
func (UnimplementedAccountServer) UpdatePreferences(context.Context, *UpdatePreferencesRequest) (*UpdatePreferencesResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method UpdatePreferences not implemented")
|
||||
}
|
||||
func (UnimplementedAccountServer) mustEmbedUnimplementedAccountServer() {}
|
||||
func (UnimplementedAccountServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeAccountServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to AccountServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeAccountServer interface {
|
||||
mustEmbedUnimplementedAccountServer()
|
||||
}
|
||||
|
||||
func RegisterAccountServer(s grpc.ServiceRegistrar, srv AccountServer) {
|
||||
// If the following call panics, it indicates UnimplementedAccountServer was
|
||||
// embedded by pointer and is nil. This will cause panics if an
|
||||
// unimplemented method is ever invoked, so we test this at initialization
|
||||
// time to prevent it from happening at runtime later due to I/O.
|
||||
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
||||
t.testEmbeddedByValue()
|
||||
}
|
||||
s.RegisterService(&Account_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _Account_GetMe_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetMeRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AccountServer).GetMe(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Account_GetMe_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AccountServer).GetMe(ctx, req.(*GetMeRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Account_UpdateMe_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(UpdateMeRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AccountServer).UpdateMe(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Account_UpdateMe_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AccountServer).UpdateMe(ctx, req.(*UpdateMeRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Account_DeleteMe_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DeleteMeRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AccountServer).DeleteMe(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Account_DeleteMe_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AccountServer).DeleteMe(ctx, req.(*DeleteMeRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Account_ClearMyData_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ClearMyDataRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AccountServer).ClearMyData(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Account_ClearMyData_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AccountServer).ClearMyData(ctx, req.(*ClearMyDataRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Account_GetUserById_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(wrapperspb.StringValue)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AccountServer).GetUserById(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Account_GetUserById_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AccountServer).GetUserById(ctx, req.(*wrapperspb.StringValue))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Account_GetPreferences_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetPreferencesRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AccountServer).GetPreferences(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Account_GetPreferences_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AccountServer).GetPreferences(ctx, req.(*GetPreferencesRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Account_UpdatePreferences_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(UpdatePreferencesRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AccountServer).UpdatePreferences(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Account_UpdatePreferences_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AccountServer).UpdatePreferences(ctx, req.(*UpdatePreferencesRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// Account_ServiceDesc is the grpc.ServiceDesc for Account service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var Account_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "stream.app.v1.Account",
|
||||
HandlerType: (*AccountServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "GetMe",
|
||||
Handler: _Account_GetMe_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UpdateMe",
|
||||
Handler: _Account_UpdateMe_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "DeleteMe",
|
||||
Handler: _Account_DeleteMe_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ClearMyData",
|
||||
Handler: _Account_ClearMyData_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetUserById",
|
||||
Handler: _Account_GetUserById_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetPreferences",
|
||||
Handler: _Account_GetPreferences_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UpdatePreferences",
|
||||
Handler: _Account_UpdatePreferences_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "app/v1/account.proto",
|
||||
}
|
||||
|
||||
const (
|
||||
Usage_GetUsage_FullMethodName = "/stream.app.v1.Usage/GetUsage"
|
||||
)
|
||||
|
||||
// UsageClient is the client API for Usage 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 UsageClient interface {
|
||||
GetUsage(ctx context.Context, in *GetUsageRequest, opts ...grpc.CallOption) (*GetUsageResponse, error)
|
||||
}
|
||||
|
||||
type usageClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewUsageClient(cc grpc.ClientConnInterface) UsageClient {
|
||||
return &usageClient{cc}
|
||||
}
|
||||
|
||||
func (c *usageClient) GetUsage(ctx context.Context, in *GetUsageRequest, opts ...grpc.CallOption) (*GetUsageResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(GetUsageResponse)
|
||||
err := c.cc.Invoke(ctx, Usage_GetUsage_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// UsageServer is the server API for Usage service.
|
||||
// All implementations must embed UnimplementedUsageServer
|
||||
// for forward compatibility.
|
||||
type UsageServer interface {
|
||||
GetUsage(context.Context, *GetUsageRequest) (*GetUsageResponse, error)
|
||||
mustEmbedUnimplementedUsageServer()
|
||||
}
|
||||
|
||||
// UnimplementedUsageServer must be embedded to have
|
||||
// forward compatible implementations.
|
||||
//
|
||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedUsageServer struct{}
|
||||
|
||||
func (UnimplementedUsageServer) GetUsage(context.Context, *GetUsageRequest) (*GetUsageResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method GetUsage not implemented")
|
||||
}
|
||||
func (UnimplementedUsageServer) mustEmbedUnimplementedUsageServer() {}
|
||||
func (UnimplementedUsageServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeUsageServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to UsageServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeUsageServer interface {
|
||||
mustEmbedUnimplementedUsageServer()
|
||||
}
|
||||
|
||||
func RegisterUsageServer(s grpc.ServiceRegistrar, srv UsageServer) {
|
||||
// If the following call panics, it indicates UnimplementedUsageServer was
|
||||
// embedded by pointer and is nil. This will cause panics if an
|
||||
// unimplemented method is ever invoked, so we test this at initialization
|
||||
// time to prevent it from happening at runtime later due to I/O.
|
||||
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
||||
t.testEmbeddedByValue()
|
||||
}
|
||||
s.RegisterService(&Usage_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _Usage_GetUsage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetUsageRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(UsageServer).GetUsage(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Usage_GetUsage_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(UsageServer).GetUsage(ctx, req.(*GetUsageRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// Usage_ServiceDesc is the grpc.ServiceDesc for Usage service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var Usage_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "stream.app.v1.Usage",
|
||||
HandlerType: (*UsageServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "GetUsage",
|
||||
Handler: _Usage_GetUsage_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "app/v1/account.proto",
|
||||
}
|
||||
|
||||
const (
|
||||
Notifications_ListNotifications_FullMethodName = "/stream.app.v1.Notifications/ListNotifications"
|
||||
Notifications_MarkNotificationRead_FullMethodName = "/stream.app.v1.Notifications/MarkNotificationRead"
|
||||
Notifications_MarkAllNotificationsRead_FullMethodName = "/stream.app.v1.Notifications/MarkAllNotificationsRead"
|
||||
Notifications_DeleteNotification_FullMethodName = "/stream.app.v1.Notifications/DeleteNotification"
|
||||
Notifications_ClearNotifications_FullMethodName = "/stream.app.v1.Notifications/ClearNotifications"
|
||||
)
|
||||
|
||||
// NotificationsClient is the client API for Notifications 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 NotificationsClient interface {
|
||||
ListNotifications(ctx context.Context, in *ListNotificationsRequest, opts ...grpc.CallOption) (*ListNotificationsResponse, error)
|
||||
MarkNotificationRead(ctx context.Context, in *MarkNotificationReadRequest, opts ...grpc.CallOption) (*MessageResponse, error)
|
||||
MarkAllNotificationsRead(ctx context.Context, in *MarkAllNotificationsReadRequest, opts ...grpc.CallOption) (*MessageResponse, error)
|
||||
DeleteNotification(ctx context.Context, in *DeleteNotificationRequest, opts ...grpc.CallOption) (*MessageResponse, error)
|
||||
ClearNotifications(ctx context.Context, in *ClearNotificationsRequest, opts ...grpc.CallOption) (*MessageResponse, error)
|
||||
}
|
||||
|
||||
type notificationsClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewNotificationsClient(cc grpc.ClientConnInterface) NotificationsClient {
|
||||
return ¬ificationsClient{cc}
|
||||
}
|
||||
|
||||
func (c *notificationsClient) ListNotifications(ctx context.Context, in *ListNotificationsRequest, opts ...grpc.CallOption) (*ListNotificationsResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(ListNotificationsResponse)
|
||||
err := c.cc.Invoke(ctx, Notifications_ListNotifications_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *notificationsClient) MarkNotificationRead(ctx context.Context, in *MarkNotificationReadRequest, opts ...grpc.CallOption) (*MessageResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(MessageResponse)
|
||||
err := c.cc.Invoke(ctx, Notifications_MarkNotificationRead_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *notificationsClient) MarkAllNotificationsRead(ctx context.Context, in *MarkAllNotificationsReadRequest, opts ...grpc.CallOption) (*MessageResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(MessageResponse)
|
||||
err := c.cc.Invoke(ctx, Notifications_MarkAllNotificationsRead_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *notificationsClient) DeleteNotification(ctx context.Context, in *DeleteNotificationRequest, opts ...grpc.CallOption) (*MessageResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(MessageResponse)
|
||||
err := c.cc.Invoke(ctx, Notifications_DeleteNotification_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *notificationsClient) ClearNotifications(ctx context.Context, in *ClearNotificationsRequest, opts ...grpc.CallOption) (*MessageResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(MessageResponse)
|
||||
err := c.cc.Invoke(ctx, Notifications_ClearNotifications_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// NotificationsServer is the server API for Notifications service.
|
||||
// All implementations must embed UnimplementedNotificationsServer
|
||||
// for forward compatibility.
|
||||
type NotificationsServer interface {
|
||||
ListNotifications(context.Context, *ListNotificationsRequest) (*ListNotificationsResponse, error)
|
||||
MarkNotificationRead(context.Context, *MarkNotificationReadRequest) (*MessageResponse, error)
|
||||
MarkAllNotificationsRead(context.Context, *MarkAllNotificationsReadRequest) (*MessageResponse, error)
|
||||
DeleteNotification(context.Context, *DeleteNotificationRequest) (*MessageResponse, error)
|
||||
ClearNotifications(context.Context, *ClearNotificationsRequest) (*MessageResponse, error)
|
||||
mustEmbedUnimplementedNotificationsServer()
|
||||
}
|
||||
|
||||
// UnimplementedNotificationsServer must be embedded to have
|
||||
// forward compatible implementations.
|
||||
//
|
||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedNotificationsServer struct{}
|
||||
|
||||
func (UnimplementedNotificationsServer) ListNotifications(context.Context, *ListNotificationsRequest) (*ListNotificationsResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method ListNotifications not implemented")
|
||||
}
|
||||
func (UnimplementedNotificationsServer) MarkNotificationRead(context.Context, *MarkNotificationReadRequest) (*MessageResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method MarkNotificationRead not implemented")
|
||||
}
|
||||
func (UnimplementedNotificationsServer) MarkAllNotificationsRead(context.Context, *MarkAllNotificationsReadRequest) (*MessageResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method MarkAllNotificationsRead not implemented")
|
||||
}
|
||||
func (UnimplementedNotificationsServer) DeleteNotification(context.Context, *DeleteNotificationRequest) (*MessageResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method DeleteNotification not implemented")
|
||||
}
|
||||
func (UnimplementedNotificationsServer) ClearNotifications(context.Context, *ClearNotificationsRequest) (*MessageResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method ClearNotifications not implemented")
|
||||
}
|
||||
func (UnimplementedNotificationsServer) mustEmbedUnimplementedNotificationsServer() {}
|
||||
func (UnimplementedNotificationsServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeNotificationsServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to NotificationsServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeNotificationsServer interface {
|
||||
mustEmbedUnimplementedNotificationsServer()
|
||||
}
|
||||
|
||||
func RegisterNotificationsServer(s grpc.ServiceRegistrar, srv NotificationsServer) {
|
||||
// If the following call panics, it indicates UnimplementedNotificationsServer was
|
||||
// embedded by pointer and is nil. This will cause panics if an
|
||||
// unimplemented method is ever invoked, so we test this at initialization
|
||||
// time to prevent it from happening at runtime later due to I/O.
|
||||
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
||||
t.testEmbeddedByValue()
|
||||
}
|
||||
s.RegisterService(&Notifications_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _Notifications_ListNotifications_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ListNotificationsRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(NotificationsServer).ListNotifications(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Notifications_ListNotifications_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(NotificationsServer).ListNotifications(ctx, req.(*ListNotificationsRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Notifications_MarkNotificationRead_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(MarkNotificationReadRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(NotificationsServer).MarkNotificationRead(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Notifications_MarkNotificationRead_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(NotificationsServer).MarkNotificationRead(ctx, req.(*MarkNotificationReadRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Notifications_MarkAllNotificationsRead_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(MarkAllNotificationsReadRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(NotificationsServer).MarkAllNotificationsRead(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Notifications_MarkAllNotificationsRead_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(NotificationsServer).MarkAllNotificationsRead(ctx, req.(*MarkAllNotificationsReadRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Notifications_DeleteNotification_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DeleteNotificationRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(NotificationsServer).DeleteNotification(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Notifications_DeleteNotification_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(NotificationsServer).DeleteNotification(ctx, req.(*DeleteNotificationRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Notifications_ClearNotifications_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ClearNotificationsRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(NotificationsServer).ClearNotifications(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Notifications_ClearNotifications_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(NotificationsServer).ClearNotifications(ctx, req.(*ClearNotificationsRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// Notifications_ServiceDesc is the grpc.ServiceDesc for Notifications service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var Notifications_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "stream.app.v1.Notifications",
|
||||
HandlerType: (*NotificationsServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "ListNotifications",
|
||||
Handler: _Notifications_ListNotifications_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "MarkNotificationRead",
|
||||
Handler: _Notifications_MarkNotificationRead_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "MarkAllNotificationsRead",
|
||||
Handler: _Notifications_MarkAllNotificationsRead_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "DeleteNotification",
|
||||
Handler: _Notifications_DeleteNotification_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ClearNotifications",
|
||||
Handler: _Notifications_ClearNotifications_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "app/v1/account.proto",
|
||||
}
|
||||
5193
internal/api/proto/app/v1/admin.pb.go
Normal file
5193
internal/api/proto/app/v1/admin.pb.go
Normal file
File diff suppressed because it is too large
Load Diff
1603
internal/api/proto/app/v1/admin_grpc.pb.go
Normal file
1603
internal/api/proto/app/v1/admin_grpc.pb.go
Normal file
File diff suppressed because it is too large
Load Diff
719
internal/api/proto/app/v1/auth.pb.go
Normal file
719
internal/api/proto/app/v1/auth.pb.go
Normal file
@@ -0,0 +1,719 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.11
|
||||
// protoc (unknown)
|
||||
// source: app/v1/auth.proto
|
||||
|
||||
package appv1
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
)
|
||||
|
||||
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)
|
||||
)
|
||||
|
||||
type LoginRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"`
|
||||
Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *LoginRequest) Reset() {
|
||||
*x = LoginRequest{}
|
||||
mi := &file_app_v1_auth_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *LoginRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*LoginRequest) ProtoMessage() {}
|
||||
|
||||
func (x *LoginRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_app_v1_auth_proto_msgTypes[0]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use LoginRequest.ProtoReflect.Descriptor instead.
|
||||
func (*LoginRequest) Descriptor() ([]byte, []int) {
|
||||
return file_app_v1_auth_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *LoginRequest) GetEmail() string {
|
||||
if x != nil {
|
||||
return x.Email
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *LoginRequest) GetPassword() string {
|
||||
if x != nil {
|
||||
return x.Password
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type LoginResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *LoginResponse) Reset() {
|
||||
*x = LoginResponse{}
|
||||
mi := &file_app_v1_auth_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *LoginResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*LoginResponse) ProtoMessage() {}
|
||||
|
||||
func (x *LoginResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_app_v1_auth_proto_msgTypes[1]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use LoginResponse.ProtoReflect.Descriptor instead.
|
||||
func (*LoginResponse) Descriptor() ([]byte, []int) {
|
||||
return file_app_v1_auth_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *LoginResponse) GetUser() *User {
|
||||
if x != nil {
|
||||
return x.User
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type RegisterRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
|
||||
Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"`
|
||||
Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"`
|
||||
RefUsername *string `protobuf:"bytes,4,opt,name=ref_username,json=refUsername,proto3,oneof" json:"ref_username,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *RegisterRequest) Reset() {
|
||||
*x = RegisterRequest{}
|
||||
mi := &file_app_v1_auth_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *RegisterRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*RegisterRequest) ProtoMessage() {}
|
||||
|
||||
func (x *RegisterRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_app_v1_auth_proto_msgTypes[2]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use RegisterRequest.ProtoReflect.Descriptor instead.
|
||||
func (*RegisterRequest) Descriptor() ([]byte, []int) {
|
||||
return file_app_v1_auth_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *RegisterRequest) GetUsername() string {
|
||||
if x != nil {
|
||||
return x.Username
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *RegisterRequest) GetEmail() string {
|
||||
if x != nil {
|
||||
return x.Email
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *RegisterRequest) GetPassword() string {
|
||||
if x != nil {
|
||||
return x.Password
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *RegisterRequest) GetRefUsername() string {
|
||||
if x != nil && x.RefUsername != nil {
|
||||
return *x.RefUsername
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type RegisterResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *RegisterResponse) Reset() {
|
||||
*x = RegisterResponse{}
|
||||
mi := &file_app_v1_auth_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *RegisterResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*RegisterResponse) ProtoMessage() {}
|
||||
|
||||
func (x *RegisterResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_app_v1_auth_proto_msgTypes[3]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use RegisterResponse.ProtoReflect.Descriptor instead.
|
||||
func (*RegisterResponse) Descriptor() ([]byte, []int) {
|
||||
return file_app_v1_auth_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *RegisterResponse) GetUser() *User {
|
||||
if x != nil {
|
||||
return x.User
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type LogoutRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *LogoutRequest) Reset() {
|
||||
*x = LogoutRequest{}
|
||||
mi := &file_app_v1_auth_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *LogoutRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*LogoutRequest) ProtoMessage() {}
|
||||
|
||||
func (x *LogoutRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_app_v1_auth_proto_msgTypes[4]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use LogoutRequest.ProtoReflect.Descriptor instead.
|
||||
func (*LogoutRequest) Descriptor() ([]byte, []int) {
|
||||
return file_app_v1_auth_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
type ChangePasswordRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
CurrentPassword string `protobuf:"bytes,1,opt,name=current_password,json=currentPassword,proto3" json:"current_password,omitempty"`
|
||||
NewPassword string `protobuf:"bytes,2,opt,name=new_password,json=newPassword,proto3" json:"new_password,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *ChangePasswordRequest) Reset() {
|
||||
*x = ChangePasswordRequest{}
|
||||
mi := &file_app_v1_auth_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ChangePasswordRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ChangePasswordRequest) ProtoMessage() {}
|
||||
|
||||
func (x *ChangePasswordRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_app_v1_auth_proto_msgTypes[5]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ChangePasswordRequest.ProtoReflect.Descriptor instead.
|
||||
func (*ChangePasswordRequest) Descriptor() ([]byte, []int) {
|
||||
return file_app_v1_auth_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
func (x *ChangePasswordRequest) GetCurrentPassword() string {
|
||||
if x != nil {
|
||||
return x.CurrentPassword
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ChangePasswordRequest) GetNewPassword() string {
|
||||
if x != nil {
|
||||
return x.NewPassword
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type ForgotPasswordRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *ForgotPasswordRequest) Reset() {
|
||||
*x = ForgotPasswordRequest{}
|
||||
mi := &file_app_v1_auth_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ForgotPasswordRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ForgotPasswordRequest) ProtoMessage() {}
|
||||
|
||||
func (x *ForgotPasswordRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_app_v1_auth_proto_msgTypes[6]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ForgotPasswordRequest.ProtoReflect.Descriptor instead.
|
||||
func (*ForgotPasswordRequest) Descriptor() ([]byte, []int) {
|
||||
return file_app_v1_auth_proto_rawDescGZIP(), []int{6}
|
||||
}
|
||||
|
||||
func (x *ForgotPasswordRequest) GetEmail() string {
|
||||
if x != nil {
|
||||
return x.Email
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type ResetPasswordRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
|
||||
NewPassword string `protobuf:"bytes,2,opt,name=new_password,json=newPassword,proto3" json:"new_password,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *ResetPasswordRequest) Reset() {
|
||||
*x = ResetPasswordRequest{}
|
||||
mi := &file_app_v1_auth_proto_msgTypes[7]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ResetPasswordRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ResetPasswordRequest) ProtoMessage() {}
|
||||
|
||||
func (x *ResetPasswordRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_app_v1_auth_proto_msgTypes[7]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ResetPasswordRequest.ProtoReflect.Descriptor instead.
|
||||
func (*ResetPasswordRequest) Descriptor() ([]byte, []int) {
|
||||
return file_app_v1_auth_proto_rawDescGZIP(), []int{7}
|
||||
}
|
||||
|
||||
func (x *ResetPasswordRequest) GetToken() string {
|
||||
if x != nil {
|
||||
return x.Token
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ResetPasswordRequest) GetNewPassword() string {
|
||||
if x != nil {
|
||||
return x.NewPassword
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type GetGoogleLoginUrlRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *GetGoogleLoginUrlRequest) Reset() {
|
||||
*x = GetGoogleLoginUrlRequest{}
|
||||
mi := &file_app_v1_auth_proto_msgTypes[8]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *GetGoogleLoginUrlRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetGoogleLoginUrlRequest) ProtoMessage() {}
|
||||
|
||||
func (x *GetGoogleLoginUrlRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_app_v1_auth_proto_msgTypes[8]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use GetGoogleLoginUrlRequest.ProtoReflect.Descriptor instead.
|
||||
func (*GetGoogleLoginUrlRequest) Descriptor() ([]byte, []int) {
|
||||
return file_app_v1_auth_proto_rawDescGZIP(), []int{8}
|
||||
}
|
||||
|
||||
type GetGoogleLoginUrlResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *GetGoogleLoginUrlResponse) Reset() {
|
||||
*x = GetGoogleLoginUrlResponse{}
|
||||
mi := &file_app_v1_auth_proto_msgTypes[9]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *GetGoogleLoginUrlResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetGoogleLoginUrlResponse) ProtoMessage() {}
|
||||
|
||||
func (x *GetGoogleLoginUrlResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_app_v1_auth_proto_msgTypes[9]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use GetGoogleLoginUrlResponse.ProtoReflect.Descriptor instead.
|
||||
func (*GetGoogleLoginUrlResponse) Descriptor() ([]byte, []int) {
|
||||
return file_app_v1_auth_proto_rawDescGZIP(), []int{9}
|
||||
}
|
||||
|
||||
func (x *GetGoogleLoginUrlResponse) GetUrl() string {
|
||||
if x != nil {
|
||||
return x.Url
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type CompleteGoogleLoginRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"`
|
||||
RefUsername *string `protobuf:"bytes,2,opt,name=ref_username,json=refUsername,proto3,oneof" json:"ref_username,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *CompleteGoogleLoginRequest) Reset() {
|
||||
*x = CompleteGoogleLoginRequest{}
|
||||
mi := &file_app_v1_auth_proto_msgTypes[10]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *CompleteGoogleLoginRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*CompleteGoogleLoginRequest) ProtoMessage() {}
|
||||
|
||||
func (x *CompleteGoogleLoginRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_app_v1_auth_proto_msgTypes[10]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use CompleteGoogleLoginRequest.ProtoReflect.Descriptor instead.
|
||||
func (*CompleteGoogleLoginRequest) Descriptor() ([]byte, []int) {
|
||||
return file_app_v1_auth_proto_rawDescGZIP(), []int{10}
|
||||
}
|
||||
|
||||
func (x *CompleteGoogleLoginRequest) GetCode() string {
|
||||
if x != nil {
|
||||
return x.Code
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *CompleteGoogleLoginRequest) GetRefUsername() string {
|
||||
if x != nil && x.RefUsername != nil {
|
||||
return *x.RefUsername
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type CompleteGoogleLoginResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *CompleteGoogleLoginResponse) Reset() {
|
||||
*x = CompleteGoogleLoginResponse{}
|
||||
mi := &file_app_v1_auth_proto_msgTypes[11]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *CompleteGoogleLoginResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*CompleteGoogleLoginResponse) ProtoMessage() {}
|
||||
|
||||
func (x *CompleteGoogleLoginResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_app_v1_auth_proto_msgTypes[11]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use CompleteGoogleLoginResponse.ProtoReflect.Descriptor instead.
|
||||
func (*CompleteGoogleLoginResponse) Descriptor() ([]byte, []int) {
|
||||
return file_app_v1_auth_proto_rawDescGZIP(), []int{11}
|
||||
}
|
||||
|
||||
func (x *CompleteGoogleLoginResponse) GetUser() *User {
|
||||
if x != nil {
|
||||
return x.User
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_app_v1_auth_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_app_v1_auth_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"\x11app/v1/auth.proto\x12\rstream.app.v1\x1a\x13app/v1/common.proto\"@\n" +
|
||||
"\fLoginRequest\x12\x14\n" +
|
||||
"\x05email\x18\x01 \x01(\tR\x05email\x12\x1a\n" +
|
||||
"\bpassword\x18\x02 \x01(\tR\bpassword\"8\n" +
|
||||
"\rLoginResponse\x12'\n" +
|
||||
"\x04user\x18\x01 \x01(\v2\x13.stream.app.v1.UserR\x04user\"\x98\x01\n" +
|
||||
"\x0fRegisterRequest\x12\x1a\n" +
|
||||
"\busername\x18\x01 \x01(\tR\busername\x12\x14\n" +
|
||||
"\x05email\x18\x02 \x01(\tR\x05email\x12\x1a\n" +
|
||||
"\bpassword\x18\x03 \x01(\tR\bpassword\x12&\n" +
|
||||
"\fref_username\x18\x04 \x01(\tH\x00R\vrefUsername\x88\x01\x01B\x0f\n" +
|
||||
"\r_ref_username\";\n" +
|
||||
"\x10RegisterResponse\x12'\n" +
|
||||
"\x04user\x18\x01 \x01(\v2\x13.stream.app.v1.UserR\x04user\"\x0f\n" +
|
||||
"\rLogoutRequest\"e\n" +
|
||||
"\x15ChangePasswordRequest\x12)\n" +
|
||||
"\x10current_password\x18\x01 \x01(\tR\x0fcurrentPassword\x12!\n" +
|
||||
"\fnew_password\x18\x02 \x01(\tR\vnewPassword\"-\n" +
|
||||
"\x15ForgotPasswordRequest\x12\x14\n" +
|
||||
"\x05email\x18\x01 \x01(\tR\x05email\"O\n" +
|
||||
"\x14ResetPasswordRequest\x12\x14\n" +
|
||||
"\x05token\x18\x01 \x01(\tR\x05token\x12!\n" +
|
||||
"\fnew_password\x18\x02 \x01(\tR\vnewPassword\"\x1a\n" +
|
||||
"\x18GetGoogleLoginUrlRequest\"-\n" +
|
||||
"\x19GetGoogleLoginUrlResponse\x12\x10\n" +
|
||||
"\x03url\x18\x01 \x01(\tR\x03url\"i\n" +
|
||||
"\x1aCompleteGoogleLoginRequest\x12\x12\n" +
|
||||
"\x04code\x18\x01 \x01(\tR\x04code\x12&\n" +
|
||||
"\fref_username\x18\x02 \x01(\tH\x00R\vrefUsername\x88\x01\x01B\x0f\n" +
|
||||
"\r_ref_username\"F\n" +
|
||||
"\x1bCompleteGoogleLoginResponse\x12'\n" +
|
||||
"\x04user\x18\x01 \x01(\v2\x13.stream.app.v1.UserR\x04user2\xbb\x05\n" +
|
||||
"\x04Auth\x12B\n" +
|
||||
"\x05Login\x12\x1b.stream.app.v1.LoginRequest\x1a\x1c.stream.app.v1.LoginResponse\x12K\n" +
|
||||
"\bRegister\x12\x1e.stream.app.v1.RegisterRequest\x1a\x1f.stream.app.v1.RegisterResponse\x12F\n" +
|
||||
"\x06Logout\x12\x1c.stream.app.v1.LogoutRequest\x1a\x1e.stream.app.v1.MessageResponse\x12V\n" +
|
||||
"\x0eChangePassword\x12$.stream.app.v1.ChangePasswordRequest\x1a\x1e.stream.app.v1.MessageResponse\x12V\n" +
|
||||
"\x0eForgotPassword\x12$.stream.app.v1.ForgotPasswordRequest\x1a\x1e.stream.app.v1.MessageResponse\x12T\n" +
|
||||
"\rResetPassword\x12#.stream.app.v1.ResetPasswordRequest\x1a\x1e.stream.app.v1.MessageResponse\x12f\n" +
|
||||
"\x11GetGoogleLoginUrl\x12'.stream.app.v1.GetGoogleLoginUrlRequest\x1a(.stream.app.v1.GetGoogleLoginUrlResponse\x12l\n" +
|
||||
"\x13CompleteGoogleLogin\x12).stream.app.v1.CompleteGoogleLoginRequest\x1a*.stream.app.v1.CompleteGoogleLoginResponseB,Z*stream.api/internal/gen/proto/app/v1;appv1b\x06proto3"
|
||||
|
||||
var (
|
||||
file_app_v1_auth_proto_rawDescOnce sync.Once
|
||||
file_app_v1_auth_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_app_v1_auth_proto_rawDescGZIP() []byte {
|
||||
file_app_v1_auth_proto_rawDescOnce.Do(func() {
|
||||
file_app_v1_auth_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_app_v1_auth_proto_rawDesc), len(file_app_v1_auth_proto_rawDesc)))
|
||||
})
|
||||
return file_app_v1_auth_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_app_v1_auth_proto_msgTypes = make([]protoimpl.MessageInfo, 12)
|
||||
var file_app_v1_auth_proto_goTypes = []any{
|
||||
(*LoginRequest)(nil), // 0: stream.app.v1.LoginRequest
|
||||
(*LoginResponse)(nil), // 1: stream.app.v1.LoginResponse
|
||||
(*RegisterRequest)(nil), // 2: stream.app.v1.RegisterRequest
|
||||
(*RegisterResponse)(nil), // 3: stream.app.v1.RegisterResponse
|
||||
(*LogoutRequest)(nil), // 4: stream.app.v1.LogoutRequest
|
||||
(*ChangePasswordRequest)(nil), // 5: stream.app.v1.ChangePasswordRequest
|
||||
(*ForgotPasswordRequest)(nil), // 6: stream.app.v1.ForgotPasswordRequest
|
||||
(*ResetPasswordRequest)(nil), // 7: stream.app.v1.ResetPasswordRequest
|
||||
(*GetGoogleLoginUrlRequest)(nil), // 8: stream.app.v1.GetGoogleLoginUrlRequest
|
||||
(*GetGoogleLoginUrlResponse)(nil), // 9: stream.app.v1.GetGoogleLoginUrlResponse
|
||||
(*CompleteGoogleLoginRequest)(nil), // 10: stream.app.v1.CompleteGoogleLoginRequest
|
||||
(*CompleteGoogleLoginResponse)(nil), // 11: stream.app.v1.CompleteGoogleLoginResponse
|
||||
(*User)(nil), // 12: stream.app.v1.User
|
||||
(*MessageResponse)(nil), // 13: stream.app.v1.MessageResponse
|
||||
}
|
||||
var file_app_v1_auth_proto_depIdxs = []int32{
|
||||
12, // 0: stream.app.v1.LoginResponse.user:type_name -> stream.app.v1.User
|
||||
12, // 1: stream.app.v1.RegisterResponse.user:type_name -> stream.app.v1.User
|
||||
12, // 2: stream.app.v1.CompleteGoogleLoginResponse.user:type_name -> stream.app.v1.User
|
||||
0, // 3: stream.app.v1.Auth.Login:input_type -> stream.app.v1.LoginRequest
|
||||
2, // 4: stream.app.v1.Auth.Register:input_type -> stream.app.v1.RegisterRequest
|
||||
4, // 5: stream.app.v1.Auth.Logout:input_type -> stream.app.v1.LogoutRequest
|
||||
5, // 6: stream.app.v1.Auth.ChangePassword:input_type -> stream.app.v1.ChangePasswordRequest
|
||||
6, // 7: stream.app.v1.Auth.ForgotPassword:input_type -> stream.app.v1.ForgotPasswordRequest
|
||||
7, // 8: stream.app.v1.Auth.ResetPassword:input_type -> stream.app.v1.ResetPasswordRequest
|
||||
8, // 9: stream.app.v1.Auth.GetGoogleLoginUrl:input_type -> stream.app.v1.GetGoogleLoginUrlRequest
|
||||
10, // 10: stream.app.v1.Auth.CompleteGoogleLogin:input_type -> stream.app.v1.CompleteGoogleLoginRequest
|
||||
1, // 11: stream.app.v1.Auth.Login:output_type -> stream.app.v1.LoginResponse
|
||||
3, // 12: stream.app.v1.Auth.Register:output_type -> stream.app.v1.RegisterResponse
|
||||
13, // 13: stream.app.v1.Auth.Logout:output_type -> stream.app.v1.MessageResponse
|
||||
13, // 14: stream.app.v1.Auth.ChangePassword:output_type -> stream.app.v1.MessageResponse
|
||||
13, // 15: stream.app.v1.Auth.ForgotPassword:output_type -> stream.app.v1.MessageResponse
|
||||
13, // 16: stream.app.v1.Auth.ResetPassword:output_type -> stream.app.v1.MessageResponse
|
||||
9, // 17: stream.app.v1.Auth.GetGoogleLoginUrl:output_type -> stream.app.v1.GetGoogleLoginUrlResponse
|
||||
11, // 18: stream.app.v1.Auth.CompleteGoogleLogin:output_type -> stream.app.v1.CompleteGoogleLoginResponse
|
||||
11, // [11:19] is the sub-list for method output_type
|
||||
3, // [3:11] is the sub-list for method input_type
|
||||
3, // [3:3] is the sub-list for extension type_name
|
||||
3, // [3:3] is the sub-list for extension extendee
|
||||
0, // [0:3] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_app_v1_auth_proto_init() }
|
||||
func file_app_v1_auth_proto_init() {
|
||||
if File_app_v1_auth_proto != nil {
|
||||
return
|
||||
}
|
||||
file_app_v1_common_proto_init()
|
||||
file_app_v1_auth_proto_msgTypes[2].OneofWrappers = []any{}
|
||||
file_app_v1_auth_proto_msgTypes[10].OneofWrappers = []any{}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_app_v1_auth_proto_rawDesc), len(file_app_v1_auth_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 12,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_app_v1_auth_proto_goTypes,
|
||||
DependencyIndexes: file_app_v1_auth_proto_depIdxs,
|
||||
MessageInfos: file_app_v1_auth_proto_msgTypes,
|
||||
}.Build()
|
||||
File_app_v1_auth_proto = out.File
|
||||
file_app_v1_auth_proto_goTypes = nil
|
||||
file_app_v1_auth_proto_depIdxs = nil
|
||||
}
|
||||
387
internal/api/proto/app/v1/auth_grpc.pb.go
Normal file
387
internal/api/proto/app/v1/auth_grpc.pb.go
Normal file
@@ -0,0 +1,387 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.6.1
|
||||
// - protoc (unknown)
|
||||
// source: app/v1/auth.proto
|
||||
|
||||
package appv1
|
||||
|
||||
import (
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
// Requires gRPC-Go v1.64.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion9
|
||||
|
||||
const (
|
||||
Auth_Login_FullMethodName = "/stream.app.v1.Auth/Login"
|
||||
Auth_Register_FullMethodName = "/stream.app.v1.Auth/Register"
|
||||
Auth_Logout_FullMethodName = "/stream.app.v1.Auth/Logout"
|
||||
Auth_ChangePassword_FullMethodName = "/stream.app.v1.Auth/ChangePassword"
|
||||
Auth_ForgotPassword_FullMethodName = "/stream.app.v1.Auth/ForgotPassword"
|
||||
Auth_ResetPassword_FullMethodName = "/stream.app.v1.Auth/ResetPassword"
|
||||
Auth_GetGoogleLoginUrl_FullMethodName = "/stream.app.v1.Auth/GetGoogleLoginUrl"
|
||||
Auth_CompleteGoogleLogin_FullMethodName = "/stream.app.v1.Auth/CompleteGoogleLogin"
|
||||
)
|
||||
|
||||
// AuthClient is the client API for Auth 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 AuthClient interface {
|
||||
Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginResponse, error)
|
||||
Register(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (*RegisterResponse, error)
|
||||
Logout(ctx context.Context, in *LogoutRequest, opts ...grpc.CallOption) (*MessageResponse, error)
|
||||
ChangePassword(ctx context.Context, in *ChangePasswordRequest, opts ...grpc.CallOption) (*MessageResponse, error)
|
||||
ForgotPassword(ctx context.Context, in *ForgotPasswordRequest, opts ...grpc.CallOption) (*MessageResponse, error)
|
||||
ResetPassword(ctx context.Context, in *ResetPasswordRequest, opts ...grpc.CallOption) (*MessageResponse, error)
|
||||
GetGoogleLoginUrl(ctx context.Context, in *GetGoogleLoginUrlRequest, opts ...grpc.CallOption) (*GetGoogleLoginUrlResponse, error)
|
||||
CompleteGoogleLogin(ctx context.Context, in *CompleteGoogleLoginRequest, opts ...grpc.CallOption) (*CompleteGoogleLoginResponse, error)
|
||||
}
|
||||
|
||||
type authClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewAuthClient(cc grpc.ClientConnInterface) AuthClient {
|
||||
return &authClient{cc}
|
||||
}
|
||||
|
||||
func (c *authClient) Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(LoginResponse)
|
||||
err := c.cc.Invoke(ctx, Auth_Login_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *authClient) Register(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (*RegisterResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(RegisterResponse)
|
||||
err := c.cc.Invoke(ctx, Auth_Register_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *authClient) Logout(ctx context.Context, in *LogoutRequest, opts ...grpc.CallOption) (*MessageResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(MessageResponse)
|
||||
err := c.cc.Invoke(ctx, Auth_Logout_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *authClient) ChangePassword(ctx context.Context, in *ChangePasswordRequest, opts ...grpc.CallOption) (*MessageResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(MessageResponse)
|
||||
err := c.cc.Invoke(ctx, Auth_ChangePassword_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *authClient) ForgotPassword(ctx context.Context, in *ForgotPasswordRequest, opts ...grpc.CallOption) (*MessageResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(MessageResponse)
|
||||
err := c.cc.Invoke(ctx, Auth_ForgotPassword_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *authClient) ResetPassword(ctx context.Context, in *ResetPasswordRequest, opts ...grpc.CallOption) (*MessageResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(MessageResponse)
|
||||
err := c.cc.Invoke(ctx, Auth_ResetPassword_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *authClient) GetGoogleLoginUrl(ctx context.Context, in *GetGoogleLoginUrlRequest, opts ...grpc.CallOption) (*GetGoogleLoginUrlResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(GetGoogleLoginUrlResponse)
|
||||
err := c.cc.Invoke(ctx, Auth_GetGoogleLoginUrl_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *authClient) CompleteGoogleLogin(ctx context.Context, in *CompleteGoogleLoginRequest, opts ...grpc.CallOption) (*CompleteGoogleLoginResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(CompleteGoogleLoginResponse)
|
||||
err := c.cc.Invoke(ctx, Auth_CompleteGoogleLogin_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// AuthServer is the server API for Auth service.
|
||||
// All implementations must embed UnimplementedAuthServer
|
||||
// for forward compatibility.
|
||||
type AuthServer interface {
|
||||
Login(context.Context, *LoginRequest) (*LoginResponse, error)
|
||||
Register(context.Context, *RegisterRequest) (*RegisterResponse, error)
|
||||
Logout(context.Context, *LogoutRequest) (*MessageResponse, error)
|
||||
ChangePassword(context.Context, *ChangePasswordRequest) (*MessageResponse, error)
|
||||
ForgotPassword(context.Context, *ForgotPasswordRequest) (*MessageResponse, error)
|
||||
ResetPassword(context.Context, *ResetPasswordRequest) (*MessageResponse, error)
|
||||
GetGoogleLoginUrl(context.Context, *GetGoogleLoginUrlRequest) (*GetGoogleLoginUrlResponse, error)
|
||||
CompleteGoogleLogin(context.Context, *CompleteGoogleLoginRequest) (*CompleteGoogleLoginResponse, error)
|
||||
mustEmbedUnimplementedAuthServer()
|
||||
}
|
||||
|
||||
// UnimplementedAuthServer must be embedded to have
|
||||
// forward compatible implementations.
|
||||
//
|
||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedAuthServer struct{}
|
||||
|
||||
func (UnimplementedAuthServer) Login(context.Context, *LoginRequest) (*LoginResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method Login not implemented")
|
||||
}
|
||||
func (UnimplementedAuthServer) Register(context.Context, *RegisterRequest) (*RegisterResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method Register not implemented")
|
||||
}
|
||||
func (UnimplementedAuthServer) Logout(context.Context, *LogoutRequest) (*MessageResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method Logout not implemented")
|
||||
}
|
||||
func (UnimplementedAuthServer) ChangePassword(context.Context, *ChangePasswordRequest) (*MessageResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method ChangePassword not implemented")
|
||||
}
|
||||
func (UnimplementedAuthServer) ForgotPassword(context.Context, *ForgotPasswordRequest) (*MessageResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method ForgotPassword not implemented")
|
||||
}
|
||||
func (UnimplementedAuthServer) ResetPassword(context.Context, *ResetPasswordRequest) (*MessageResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method ResetPassword not implemented")
|
||||
}
|
||||
func (UnimplementedAuthServer) GetGoogleLoginUrl(context.Context, *GetGoogleLoginUrlRequest) (*GetGoogleLoginUrlResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method GetGoogleLoginUrl not implemented")
|
||||
}
|
||||
func (UnimplementedAuthServer) CompleteGoogleLogin(context.Context, *CompleteGoogleLoginRequest) (*CompleteGoogleLoginResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method CompleteGoogleLogin not implemented")
|
||||
}
|
||||
func (UnimplementedAuthServer) mustEmbedUnimplementedAuthServer() {}
|
||||
func (UnimplementedAuthServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeAuthServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to AuthServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeAuthServer interface {
|
||||
mustEmbedUnimplementedAuthServer()
|
||||
}
|
||||
|
||||
func RegisterAuthServer(s grpc.ServiceRegistrar, srv AuthServer) {
|
||||
// If the following call panics, it indicates UnimplementedAuthServer was
|
||||
// embedded by pointer and is nil. This will cause panics if an
|
||||
// unimplemented method is ever invoked, so we test this at initialization
|
||||
// time to prevent it from happening at runtime later due to I/O.
|
||||
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
||||
t.testEmbeddedByValue()
|
||||
}
|
||||
s.RegisterService(&Auth_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _Auth_Login_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(LoginRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AuthServer).Login(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Auth_Login_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AuthServer).Login(ctx, req.(*LoginRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Auth_Register_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(RegisterRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AuthServer).Register(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Auth_Register_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AuthServer).Register(ctx, req.(*RegisterRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Auth_Logout_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(LogoutRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AuthServer).Logout(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Auth_Logout_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AuthServer).Logout(ctx, req.(*LogoutRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Auth_ChangePassword_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ChangePasswordRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AuthServer).ChangePassword(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Auth_ChangePassword_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AuthServer).ChangePassword(ctx, req.(*ChangePasswordRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Auth_ForgotPassword_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ForgotPasswordRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AuthServer).ForgotPassword(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Auth_ForgotPassword_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AuthServer).ForgotPassword(ctx, req.(*ForgotPasswordRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Auth_ResetPassword_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ResetPasswordRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AuthServer).ResetPassword(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Auth_ResetPassword_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AuthServer).ResetPassword(ctx, req.(*ResetPasswordRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Auth_GetGoogleLoginUrl_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetGoogleLoginUrlRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AuthServer).GetGoogleLoginUrl(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Auth_GetGoogleLoginUrl_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AuthServer).GetGoogleLoginUrl(ctx, req.(*GetGoogleLoginUrlRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Auth_CompleteGoogleLogin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CompleteGoogleLoginRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AuthServer).CompleteGoogleLogin(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Auth_CompleteGoogleLogin_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AuthServer).CompleteGoogleLogin(ctx, req.(*CompleteGoogleLoginRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// Auth_ServiceDesc is the grpc.ServiceDesc for Auth service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var Auth_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "stream.app.v1.Auth",
|
||||
HandlerType: (*AuthServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "Login",
|
||||
Handler: _Auth_Login_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Register",
|
||||
Handler: _Auth_Register_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Logout",
|
||||
Handler: _Auth_Logout_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ChangePassword",
|
||||
Handler: _Auth_ChangePassword_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ForgotPassword",
|
||||
Handler: _Auth_ForgotPassword_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ResetPassword",
|
||||
Handler: _Auth_ResetPassword_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetGoogleLoginUrl",
|
||||
Handler: _Auth_GetGoogleLoginUrl_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "CompleteGoogleLogin",
|
||||
Handler: _Auth_CompleteGoogleLogin_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "app/v1/auth.proto",
|
||||
}
|
||||
1465
internal/api/proto/app/v1/catalog.pb.go
Normal file
1465
internal/api/proto/app/v1/catalog.pb.go
Normal file
File diff suppressed because it is too large
Load Diff
731
internal/api/proto/app/v1/catalog_grpc.pb.go
Normal file
731
internal/api/proto/app/v1/catalog_grpc.pb.go
Normal file
@@ -0,0 +1,731 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.6.1
|
||||
// - protoc (unknown)
|
||||
// source: app/v1/catalog.proto
|
||||
|
||||
package appv1
|
||||
|
||||
import (
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
// Requires gRPC-Go v1.64.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion9
|
||||
|
||||
const (
|
||||
Domains_ListDomains_FullMethodName = "/stream.app.v1.Domains/ListDomains"
|
||||
Domains_CreateDomain_FullMethodName = "/stream.app.v1.Domains/CreateDomain"
|
||||
Domains_DeleteDomain_FullMethodName = "/stream.app.v1.Domains/DeleteDomain"
|
||||
)
|
||||
|
||||
// DomainsClient is the client API for Domains 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 DomainsClient interface {
|
||||
ListDomains(ctx context.Context, in *ListDomainsRequest, opts ...grpc.CallOption) (*ListDomainsResponse, error)
|
||||
CreateDomain(ctx context.Context, in *CreateDomainRequest, opts ...grpc.CallOption) (*CreateDomainResponse, error)
|
||||
DeleteDomain(ctx context.Context, in *DeleteDomainRequest, opts ...grpc.CallOption) (*MessageResponse, error)
|
||||
}
|
||||
|
||||
type domainsClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewDomainsClient(cc grpc.ClientConnInterface) DomainsClient {
|
||||
return &domainsClient{cc}
|
||||
}
|
||||
|
||||
func (c *domainsClient) ListDomains(ctx context.Context, in *ListDomainsRequest, opts ...grpc.CallOption) (*ListDomainsResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(ListDomainsResponse)
|
||||
err := c.cc.Invoke(ctx, Domains_ListDomains_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *domainsClient) CreateDomain(ctx context.Context, in *CreateDomainRequest, opts ...grpc.CallOption) (*CreateDomainResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(CreateDomainResponse)
|
||||
err := c.cc.Invoke(ctx, Domains_CreateDomain_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *domainsClient) DeleteDomain(ctx context.Context, in *DeleteDomainRequest, opts ...grpc.CallOption) (*MessageResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(MessageResponse)
|
||||
err := c.cc.Invoke(ctx, Domains_DeleteDomain_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// DomainsServer is the server API for Domains service.
|
||||
// All implementations must embed UnimplementedDomainsServer
|
||||
// for forward compatibility.
|
||||
type DomainsServer interface {
|
||||
ListDomains(context.Context, *ListDomainsRequest) (*ListDomainsResponse, error)
|
||||
CreateDomain(context.Context, *CreateDomainRequest) (*CreateDomainResponse, error)
|
||||
DeleteDomain(context.Context, *DeleteDomainRequest) (*MessageResponse, error)
|
||||
mustEmbedUnimplementedDomainsServer()
|
||||
}
|
||||
|
||||
// UnimplementedDomainsServer must be embedded to have
|
||||
// forward compatible implementations.
|
||||
//
|
||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedDomainsServer struct{}
|
||||
|
||||
func (UnimplementedDomainsServer) ListDomains(context.Context, *ListDomainsRequest) (*ListDomainsResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method ListDomains not implemented")
|
||||
}
|
||||
func (UnimplementedDomainsServer) CreateDomain(context.Context, *CreateDomainRequest) (*CreateDomainResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method CreateDomain not implemented")
|
||||
}
|
||||
func (UnimplementedDomainsServer) DeleteDomain(context.Context, *DeleteDomainRequest) (*MessageResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method DeleteDomain not implemented")
|
||||
}
|
||||
func (UnimplementedDomainsServer) mustEmbedUnimplementedDomainsServer() {}
|
||||
func (UnimplementedDomainsServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeDomainsServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to DomainsServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeDomainsServer interface {
|
||||
mustEmbedUnimplementedDomainsServer()
|
||||
}
|
||||
|
||||
func RegisterDomainsServer(s grpc.ServiceRegistrar, srv DomainsServer) {
|
||||
// If the following call panics, it indicates UnimplementedDomainsServer was
|
||||
// embedded by pointer and is nil. This will cause panics if an
|
||||
// unimplemented method is ever invoked, so we test this at initialization
|
||||
// time to prevent it from happening at runtime later due to I/O.
|
||||
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
||||
t.testEmbeddedByValue()
|
||||
}
|
||||
s.RegisterService(&Domains_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _Domains_ListDomains_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ListDomainsRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DomainsServer).ListDomains(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Domains_ListDomains_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DomainsServer).ListDomains(ctx, req.(*ListDomainsRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Domains_CreateDomain_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CreateDomainRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DomainsServer).CreateDomain(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Domains_CreateDomain_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DomainsServer).CreateDomain(ctx, req.(*CreateDomainRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Domains_DeleteDomain_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DeleteDomainRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DomainsServer).DeleteDomain(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Domains_DeleteDomain_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DomainsServer).DeleteDomain(ctx, req.(*DeleteDomainRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// Domains_ServiceDesc is the grpc.ServiceDesc for Domains service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var Domains_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "stream.app.v1.Domains",
|
||||
HandlerType: (*DomainsServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "ListDomains",
|
||||
Handler: _Domains_ListDomains_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "CreateDomain",
|
||||
Handler: _Domains_CreateDomain_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "DeleteDomain",
|
||||
Handler: _Domains_DeleteDomain_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "app/v1/catalog.proto",
|
||||
}
|
||||
|
||||
const (
|
||||
AdTemplates_ListAdTemplates_FullMethodName = "/stream.app.v1.AdTemplates/ListAdTemplates"
|
||||
AdTemplates_CreateAdTemplate_FullMethodName = "/stream.app.v1.AdTemplates/CreateAdTemplate"
|
||||
AdTemplates_UpdateAdTemplate_FullMethodName = "/stream.app.v1.AdTemplates/UpdateAdTemplate"
|
||||
AdTemplates_DeleteAdTemplate_FullMethodName = "/stream.app.v1.AdTemplates/DeleteAdTemplate"
|
||||
)
|
||||
|
||||
// AdTemplatesClient is the client API for AdTemplates 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 AdTemplatesClient interface {
|
||||
ListAdTemplates(ctx context.Context, in *ListAdTemplatesRequest, opts ...grpc.CallOption) (*ListAdTemplatesResponse, error)
|
||||
CreateAdTemplate(ctx context.Context, in *CreateAdTemplateRequest, opts ...grpc.CallOption) (*CreateAdTemplateResponse, error)
|
||||
UpdateAdTemplate(ctx context.Context, in *UpdateAdTemplateRequest, opts ...grpc.CallOption) (*UpdateAdTemplateResponse, error)
|
||||
DeleteAdTemplate(ctx context.Context, in *DeleteAdTemplateRequest, opts ...grpc.CallOption) (*MessageResponse, error)
|
||||
}
|
||||
|
||||
type adTemplatesClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewAdTemplatesClient(cc grpc.ClientConnInterface) AdTemplatesClient {
|
||||
return &adTemplatesClient{cc}
|
||||
}
|
||||
|
||||
func (c *adTemplatesClient) ListAdTemplates(ctx context.Context, in *ListAdTemplatesRequest, opts ...grpc.CallOption) (*ListAdTemplatesResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(ListAdTemplatesResponse)
|
||||
err := c.cc.Invoke(ctx, AdTemplates_ListAdTemplates_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *adTemplatesClient) CreateAdTemplate(ctx context.Context, in *CreateAdTemplateRequest, opts ...grpc.CallOption) (*CreateAdTemplateResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(CreateAdTemplateResponse)
|
||||
err := c.cc.Invoke(ctx, AdTemplates_CreateAdTemplate_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *adTemplatesClient) UpdateAdTemplate(ctx context.Context, in *UpdateAdTemplateRequest, opts ...grpc.CallOption) (*UpdateAdTemplateResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(UpdateAdTemplateResponse)
|
||||
err := c.cc.Invoke(ctx, AdTemplates_UpdateAdTemplate_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *adTemplatesClient) DeleteAdTemplate(ctx context.Context, in *DeleteAdTemplateRequest, opts ...grpc.CallOption) (*MessageResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(MessageResponse)
|
||||
err := c.cc.Invoke(ctx, AdTemplates_DeleteAdTemplate_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// AdTemplatesServer is the server API for AdTemplates service.
|
||||
// All implementations must embed UnimplementedAdTemplatesServer
|
||||
// for forward compatibility.
|
||||
type AdTemplatesServer interface {
|
||||
ListAdTemplates(context.Context, *ListAdTemplatesRequest) (*ListAdTemplatesResponse, error)
|
||||
CreateAdTemplate(context.Context, *CreateAdTemplateRequest) (*CreateAdTemplateResponse, error)
|
||||
UpdateAdTemplate(context.Context, *UpdateAdTemplateRequest) (*UpdateAdTemplateResponse, error)
|
||||
DeleteAdTemplate(context.Context, *DeleteAdTemplateRequest) (*MessageResponse, error)
|
||||
mustEmbedUnimplementedAdTemplatesServer()
|
||||
}
|
||||
|
||||
// UnimplementedAdTemplatesServer must be embedded to have
|
||||
// forward compatible implementations.
|
||||
//
|
||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedAdTemplatesServer struct{}
|
||||
|
||||
func (UnimplementedAdTemplatesServer) ListAdTemplates(context.Context, *ListAdTemplatesRequest) (*ListAdTemplatesResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method ListAdTemplates not implemented")
|
||||
}
|
||||
func (UnimplementedAdTemplatesServer) CreateAdTemplate(context.Context, *CreateAdTemplateRequest) (*CreateAdTemplateResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method CreateAdTemplate not implemented")
|
||||
}
|
||||
func (UnimplementedAdTemplatesServer) UpdateAdTemplate(context.Context, *UpdateAdTemplateRequest) (*UpdateAdTemplateResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method UpdateAdTemplate not implemented")
|
||||
}
|
||||
func (UnimplementedAdTemplatesServer) DeleteAdTemplate(context.Context, *DeleteAdTemplateRequest) (*MessageResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method DeleteAdTemplate not implemented")
|
||||
}
|
||||
func (UnimplementedAdTemplatesServer) mustEmbedUnimplementedAdTemplatesServer() {}
|
||||
func (UnimplementedAdTemplatesServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeAdTemplatesServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to AdTemplatesServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeAdTemplatesServer interface {
|
||||
mustEmbedUnimplementedAdTemplatesServer()
|
||||
}
|
||||
|
||||
func RegisterAdTemplatesServer(s grpc.ServiceRegistrar, srv AdTemplatesServer) {
|
||||
// If the following call panics, it indicates UnimplementedAdTemplatesServer was
|
||||
// embedded by pointer and is nil. This will cause panics if an
|
||||
// unimplemented method is ever invoked, so we test this at initialization
|
||||
// time to prevent it from happening at runtime later due to I/O.
|
||||
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
||||
t.testEmbeddedByValue()
|
||||
}
|
||||
s.RegisterService(&AdTemplates_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _AdTemplates_ListAdTemplates_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ListAdTemplatesRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AdTemplatesServer).ListAdTemplates(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: AdTemplates_ListAdTemplates_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AdTemplatesServer).ListAdTemplates(ctx, req.(*ListAdTemplatesRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _AdTemplates_CreateAdTemplate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CreateAdTemplateRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AdTemplatesServer).CreateAdTemplate(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: AdTemplates_CreateAdTemplate_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AdTemplatesServer).CreateAdTemplate(ctx, req.(*CreateAdTemplateRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _AdTemplates_UpdateAdTemplate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(UpdateAdTemplateRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AdTemplatesServer).UpdateAdTemplate(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: AdTemplates_UpdateAdTemplate_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AdTemplatesServer).UpdateAdTemplate(ctx, req.(*UpdateAdTemplateRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _AdTemplates_DeleteAdTemplate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DeleteAdTemplateRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AdTemplatesServer).DeleteAdTemplate(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: AdTemplates_DeleteAdTemplate_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AdTemplatesServer).DeleteAdTemplate(ctx, req.(*DeleteAdTemplateRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// AdTemplates_ServiceDesc is the grpc.ServiceDesc for AdTemplates service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var AdTemplates_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "stream.app.v1.AdTemplates",
|
||||
HandlerType: (*AdTemplatesServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "ListAdTemplates",
|
||||
Handler: _AdTemplates_ListAdTemplates_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "CreateAdTemplate",
|
||||
Handler: _AdTemplates_CreateAdTemplate_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UpdateAdTemplate",
|
||||
Handler: _AdTemplates_UpdateAdTemplate_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "DeleteAdTemplate",
|
||||
Handler: _AdTemplates_DeleteAdTemplate_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "app/v1/catalog.proto",
|
||||
}
|
||||
|
||||
const (
|
||||
PlayerConfigs_ListPlayerConfigs_FullMethodName = "/stream.app.v1.PlayerConfigs/ListPlayerConfigs"
|
||||
PlayerConfigs_CreatePlayerConfig_FullMethodName = "/stream.app.v1.PlayerConfigs/CreatePlayerConfig"
|
||||
PlayerConfigs_UpdatePlayerConfig_FullMethodName = "/stream.app.v1.PlayerConfigs/UpdatePlayerConfig"
|
||||
PlayerConfigs_DeletePlayerConfig_FullMethodName = "/stream.app.v1.PlayerConfigs/DeletePlayerConfig"
|
||||
)
|
||||
|
||||
// PlayerConfigsClient is the client API for PlayerConfigs 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 PlayerConfigsClient interface {
|
||||
ListPlayerConfigs(ctx context.Context, in *ListPlayerConfigsRequest, opts ...grpc.CallOption) (*ListPlayerConfigsResponse, error)
|
||||
CreatePlayerConfig(ctx context.Context, in *CreatePlayerConfigRequest, opts ...grpc.CallOption) (*CreatePlayerConfigResponse, error)
|
||||
UpdatePlayerConfig(ctx context.Context, in *UpdatePlayerConfigRequest, opts ...grpc.CallOption) (*UpdatePlayerConfigResponse, error)
|
||||
DeletePlayerConfig(ctx context.Context, in *DeletePlayerConfigRequest, opts ...grpc.CallOption) (*MessageResponse, error)
|
||||
}
|
||||
|
||||
type playerConfigsClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewPlayerConfigsClient(cc grpc.ClientConnInterface) PlayerConfigsClient {
|
||||
return &playerConfigsClient{cc}
|
||||
}
|
||||
|
||||
func (c *playerConfigsClient) ListPlayerConfigs(ctx context.Context, in *ListPlayerConfigsRequest, opts ...grpc.CallOption) (*ListPlayerConfigsResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(ListPlayerConfigsResponse)
|
||||
err := c.cc.Invoke(ctx, PlayerConfigs_ListPlayerConfigs_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *playerConfigsClient) CreatePlayerConfig(ctx context.Context, in *CreatePlayerConfigRequest, opts ...grpc.CallOption) (*CreatePlayerConfigResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(CreatePlayerConfigResponse)
|
||||
err := c.cc.Invoke(ctx, PlayerConfigs_CreatePlayerConfig_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *playerConfigsClient) UpdatePlayerConfig(ctx context.Context, in *UpdatePlayerConfigRequest, opts ...grpc.CallOption) (*UpdatePlayerConfigResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(UpdatePlayerConfigResponse)
|
||||
err := c.cc.Invoke(ctx, PlayerConfigs_UpdatePlayerConfig_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *playerConfigsClient) DeletePlayerConfig(ctx context.Context, in *DeletePlayerConfigRequest, opts ...grpc.CallOption) (*MessageResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(MessageResponse)
|
||||
err := c.cc.Invoke(ctx, PlayerConfigs_DeletePlayerConfig_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// PlayerConfigsServer is the server API for PlayerConfigs service.
|
||||
// All implementations must embed UnimplementedPlayerConfigsServer
|
||||
// for forward compatibility.
|
||||
type PlayerConfigsServer interface {
|
||||
ListPlayerConfigs(context.Context, *ListPlayerConfigsRequest) (*ListPlayerConfigsResponse, error)
|
||||
CreatePlayerConfig(context.Context, *CreatePlayerConfigRequest) (*CreatePlayerConfigResponse, error)
|
||||
UpdatePlayerConfig(context.Context, *UpdatePlayerConfigRequest) (*UpdatePlayerConfigResponse, error)
|
||||
DeletePlayerConfig(context.Context, *DeletePlayerConfigRequest) (*MessageResponse, error)
|
||||
mustEmbedUnimplementedPlayerConfigsServer()
|
||||
}
|
||||
|
||||
// UnimplementedPlayerConfigsServer must be embedded to have
|
||||
// forward compatible implementations.
|
||||
//
|
||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedPlayerConfigsServer struct{}
|
||||
|
||||
func (UnimplementedPlayerConfigsServer) ListPlayerConfigs(context.Context, *ListPlayerConfigsRequest) (*ListPlayerConfigsResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method ListPlayerConfigs not implemented")
|
||||
}
|
||||
func (UnimplementedPlayerConfigsServer) CreatePlayerConfig(context.Context, *CreatePlayerConfigRequest) (*CreatePlayerConfigResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method CreatePlayerConfig not implemented")
|
||||
}
|
||||
func (UnimplementedPlayerConfigsServer) UpdatePlayerConfig(context.Context, *UpdatePlayerConfigRequest) (*UpdatePlayerConfigResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method UpdatePlayerConfig not implemented")
|
||||
}
|
||||
func (UnimplementedPlayerConfigsServer) DeletePlayerConfig(context.Context, *DeletePlayerConfigRequest) (*MessageResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method DeletePlayerConfig not implemented")
|
||||
}
|
||||
func (UnimplementedPlayerConfigsServer) mustEmbedUnimplementedPlayerConfigsServer() {}
|
||||
func (UnimplementedPlayerConfigsServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafePlayerConfigsServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to PlayerConfigsServer will
|
||||
// result in compilation errors.
|
||||
type UnsafePlayerConfigsServer interface {
|
||||
mustEmbedUnimplementedPlayerConfigsServer()
|
||||
}
|
||||
|
||||
func RegisterPlayerConfigsServer(s grpc.ServiceRegistrar, srv PlayerConfigsServer) {
|
||||
// If the following call panics, it indicates UnimplementedPlayerConfigsServer was
|
||||
// embedded by pointer and is nil. This will cause panics if an
|
||||
// unimplemented method is ever invoked, so we test this at initialization
|
||||
// time to prevent it from happening at runtime later due to I/O.
|
||||
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
||||
t.testEmbeddedByValue()
|
||||
}
|
||||
s.RegisterService(&PlayerConfigs_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _PlayerConfigs_ListPlayerConfigs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ListPlayerConfigsRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(PlayerConfigsServer).ListPlayerConfigs(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: PlayerConfigs_ListPlayerConfigs_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(PlayerConfigsServer).ListPlayerConfigs(ctx, req.(*ListPlayerConfigsRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _PlayerConfigs_CreatePlayerConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CreatePlayerConfigRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(PlayerConfigsServer).CreatePlayerConfig(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: PlayerConfigs_CreatePlayerConfig_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(PlayerConfigsServer).CreatePlayerConfig(ctx, req.(*CreatePlayerConfigRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _PlayerConfigs_UpdatePlayerConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(UpdatePlayerConfigRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(PlayerConfigsServer).UpdatePlayerConfig(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: PlayerConfigs_UpdatePlayerConfig_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(PlayerConfigsServer).UpdatePlayerConfig(ctx, req.(*UpdatePlayerConfigRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _PlayerConfigs_DeletePlayerConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DeletePlayerConfigRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(PlayerConfigsServer).DeletePlayerConfig(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: PlayerConfigs_DeletePlayerConfig_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(PlayerConfigsServer).DeletePlayerConfig(ctx, req.(*DeletePlayerConfigRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// PlayerConfigs_ServiceDesc is the grpc.ServiceDesc for PlayerConfigs service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var PlayerConfigs_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "stream.app.v1.PlayerConfigs",
|
||||
HandlerType: (*PlayerConfigsServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "ListPlayerConfigs",
|
||||
Handler: _PlayerConfigs_ListPlayerConfigs_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "CreatePlayerConfig",
|
||||
Handler: _PlayerConfigs_CreatePlayerConfig_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UpdatePlayerConfig",
|
||||
Handler: _PlayerConfigs_UpdatePlayerConfig_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "DeletePlayerConfig",
|
||||
Handler: _PlayerConfigs_DeletePlayerConfig_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "app/v1/catalog.proto",
|
||||
}
|
||||
|
||||
const (
|
||||
Plans_ListPlans_FullMethodName = "/stream.app.v1.Plans/ListPlans"
|
||||
)
|
||||
|
||||
// PlansClient is the client API for Plans 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 PlansClient interface {
|
||||
ListPlans(ctx context.Context, in *ListPlansRequest, opts ...grpc.CallOption) (*ListPlansResponse, error)
|
||||
}
|
||||
|
||||
type plansClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewPlansClient(cc grpc.ClientConnInterface) PlansClient {
|
||||
return &plansClient{cc}
|
||||
}
|
||||
|
||||
func (c *plansClient) ListPlans(ctx context.Context, in *ListPlansRequest, opts ...grpc.CallOption) (*ListPlansResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(ListPlansResponse)
|
||||
err := c.cc.Invoke(ctx, Plans_ListPlans_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// PlansServer is the server API for Plans service.
|
||||
// All implementations must embed UnimplementedPlansServer
|
||||
// for forward compatibility.
|
||||
type PlansServer interface {
|
||||
ListPlans(context.Context, *ListPlansRequest) (*ListPlansResponse, error)
|
||||
mustEmbedUnimplementedPlansServer()
|
||||
}
|
||||
|
||||
// UnimplementedPlansServer must be embedded to have
|
||||
// forward compatible implementations.
|
||||
//
|
||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedPlansServer struct{}
|
||||
|
||||
func (UnimplementedPlansServer) ListPlans(context.Context, *ListPlansRequest) (*ListPlansResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method ListPlans not implemented")
|
||||
}
|
||||
func (UnimplementedPlansServer) mustEmbedUnimplementedPlansServer() {}
|
||||
func (UnimplementedPlansServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafePlansServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to PlansServer will
|
||||
// result in compilation errors.
|
||||
type UnsafePlansServer interface {
|
||||
mustEmbedUnimplementedPlansServer()
|
||||
}
|
||||
|
||||
func RegisterPlansServer(s grpc.ServiceRegistrar, srv PlansServer) {
|
||||
// If the following call panics, it indicates UnimplementedPlansServer was
|
||||
// embedded by pointer and is nil. This will cause panics if an
|
||||
// unimplemented method is ever invoked, so we test this at initialization
|
||||
// time to prevent it from happening at runtime later due to I/O.
|
||||
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
||||
t.testEmbeddedByValue()
|
||||
}
|
||||
s.RegisterService(&Plans_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _Plans_ListPlans_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ListPlansRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(PlansServer).ListPlans(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Plans_ListPlans_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(PlansServer).ListPlans(ctx, req.(*ListPlansRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// Plans_ServiceDesc is the grpc.ServiceDesc for Plans service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var Plans_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "stream.app.v1.Plans",
|
||||
HandlerType: (*PlansServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "ListPlans",
|
||||
Handler: _Plans_ListPlans_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "app/v1/catalog.proto",
|
||||
}
|
||||
3849
internal/api/proto/app/v1/common.pb.go
Normal file
3849
internal/api/proto/app/v1/common.pb.go
Normal file
File diff suppressed because it is too large
Load Diff
631
internal/api/proto/app/v1/payments.pb.go
Normal file
631
internal/api/proto/app/v1/payments.pb.go
Normal file
@@ -0,0 +1,631 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.11
|
||||
// protoc (unknown)
|
||||
// source: app/v1/payments.proto
|
||||
|
||||
package appv1
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
)
|
||||
|
||||
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)
|
||||
)
|
||||
|
||||
type CreatePaymentRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
PlanId string `protobuf:"bytes,1,opt,name=plan_id,json=planId,proto3" json:"plan_id,omitempty"`
|
||||
TermMonths int32 `protobuf:"varint,2,opt,name=term_months,json=termMonths,proto3" json:"term_months,omitempty"`
|
||||
PaymentMethod string `protobuf:"bytes,3,opt,name=payment_method,json=paymentMethod,proto3" json:"payment_method,omitempty"`
|
||||
TopupAmount *float64 `protobuf:"fixed64,4,opt,name=topup_amount,json=topupAmount,proto3,oneof" json:"topup_amount,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *CreatePaymentRequest) Reset() {
|
||||
*x = CreatePaymentRequest{}
|
||||
mi := &file_app_v1_payments_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *CreatePaymentRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*CreatePaymentRequest) ProtoMessage() {}
|
||||
|
||||
func (x *CreatePaymentRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_app_v1_payments_proto_msgTypes[0]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use CreatePaymentRequest.ProtoReflect.Descriptor instead.
|
||||
func (*CreatePaymentRequest) Descriptor() ([]byte, []int) {
|
||||
return file_app_v1_payments_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *CreatePaymentRequest) GetPlanId() string {
|
||||
if x != nil {
|
||||
return x.PlanId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *CreatePaymentRequest) GetTermMonths() int32 {
|
||||
if x != nil {
|
||||
return x.TermMonths
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *CreatePaymentRequest) GetPaymentMethod() string {
|
||||
if x != nil {
|
||||
return x.PaymentMethod
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *CreatePaymentRequest) GetTopupAmount() float64 {
|
||||
if x != nil && x.TopupAmount != nil {
|
||||
return *x.TopupAmount
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type CreatePaymentResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Payment *Payment `protobuf:"bytes,1,opt,name=payment,proto3" json:"payment,omitempty"`
|
||||
Subscription *PlanSubscription `protobuf:"bytes,2,opt,name=subscription,proto3" json:"subscription,omitempty"`
|
||||
WalletBalance float64 `protobuf:"fixed64,3,opt,name=wallet_balance,json=walletBalance,proto3" json:"wallet_balance,omitempty"`
|
||||
InvoiceId string `protobuf:"bytes,4,opt,name=invoice_id,json=invoiceId,proto3" json:"invoice_id,omitempty"`
|
||||
Message string `protobuf:"bytes,5,opt,name=message,proto3" json:"message,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *CreatePaymentResponse) Reset() {
|
||||
*x = CreatePaymentResponse{}
|
||||
mi := &file_app_v1_payments_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *CreatePaymentResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*CreatePaymentResponse) ProtoMessage() {}
|
||||
|
||||
func (x *CreatePaymentResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_app_v1_payments_proto_msgTypes[1]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use CreatePaymentResponse.ProtoReflect.Descriptor instead.
|
||||
func (*CreatePaymentResponse) Descriptor() ([]byte, []int) {
|
||||
return file_app_v1_payments_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *CreatePaymentResponse) GetPayment() *Payment {
|
||||
if x != nil {
|
||||
return x.Payment
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *CreatePaymentResponse) GetSubscription() *PlanSubscription {
|
||||
if x != nil {
|
||||
return x.Subscription
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *CreatePaymentResponse) GetWalletBalance() float64 {
|
||||
if x != nil {
|
||||
return x.WalletBalance
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *CreatePaymentResponse) GetInvoiceId() string {
|
||||
if x != nil {
|
||||
return x.InvoiceId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *CreatePaymentResponse) GetMessage() string {
|
||||
if x != nil {
|
||||
return x.Message
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type ListPaymentHistoryRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Page int32 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"`
|
||||
Limit int32 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *ListPaymentHistoryRequest) Reset() {
|
||||
*x = ListPaymentHistoryRequest{}
|
||||
mi := &file_app_v1_payments_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ListPaymentHistoryRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ListPaymentHistoryRequest) ProtoMessage() {}
|
||||
|
||||
func (x *ListPaymentHistoryRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_app_v1_payments_proto_msgTypes[2]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ListPaymentHistoryRequest.ProtoReflect.Descriptor instead.
|
||||
func (*ListPaymentHistoryRequest) Descriptor() ([]byte, []int) {
|
||||
return file_app_v1_payments_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *ListPaymentHistoryRequest) GetPage() int32 {
|
||||
if x != nil {
|
||||
return x.Page
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ListPaymentHistoryRequest) GetLimit() int32 {
|
||||
if x != nil {
|
||||
return x.Limit
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type ListPaymentHistoryResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Payments []*PaymentHistoryItem `protobuf:"bytes,1,rep,name=payments,proto3" json:"payments,omitempty"`
|
||||
Total int64 `protobuf:"varint,2,opt,name=total,proto3" json:"total,omitempty"`
|
||||
Page int32 `protobuf:"varint,3,opt,name=page,proto3" json:"page,omitempty"`
|
||||
Limit int32 `protobuf:"varint,4,opt,name=limit,proto3" json:"limit,omitempty"`
|
||||
HasPrev bool `protobuf:"varint,5,opt,name=has_prev,json=hasPrev,proto3" json:"has_prev,omitempty"`
|
||||
HasNext bool `protobuf:"varint,6,opt,name=has_next,json=hasNext,proto3" json:"has_next,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *ListPaymentHistoryResponse) Reset() {
|
||||
*x = ListPaymentHistoryResponse{}
|
||||
mi := &file_app_v1_payments_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ListPaymentHistoryResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ListPaymentHistoryResponse) ProtoMessage() {}
|
||||
|
||||
func (x *ListPaymentHistoryResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_app_v1_payments_proto_msgTypes[3]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ListPaymentHistoryResponse.ProtoReflect.Descriptor instead.
|
||||
func (*ListPaymentHistoryResponse) Descriptor() ([]byte, []int) {
|
||||
return file_app_v1_payments_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *ListPaymentHistoryResponse) GetPayments() []*PaymentHistoryItem {
|
||||
if x != nil {
|
||||
return x.Payments
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *ListPaymentHistoryResponse) GetTotal() int64 {
|
||||
if x != nil {
|
||||
return x.Total
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ListPaymentHistoryResponse) GetPage() int32 {
|
||||
if x != nil {
|
||||
return x.Page
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ListPaymentHistoryResponse) GetLimit() int32 {
|
||||
if x != nil {
|
||||
return x.Limit
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ListPaymentHistoryResponse) GetHasPrev() bool {
|
||||
if x != nil {
|
||||
return x.HasPrev
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *ListPaymentHistoryResponse) GetHasNext() bool {
|
||||
if x != nil {
|
||||
return x.HasNext
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
type TopupWalletRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Amount float64 `protobuf:"fixed64,1,opt,name=amount,proto3" json:"amount,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *TopupWalletRequest) Reset() {
|
||||
*x = TopupWalletRequest{}
|
||||
mi := &file_app_v1_payments_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *TopupWalletRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*TopupWalletRequest) ProtoMessage() {}
|
||||
|
||||
func (x *TopupWalletRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_app_v1_payments_proto_msgTypes[4]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use TopupWalletRequest.ProtoReflect.Descriptor instead.
|
||||
func (*TopupWalletRequest) Descriptor() ([]byte, []int) {
|
||||
return file_app_v1_payments_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *TopupWalletRequest) GetAmount() float64 {
|
||||
if x != nil {
|
||||
return x.Amount
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type TopupWalletResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
WalletTransaction *WalletTransaction `protobuf:"bytes,1,opt,name=wallet_transaction,json=walletTransaction,proto3" json:"wallet_transaction,omitempty"`
|
||||
WalletBalance float64 `protobuf:"fixed64,2,opt,name=wallet_balance,json=walletBalance,proto3" json:"wallet_balance,omitempty"`
|
||||
InvoiceId string `protobuf:"bytes,3,opt,name=invoice_id,json=invoiceId,proto3" json:"invoice_id,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *TopupWalletResponse) Reset() {
|
||||
*x = TopupWalletResponse{}
|
||||
mi := &file_app_v1_payments_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *TopupWalletResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*TopupWalletResponse) ProtoMessage() {}
|
||||
|
||||
func (x *TopupWalletResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_app_v1_payments_proto_msgTypes[5]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use TopupWalletResponse.ProtoReflect.Descriptor instead.
|
||||
func (*TopupWalletResponse) Descriptor() ([]byte, []int) {
|
||||
return file_app_v1_payments_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
func (x *TopupWalletResponse) GetWalletTransaction() *WalletTransaction {
|
||||
if x != nil {
|
||||
return x.WalletTransaction
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *TopupWalletResponse) GetWalletBalance() float64 {
|
||||
if x != nil {
|
||||
return x.WalletBalance
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *TopupWalletResponse) GetInvoiceId() string {
|
||||
if x != nil {
|
||||
return x.InvoiceId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type DownloadInvoiceRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *DownloadInvoiceRequest) Reset() {
|
||||
*x = DownloadInvoiceRequest{}
|
||||
mi := &file_app_v1_payments_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *DownloadInvoiceRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DownloadInvoiceRequest) ProtoMessage() {}
|
||||
|
||||
func (x *DownloadInvoiceRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_app_v1_payments_proto_msgTypes[6]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use DownloadInvoiceRequest.ProtoReflect.Descriptor instead.
|
||||
func (*DownloadInvoiceRequest) Descriptor() ([]byte, []int) {
|
||||
return file_app_v1_payments_proto_rawDescGZIP(), []int{6}
|
||||
}
|
||||
|
||||
func (x *DownloadInvoiceRequest) GetId() string {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type DownloadInvoiceResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Filename string `protobuf:"bytes,1,opt,name=filename,proto3" json:"filename,omitempty"`
|
||||
ContentType string `protobuf:"bytes,2,opt,name=content_type,json=contentType,proto3" json:"content_type,omitempty"`
|
||||
Content string `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *DownloadInvoiceResponse) Reset() {
|
||||
*x = DownloadInvoiceResponse{}
|
||||
mi := &file_app_v1_payments_proto_msgTypes[7]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *DownloadInvoiceResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DownloadInvoiceResponse) ProtoMessage() {}
|
||||
|
||||
func (x *DownloadInvoiceResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_app_v1_payments_proto_msgTypes[7]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use DownloadInvoiceResponse.ProtoReflect.Descriptor instead.
|
||||
func (*DownloadInvoiceResponse) Descriptor() ([]byte, []int) {
|
||||
return file_app_v1_payments_proto_rawDescGZIP(), []int{7}
|
||||
}
|
||||
|
||||
func (x *DownloadInvoiceResponse) GetFilename() string {
|
||||
if x != nil {
|
||||
return x.Filename
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *DownloadInvoiceResponse) GetContentType() string {
|
||||
if x != nil {
|
||||
return x.ContentType
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *DownloadInvoiceResponse) GetContent() string {
|
||||
if x != nil {
|
||||
return x.Content
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
var File_app_v1_payments_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_app_v1_payments_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"\x15app/v1/payments.proto\x12\rstream.app.v1\x1a\x13app/v1/common.proto\"\xb0\x01\n" +
|
||||
"\x14CreatePaymentRequest\x12\x17\n" +
|
||||
"\aplan_id\x18\x01 \x01(\tR\x06planId\x12\x1f\n" +
|
||||
"\vterm_months\x18\x02 \x01(\x05R\n" +
|
||||
"termMonths\x12%\n" +
|
||||
"\x0epayment_method\x18\x03 \x01(\tR\rpaymentMethod\x12&\n" +
|
||||
"\ftopup_amount\x18\x04 \x01(\x01H\x00R\vtopupAmount\x88\x01\x01B\x0f\n" +
|
||||
"\r_topup_amount\"\xee\x01\n" +
|
||||
"\x15CreatePaymentResponse\x120\n" +
|
||||
"\apayment\x18\x01 \x01(\v2\x16.stream.app.v1.PaymentR\apayment\x12C\n" +
|
||||
"\fsubscription\x18\x02 \x01(\v2\x1f.stream.app.v1.PlanSubscriptionR\fsubscription\x12%\n" +
|
||||
"\x0ewallet_balance\x18\x03 \x01(\x01R\rwalletBalance\x12\x1d\n" +
|
||||
"\n" +
|
||||
"invoice_id\x18\x04 \x01(\tR\tinvoiceId\x12\x18\n" +
|
||||
"\amessage\x18\x05 \x01(\tR\amessage\"E\n" +
|
||||
"\x19ListPaymentHistoryRequest\x12\x12\n" +
|
||||
"\x04page\x18\x01 \x01(\x05R\x04page\x12\x14\n" +
|
||||
"\x05limit\x18\x02 \x01(\x05R\x05limit\"\xd1\x01\n" +
|
||||
"\x1aListPaymentHistoryResponse\x12=\n" +
|
||||
"\bpayments\x18\x01 \x03(\v2!.stream.app.v1.PaymentHistoryItemR\bpayments\x12\x14\n" +
|
||||
"\x05total\x18\x02 \x01(\x03R\x05total\x12\x12\n" +
|
||||
"\x04page\x18\x03 \x01(\x05R\x04page\x12\x14\n" +
|
||||
"\x05limit\x18\x04 \x01(\x05R\x05limit\x12\x19\n" +
|
||||
"\bhas_prev\x18\x05 \x01(\bR\ahasPrev\x12\x19\n" +
|
||||
"\bhas_next\x18\x06 \x01(\bR\ahasNext\",\n" +
|
||||
"\x12TopupWalletRequest\x12\x16\n" +
|
||||
"\x06amount\x18\x01 \x01(\x01R\x06amount\"\xac\x01\n" +
|
||||
"\x13TopupWalletResponse\x12O\n" +
|
||||
"\x12wallet_transaction\x18\x01 \x01(\v2 .stream.app.v1.WalletTransactionR\x11walletTransaction\x12%\n" +
|
||||
"\x0ewallet_balance\x18\x02 \x01(\x01R\rwalletBalance\x12\x1d\n" +
|
||||
"\n" +
|
||||
"invoice_id\x18\x03 \x01(\tR\tinvoiceId\"(\n" +
|
||||
"\x16DownloadInvoiceRequest\x12\x0e\n" +
|
||||
"\x02id\x18\x01 \x01(\tR\x02id\"r\n" +
|
||||
"\x17DownloadInvoiceResponse\x12\x1a\n" +
|
||||
"\bfilename\x18\x01 \x01(\tR\bfilename\x12!\n" +
|
||||
"\fcontent_type\x18\x02 \x01(\tR\vcontentType\x12\x18\n" +
|
||||
"\acontent\x18\x03 \x01(\tR\acontent2\x89\x03\n" +
|
||||
"\bPayments\x12Z\n" +
|
||||
"\rCreatePayment\x12#.stream.app.v1.CreatePaymentRequest\x1a$.stream.app.v1.CreatePaymentResponse\x12i\n" +
|
||||
"\x12ListPaymentHistory\x12(.stream.app.v1.ListPaymentHistoryRequest\x1a).stream.app.v1.ListPaymentHistoryResponse\x12T\n" +
|
||||
"\vTopupWallet\x12!.stream.app.v1.TopupWalletRequest\x1a\".stream.app.v1.TopupWalletResponse\x12`\n" +
|
||||
"\x0fDownloadInvoice\x12%.stream.app.v1.DownloadInvoiceRequest\x1a&.stream.app.v1.DownloadInvoiceResponseB,Z*stream.api/internal/gen/proto/app/v1;appv1b\x06proto3"
|
||||
|
||||
var (
|
||||
file_app_v1_payments_proto_rawDescOnce sync.Once
|
||||
file_app_v1_payments_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_app_v1_payments_proto_rawDescGZIP() []byte {
|
||||
file_app_v1_payments_proto_rawDescOnce.Do(func() {
|
||||
file_app_v1_payments_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_app_v1_payments_proto_rawDesc), len(file_app_v1_payments_proto_rawDesc)))
|
||||
})
|
||||
return file_app_v1_payments_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_app_v1_payments_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
|
||||
var file_app_v1_payments_proto_goTypes = []any{
|
||||
(*CreatePaymentRequest)(nil), // 0: stream.app.v1.CreatePaymentRequest
|
||||
(*CreatePaymentResponse)(nil), // 1: stream.app.v1.CreatePaymentResponse
|
||||
(*ListPaymentHistoryRequest)(nil), // 2: stream.app.v1.ListPaymentHistoryRequest
|
||||
(*ListPaymentHistoryResponse)(nil), // 3: stream.app.v1.ListPaymentHistoryResponse
|
||||
(*TopupWalletRequest)(nil), // 4: stream.app.v1.TopupWalletRequest
|
||||
(*TopupWalletResponse)(nil), // 5: stream.app.v1.TopupWalletResponse
|
||||
(*DownloadInvoiceRequest)(nil), // 6: stream.app.v1.DownloadInvoiceRequest
|
||||
(*DownloadInvoiceResponse)(nil), // 7: stream.app.v1.DownloadInvoiceResponse
|
||||
(*Payment)(nil), // 8: stream.app.v1.Payment
|
||||
(*PlanSubscription)(nil), // 9: stream.app.v1.PlanSubscription
|
||||
(*PaymentHistoryItem)(nil), // 10: stream.app.v1.PaymentHistoryItem
|
||||
(*WalletTransaction)(nil), // 11: stream.app.v1.WalletTransaction
|
||||
}
|
||||
var file_app_v1_payments_proto_depIdxs = []int32{
|
||||
8, // 0: stream.app.v1.CreatePaymentResponse.payment:type_name -> stream.app.v1.Payment
|
||||
9, // 1: stream.app.v1.CreatePaymentResponse.subscription:type_name -> stream.app.v1.PlanSubscription
|
||||
10, // 2: stream.app.v1.ListPaymentHistoryResponse.payments:type_name -> stream.app.v1.PaymentHistoryItem
|
||||
11, // 3: stream.app.v1.TopupWalletResponse.wallet_transaction:type_name -> stream.app.v1.WalletTransaction
|
||||
0, // 4: stream.app.v1.Payments.CreatePayment:input_type -> stream.app.v1.CreatePaymentRequest
|
||||
2, // 5: stream.app.v1.Payments.ListPaymentHistory:input_type -> stream.app.v1.ListPaymentHistoryRequest
|
||||
4, // 6: stream.app.v1.Payments.TopupWallet:input_type -> stream.app.v1.TopupWalletRequest
|
||||
6, // 7: stream.app.v1.Payments.DownloadInvoice:input_type -> stream.app.v1.DownloadInvoiceRequest
|
||||
1, // 8: stream.app.v1.Payments.CreatePayment:output_type -> stream.app.v1.CreatePaymentResponse
|
||||
3, // 9: stream.app.v1.Payments.ListPaymentHistory:output_type -> stream.app.v1.ListPaymentHistoryResponse
|
||||
5, // 10: stream.app.v1.Payments.TopupWallet:output_type -> stream.app.v1.TopupWalletResponse
|
||||
7, // 11: stream.app.v1.Payments.DownloadInvoice:output_type -> stream.app.v1.DownloadInvoiceResponse
|
||||
8, // [8:12] is the sub-list for method output_type
|
||||
4, // [4:8] is the sub-list for method input_type
|
||||
4, // [4:4] is the sub-list for extension type_name
|
||||
4, // [4:4] is the sub-list for extension extendee
|
||||
0, // [0:4] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_app_v1_payments_proto_init() }
|
||||
func file_app_v1_payments_proto_init() {
|
||||
if File_app_v1_payments_proto != nil {
|
||||
return
|
||||
}
|
||||
file_app_v1_common_proto_init()
|
||||
file_app_v1_payments_proto_msgTypes[0].OneofWrappers = []any{}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_app_v1_payments_proto_rawDesc), len(file_app_v1_payments_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 8,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_app_v1_payments_proto_goTypes,
|
||||
DependencyIndexes: file_app_v1_payments_proto_depIdxs,
|
||||
MessageInfos: file_app_v1_payments_proto_msgTypes,
|
||||
}.Build()
|
||||
File_app_v1_payments_proto = out.File
|
||||
file_app_v1_payments_proto_goTypes = nil
|
||||
file_app_v1_payments_proto_depIdxs = nil
|
||||
}
|
||||
235
internal/api/proto/app/v1/payments_grpc.pb.go
Normal file
235
internal/api/proto/app/v1/payments_grpc.pb.go
Normal file
@@ -0,0 +1,235 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.6.1
|
||||
// - protoc (unknown)
|
||||
// source: app/v1/payments.proto
|
||||
|
||||
package appv1
|
||||
|
||||
import (
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
// Requires gRPC-Go v1.64.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion9
|
||||
|
||||
const (
|
||||
Payments_CreatePayment_FullMethodName = "/stream.app.v1.Payments/CreatePayment"
|
||||
Payments_ListPaymentHistory_FullMethodName = "/stream.app.v1.Payments/ListPaymentHistory"
|
||||
Payments_TopupWallet_FullMethodName = "/stream.app.v1.Payments/TopupWallet"
|
||||
Payments_DownloadInvoice_FullMethodName = "/stream.app.v1.Payments/DownloadInvoice"
|
||||
)
|
||||
|
||||
// PaymentsClient is the client API for Payments 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 PaymentsClient interface {
|
||||
CreatePayment(ctx context.Context, in *CreatePaymentRequest, opts ...grpc.CallOption) (*CreatePaymentResponse, error)
|
||||
ListPaymentHistory(ctx context.Context, in *ListPaymentHistoryRequest, opts ...grpc.CallOption) (*ListPaymentHistoryResponse, error)
|
||||
TopupWallet(ctx context.Context, in *TopupWalletRequest, opts ...grpc.CallOption) (*TopupWalletResponse, error)
|
||||
DownloadInvoice(ctx context.Context, in *DownloadInvoiceRequest, opts ...grpc.CallOption) (*DownloadInvoiceResponse, error)
|
||||
}
|
||||
|
||||
type paymentsClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewPaymentsClient(cc grpc.ClientConnInterface) PaymentsClient {
|
||||
return &paymentsClient{cc}
|
||||
}
|
||||
|
||||
func (c *paymentsClient) CreatePayment(ctx context.Context, in *CreatePaymentRequest, opts ...grpc.CallOption) (*CreatePaymentResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(CreatePaymentResponse)
|
||||
err := c.cc.Invoke(ctx, Payments_CreatePayment_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *paymentsClient) ListPaymentHistory(ctx context.Context, in *ListPaymentHistoryRequest, opts ...grpc.CallOption) (*ListPaymentHistoryResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(ListPaymentHistoryResponse)
|
||||
err := c.cc.Invoke(ctx, Payments_ListPaymentHistory_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *paymentsClient) TopupWallet(ctx context.Context, in *TopupWalletRequest, opts ...grpc.CallOption) (*TopupWalletResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(TopupWalletResponse)
|
||||
err := c.cc.Invoke(ctx, Payments_TopupWallet_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *paymentsClient) DownloadInvoice(ctx context.Context, in *DownloadInvoiceRequest, opts ...grpc.CallOption) (*DownloadInvoiceResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(DownloadInvoiceResponse)
|
||||
err := c.cc.Invoke(ctx, Payments_DownloadInvoice_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// PaymentsServer is the server API for Payments service.
|
||||
// All implementations must embed UnimplementedPaymentsServer
|
||||
// for forward compatibility.
|
||||
type PaymentsServer interface {
|
||||
CreatePayment(context.Context, *CreatePaymentRequest) (*CreatePaymentResponse, error)
|
||||
ListPaymentHistory(context.Context, *ListPaymentHistoryRequest) (*ListPaymentHistoryResponse, error)
|
||||
TopupWallet(context.Context, *TopupWalletRequest) (*TopupWalletResponse, error)
|
||||
DownloadInvoice(context.Context, *DownloadInvoiceRequest) (*DownloadInvoiceResponse, error)
|
||||
mustEmbedUnimplementedPaymentsServer()
|
||||
}
|
||||
|
||||
// UnimplementedPaymentsServer must be embedded to have
|
||||
// forward compatible implementations.
|
||||
//
|
||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedPaymentsServer struct{}
|
||||
|
||||
func (UnimplementedPaymentsServer) CreatePayment(context.Context, *CreatePaymentRequest) (*CreatePaymentResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method CreatePayment not implemented")
|
||||
}
|
||||
func (UnimplementedPaymentsServer) ListPaymentHistory(context.Context, *ListPaymentHistoryRequest) (*ListPaymentHistoryResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method ListPaymentHistory not implemented")
|
||||
}
|
||||
func (UnimplementedPaymentsServer) TopupWallet(context.Context, *TopupWalletRequest) (*TopupWalletResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method TopupWallet not implemented")
|
||||
}
|
||||
func (UnimplementedPaymentsServer) DownloadInvoice(context.Context, *DownloadInvoiceRequest) (*DownloadInvoiceResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method DownloadInvoice not implemented")
|
||||
}
|
||||
func (UnimplementedPaymentsServer) mustEmbedUnimplementedPaymentsServer() {}
|
||||
func (UnimplementedPaymentsServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafePaymentsServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to PaymentsServer will
|
||||
// result in compilation errors.
|
||||
type UnsafePaymentsServer interface {
|
||||
mustEmbedUnimplementedPaymentsServer()
|
||||
}
|
||||
|
||||
func RegisterPaymentsServer(s grpc.ServiceRegistrar, srv PaymentsServer) {
|
||||
// If the following call panics, it indicates UnimplementedPaymentsServer was
|
||||
// embedded by pointer and is nil. This will cause panics if an
|
||||
// unimplemented method is ever invoked, so we test this at initialization
|
||||
// time to prevent it from happening at runtime later due to I/O.
|
||||
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
||||
t.testEmbeddedByValue()
|
||||
}
|
||||
s.RegisterService(&Payments_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _Payments_CreatePayment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CreatePaymentRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(PaymentsServer).CreatePayment(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Payments_CreatePayment_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(PaymentsServer).CreatePayment(ctx, req.(*CreatePaymentRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Payments_ListPaymentHistory_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ListPaymentHistoryRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(PaymentsServer).ListPaymentHistory(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Payments_ListPaymentHistory_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(PaymentsServer).ListPaymentHistory(ctx, req.(*ListPaymentHistoryRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Payments_TopupWallet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(TopupWalletRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(PaymentsServer).TopupWallet(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Payments_TopupWallet_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(PaymentsServer).TopupWallet(ctx, req.(*TopupWalletRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Payments_DownloadInvoice_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DownloadInvoiceRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(PaymentsServer).DownloadInvoice(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Payments_DownloadInvoice_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(PaymentsServer).DownloadInvoice(ctx, req.(*DownloadInvoiceRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// Payments_ServiceDesc is the grpc.ServiceDesc for Payments service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var Payments_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "stream.app.v1.Payments",
|
||||
HandlerType: (*PaymentsServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "CreatePayment",
|
||||
Handler: _Payments_CreatePayment_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ListPaymentHistory",
|
||||
Handler: _Payments_ListPaymentHistory_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "TopupWallet",
|
||||
Handler: _Payments_TopupWallet_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "DownloadInvoice",
|
||||
Handler: _Payments_DownloadInvoice_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "app/v1/payments.proto",
|
||||
}
|
||||
810
internal/api/proto/app/v1/videos.pb.go
Normal file
810
internal/api/proto/app/v1/videos.pb.go
Normal file
@@ -0,0 +1,810 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.11
|
||||
// protoc (unknown)
|
||||
// source: app/v1/videos.proto
|
||||
|
||||
package appv1
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
)
|
||||
|
||||
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)
|
||||
)
|
||||
|
||||
type GetUploadUrlRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Filename string `protobuf:"bytes,1,opt,name=filename,proto3" json:"filename,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *GetUploadUrlRequest) Reset() {
|
||||
*x = GetUploadUrlRequest{}
|
||||
mi := &file_app_v1_videos_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *GetUploadUrlRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetUploadUrlRequest) ProtoMessage() {}
|
||||
|
||||
func (x *GetUploadUrlRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_app_v1_videos_proto_msgTypes[0]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use GetUploadUrlRequest.ProtoReflect.Descriptor instead.
|
||||
func (*GetUploadUrlRequest) Descriptor() ([]byte, []int) {
|
||||
return file_app_v1_videos_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *GetUploadUrlRequest) GetFilename() string {
|
||||
if x != nil {
|
||||
return x.Filename
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type GetUploadUrlResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
UploadUrl string `protobuf:"bytes,1,opt,name=upload_url,json=uploadUrl,proto3" json:"upload_url,omitempty"`
|
||||
Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
|
||||
FileId string `protobuf:"bytes,3,opt,name=file_id,json=fileId,proto3" json:"file_id,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *GetUploadUrlResponse) Reset() {
|
||||
*x = GetUploadUrlResponse{}
|
||||
mi := &file_app_v1_videos_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *GetUploadUrlResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetUploadUrlResponse) ProtoMessage() {}
|
||||
|
||||
func (x *GetUploadUrlResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_app_v1_videos_proto_msgTypes[1]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use GetUploadUrlResponse.ProtoReflect.Descriptor instead.
|
||||
func (*GetUploadUrlResponse) Descriptor() ([]byte, []int) {
|
||||
return file_app_v1_videos_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *GetUploadUrlResponse) GetUploadUrl() string {
|
||||
if x != nil {
|
||||
return x.UploadUrl
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *GetUploadUrlResponse) GetKey() string {
|
||||
if x != nil {
|
||||
return x.Key
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *GetUploadUrlResponse) GetFileId() string {
|
||||
if x != nil {
|
||||
return x.FileId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type CreateVideoRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
|
||||
Description *string `protobuf:"bytes,2,opt,name=description,proto3,oneof" json:"description,omitempty"`
|
||||
Url string `protobuf:"bytes,3,opt,name=url,proto3" json:"url,omitempty"`
|
||||
Size int64 `protobuf:"varint,4,opt,name=size,proto3" json:"size,omitempty"`
|
||||
Duration int32 `protobuf:"varint,5,opt,name=duration,proto3" json:"duration,omitempty"`
|
||||
Format *string `protobuf:"bytes,6,opt,name=format,proto3,oneof" json:"format,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *CreateVideoRequest) Reset() {
|
||||
*x = CreateVideoRequest{}
|
||||
mi := &file_app_v1_videos_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *CreateVideoRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*CreateVideoRequest) ProtoMessage() {}
|
||||
|
||||
func (x *CreateVideoRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_app_v1_videos_proto_msgTypes[2]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use CreateVideoRequest.ProtoReflect.Descriptor instead.
|
||||
func (*CreateVideoRequest) Descriptor() ([]byte, []int) {
|
||||
return file_app_v1_videos_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *CreateVideoRequest) GetTitle() string {
|
||||
if x != nil {
|
||||
return x.Title
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *CreateVideoRequest) GetDescription() string {
|
||||
if x != nil && x.Description != nil {
|
||||
return *x.Description
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *CreateVideoRequest) GetUrl() string {
|
||||
if x != nil {
|
||||
return x.Url
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *CreateVideoRequest) GetSize() int64 {
|
||||
if x != nil {
|
||||
return x.Size
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *CreateVideoRequest) GetDuration() int32 {
|
||||
if x != nil {
|
||||
return x.Duration
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *CreateVideoRequest) GetFormat() string {
|
||||
if x != nil && x.Format != nil {
|
||||
return *x.Format
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type CreateVideoResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Video *Video `protobuf:"bytes,1,opt,name=video,proto3" json:"video,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *CreateVideoResponse) Reset() {
|
||||
*x = CreateVideoResponse{}
|
||||
mi := &file_app_v1_videos_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *CreateVideoResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*CreateVideoResponse) ProtoMessage() {}
|
||||
|
||||
func (x *CreateVideoResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_app_v1_videos_proto_msgTypes[3]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use CreateVideoResponse.ProtoReflect.Descriptor instead.
|
||||
func (*CreateVideoResponse) Descriptor() ([]byte, []int) {
|
||||
return file_app_v1_videos_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *CreateVideoResponse) GetVideo() *Video {
|
||||
if x != nil {
|
||||
return x.Video
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type ListVideosRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Page int32 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"`
|
||||
Limit int32 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"`
|
||||
Search *string `protobuf:"bytes,3,opt,name=search,proto3,oneof" json:"search,omitempty"`
|
||||
Status *string `protobuf:"bytes,4,opt,name=status,proto3,oneof" json:"status,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *ListVideosRequest) Reset() {
|
||||
*x = ListVideosRequest{}
|
||||
mi := &file_app_v1_videos_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ListVideosRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ListVideosRequest) ProtoMessage() {}
|
||||
|
||||
func (x *ListVideosRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_app_v1_videos_proto_msgTypes[4]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ListVideosRequest.ProtoReflect.Descriptor instead.
|
||||
func (*ListVideosRequest) Descriptor() ([]byte, []int) {
|
||||
return file_app_v1_videos_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *ListVideosRequest) GetPage() int32 {
|
||||
if x != nil {
|
||||
return x.Page
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ListVideosRequest) GetLimit() int32 {
|
||||
if x != nil {
|
||||
return x.Limit
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ListVideosRequest) GetSearch() string {
|
||||
if x != nil && x.Search != nil {
|
||||
return *x.Search
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ListVideosRequest) GetStatus() string {
|
||||
if x != nil && x.Status != nil {
|
||||
return *x.Status
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type ListVideosResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Videos []*Video `protobuf:"bytes,1,rep,name=videos,proto3" json:"videos,omitempty"`
|
||||
Total int64 `protobuf:"varint,2,opt,name=total,proto3" json:"total,omitempty"`
|
||||
Page int32 `protobuf:"varint,3,opt,name=page,proto3" json:"page,omitempty"`
|
||||
Limit int32 `protobuf:"varint,4,opt,name=limit,proto3" json:"limit,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *ListVideosResponse) Reset() {
|
||||
*x = ListVideosResponse{}
|
||||
mi := &file_app_v1_videos_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ListVideosResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ListVideosResponse) ProtoMessage() {}
|
||||
|
||||
func (x *ListVideosResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_app_v1_videos_proto_msgTypes[5]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ListVideosResponse.ProtoReflect.Descriptor instead.
|
||||
func (*ListVideosResponse) Descriptor() ([]byte, []int) {
|
||||
return file_app_v1_videos_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
func (x *ListVideosResponse) GetVideos() []*Video {
|
||||
if x != nil {
|
||||
return x.Videos
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *ListVideosResponse) GetTotal() int64 {
|
||||
if x != nil {
|
||||
return x.Total
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ListVideosResponse) GetPage() int32 {
|
||||
if x != nil {
|
||||
return x.Page
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ListVideosResponse) GetLimit() int32 {
|
||||
if x != nil {
|
||||
return x.Limit
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type GetVideoRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *GetVideoRequest) Reset() {
|
||||
*x = GetVideoRequest{}
|
||||
mi := &file_app_v1_videos_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *GetVideoRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetVideoRequest) ProtoMessage() {}
|
||||
|
||||
func (x *GetVideoRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_app_v1_videos_proto_msgTypes[6]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use GetVideoRequest.ProtoReflect.Descriptor instead.
|
||||
func (*GetVideoRequest) Descriptor() ([]byte, []int) {
|
||||
return file_app_v1_videos_proto_rawDescGZIP(), []int{6}
|
||||
}
|
||||
|
||||
func (x *GetVideoRequest) GetId() string {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type GetVideoResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Video *Video `protobuf:"bytes,1,opt,name=video,proto3" json:"video,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *GetVideoResponse) Reset() {
|
||||
*x = GetVideoResponse{}
|
||||
mi := &file_app_v1_videos_proto_msgTypes[7]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *GetVideoResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetVideoResponse) ProtoMessage() {}
|
||||
|
||||
func (x *GetVideoResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_app_v1_videos_proto_msgTypes[7]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use GetVideoResponse.ProtoReflect.Descriptor instead.
|
||||
func (*GetVideoResponse) Descriptor() ([]byte, []int) {
|
||||
return file_app_v1_videos_proto_rawDescGZIP(), []int{7}
|
||||
}
|
||||
|
||||
func (x *GetVideoResponse) GetVideo() *Video {
|
||||
if x != nil {
|
||||
return x.Video
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type UpdateVideoRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
|
||||
Description *string `protobuf:"bytes,3,opt,name=description,proto3,oneof" json:"description,omitempty"`
|
||||
Url string `protobuf:"bytes,4,opt,name=url,proto3" json:"url,omitempty"`
|
||||
Size int64 `protobuf:"varint,5,opt,name=size,proto3" json:"size,omitempty"`
|
||||
Duration int32 `protobuf:"varint,6,opt,name=duration,proto3" json:"duration,omitempty"`
|
||||
Format *string `protobuf:"bytes,7,opt,name=format,proto3,oneof" json:"format,omitempty"`
|
||||
Status *string `protobuf:"bytes,8,opt,name=status,proto3,oneof" json:"status,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *UpdateVideoRequest) Reset() {
|
||||
*x = UpdateVideoRequest{}
|
||||
mi := &file_app_v1_videos_proto_msgTypes[8]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *UpdateVideoRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*UpdateVideoRequest) ProtoMessage() {}
|
||||
|
||||
func (x *UpdateVideoRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_app_v1_videos_proto_msgTypes[8]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use UpdateVideoRequest.ProtoReflect.Descriptor instead.
|
||||
func (*UpdateVideoRequest) Descriptor() ([]byte, []int) {
|
||||
return file_app_v1_videos_proto_rawDescGZIP(), []int{8}
|
||||
}
|
||||
|
||||
func (x *UpdateVideoRequest) GetId() string {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *UpdateVideoRequest) GetTitle() string {
|
||||
if x != nil {
|
||||
return x.Title
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *UpdateVideoRequest) GetDescription() string {
|
||||
if x != nil && x.Description != nil {
|
||||
return *x.Description
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *UpdateVideoRequest) GetUrl() string {
|
||||
if x != nil {
|
||||
return x.Url
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *UpdateVideoRequest) GetSize() int64 {
|
||||
if x != nil {
|
||||
return x.Size
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *UpdateVideoRequest) GetDuration() int32 {
|
||||
if x != nil {
|
||||
return x.Duration
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *UpdateVideoRequest) GetFormat() string {
|
||||
if x != nil && x.Format != nil {
|
||||
return *x.Format
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *UpdateVideoRequest) GetStatus() string {
|
||||
if x != nil && x.Status != nil {
|
||||
return *x.Status
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type UpdateVideoResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Video *Video `protobuf:"bytes,1,opt,name=video,proto3" json:"video,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *UpdateVideoResponse) Reset() {
|
||||
*x = UpdateVideoResponse{}
|
||||
mi := &file_app_v1_videos_proto_msgTypes[9]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *UpdateVideoResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*UpdateVideoResponse) ProtoMessage() {}
|
||||
|
||||
func (x *UpdateVideoResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_app_v1_videos_proto_msgTypes[9]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use UpdateVideoResponse.ProtoReflect.Descriptor instead.
|
||||
func (*UpdateVideoResponse) Descriptor() ([]byte, []int) {
|
||||
return file_app_v1_videos_proto_rawDescGZIP(), []int{9}
|
||||
}
|
||||
|
||||
func (x *UpdateVideoResponse) GetVideo() *Video {
|
||||
if x != nil {
|
||||
return x.Video
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type DeleteVideoRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *DeleteVideoRequest) Reset() {
|
||||
*x = DeleteVideoRequest{}
|
||||
mi := &file_app_v1_videos_proto_msgTypes[10]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *DeleteVideoRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DeleteVideoRequest) ProtoMessage() {}
|
||||
|
||||
func (x *DeleteVideoRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_app_v1_videos_proto_msgTypes[10]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use DeleteVideoRequest.ProtoReflect.Descriptor instead.
|
||||
func (*DeleteVideoRequest) Descriptor() ([]byte, []int) {
|
||||
return file_app_v1_videos_proto_rawDescGZIP(), []int{10}
|
||||
}
|
||||
|
||||
func (x *DeleteVideoRequest) GetId() string {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
var File_app_v1_videos_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_app_v1_videos_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"\x13app/v1/videos.proto\x12\rstream.app.v1\x1a\x13app/v1/common.proto\"1\n" +
|
||||
"\x13GetUploadUrlRequest\x12\x1a\n" +
|
||||
"\bfilename\x18\x01 \x01(\tR\bfilename\"`\n" +
|
||||
"\x14GetUploadUrlResponse\x12\x1d\n" +
|
||||
"\n" +
|
||||
"upload_url\x18\x01 \x01(\tR\tuploadUrl\x12\x10\n" +
|
||||
"\x03key\x18\x02 \x01(\tR\x03key\x12\x17\n" +
|
||||
"\afile_id\x18\x03 \x01(\tR\x06fileId\"\xcb\x01\n" +
|
||||
"\x12CreateVideoRequest\x12\x14\n" +
|
||||
"\x05title\x18\x01 \x01(\tR\x05title\x12%\n" +
|
||||
"\vdescription\x18\x02 \x01(\tH\x00R\vdescription\x88\x01\x01\x12\x10\n" +
|
||||
"\x03url\x18\x03 \x01(\tR\x03url\x12\x12\n" +
|
||||
"\x04size\x18\x04 \x01(\x03R\x04size\x12\x1a\n" +
|
||||
"\bduration\x18\x05 \x01(\x05R\bduration\x12\x1b\n" +
|
||||
"\x06format\x18\x06 \x01(\tH\x01R\x06format\x88\x01\x01B\x0e\n" +
|
||||
"\f_descriptionB\t\n" +
|
||||
"\a_format\"A\n" +
|
||||
"\x13CreateVideoResponse\x12*\n" +
|
||||
"\x05video\x18\x01 \x01(\v2\x14.stream.app.v1.VideoR\x05video\"\x8d\x01\n" +
|
||||
"\x11ListVideosRequest\x12\x12\n" +
|
||||
"\x04page\x18\x01 \x01(\x05R\x04page\x12\x14\n" +
|
||||
"\x05limit\x18\x02 \x01(\x05R\x05limit\x12\x1b\n" +
|
||||
"\x06search\x18\x03 \x01(\tH\x00R\x06search\x88\x01\x01\x12\x1b\n" +
|
||||
"\x06status\x18\x04 \x01(\tH\x01R\x06status\x88\x01\x01B\t\n" +
|
||||
"\a_searchB\t\n" +
|
||||
"\a_status\"\x82\x01\n" +
|
||||
"\x12ListVideosResponse\x12,\n" +
|
||||
"\x06videos\x18\x01 \x03(\v2\x14.stream.app.v1.VideoR\x06videos\x12\x14\n" +
|
||||
"\x05total\x18\x02 \x01(\x03R\x05total\x12\x12\n" +
|
||||
"\x04page\x18\x03 \x01(\x05R\x04page\x12\x14\n" +
|
||||
"\x05limit\x18\x04 \x01(\x05R\x05limit\"!\n" +
|
||||
"\x0fGetVideoRequest\x12\x0e\n" +
|
||||
"\x02id\x18\x01 \x01(\tR\x02id\">\n" +
|
||||
"\x10GetVideoResponse\x12*\n" +
|
||||
"\x05video\x18\x01 \x01(\v2\x14.stream.app.v1.VideoR\x05video\"\x83\x02\n" +
|
||||
"\x12UpdateVideoRequest\x12\x0e\n" +
|
||||
"\x02id\x18\x01 \x01(\tR\x02id\x12\x14\n" +
|
||||
"\x05title\x18\x02 \x01(\tR\x05title\x12%\n" +
|
||||
"\vdescription\x18\x03 \x01(\tH\x00R\vdescription\x88\x01\x01\x12\x10\n" +
|
||||
"\x03url\x18\x04 \x01(\tR\x03url\x12\x12\n" +
|
||||
"\x04size\x18\x05 \x01(\x03R\x04size\x12\x1a\n" +
|
||||
"\bduration\x18\x06 \x01(\x05R\bduration\x12\x1b\n" +
|
||||
"\x06format\x18\a \x01(\tH\x01R\x06format\x88\x01\x01\x12\x1b\n" +
|
||||
"\x06status\x18\b \x01(\tH\x02R\x06status\x88\x01\x01B\x0e\n" +
|
||||
"\f_descriptionB\t\n" +
|
||||
"\a_formatB\t\n" +
|
||||
"\a_status\"A\n" +
|
||||
"\x13UpdateVideoResponse\x12*\n" +
|
||||
"\x05video\x18\x01 \x01(\v2\x14.stream.app.v1.VideoR\x05video\"$\n" +
|
||||
"\x12DeleteVideoRequest\x12\x0e\n" +
|
||||
"\x02id\x18\x01 \x01(\tR\x02id2\xff\x03\n" +
|
||||
"\x06Videos\x12W\n" +
|
||||
"\fGetUploadUrl\x12\".stream.app.v1.GetUploadUrlRequest\x1a#.stream.app.v1.GetUploadUrlResponse\x12T\n" +
|
||||
"\vCreateVideo\x12!.stream.app.v1.CreateVideoRequest\x1a\".stream.app.v1.CreateVideoResponse\x12Q\n" +
|
||||
"\n" +
|
||||
"ListVideos\x12 .stream.app.v1.ListVideosRequest\x1a!.stream.app.v1.ListVideosResponse\x12K\n" +
|
||||
"\bGetVideo\x12\x1e.stream.app.v1.GetVideoRequest\x1a\x1f.stream.app.v1.GetVideoResponse\x12T\n" +
|
||||
"\vUpdateVideo\x12!.stream.app.v1.UpdateVideoRequest\x1a\".stream.app.v1.UpdateVideoResponse\x12P\n" +
|
||||
"\vDeleteVideo\x12!.stream.app.v1.DeleteVideoRequest\x1a\x1e.stream.app.v1.MessageResponseB,Z*stream.api/internal/gen/proto/app/v1;appv1b\x06proto3"
|
||||
|
||||
var (
|
||||
file_app_v1_videos_proto_rawDescOnce sync.Once
|
||||
file_app_v1_videos_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_app_v1_videos_proto_rawDescGZIP() []byte {
|
||||
file_app_v1_videos_proto_rawDescOnce.Do(func() {
|
||||
file_app_v1_videos_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_app_v1_videos_proto_rawDesc), len(file_app_v1_videos_proto_rawDesc)))
|
||||
})
|
||||
return file_app_v1_videos_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_app_v1_videos_proto_msgTypes = make([]protoimpl.MessageInfo, 11)
|
||||
var file_app_v1_videos_proto_goTypes = []any{
|
||||
(*GetUploadUrlRequest)(nil), // 0: stream.app.v1.GetUploadUrlRequest
|
||||
(*GetUploadUrlResponse)(nil), // 1: stream.app.v1.GetUploadUrlResponse
|
||||
(*CreateVideoRequest)(nil), // 2: stream.app.v1.CreateVideoRequest
|
||||
(*CreateVideoResponse)(nil), // 3: stream.app.v1.CreateVideoResponse
|
||||
(*ListVideosRequest)(nil), // 4: stream.app.v1.ListVideosRequest
|
||||
(*ListVideosResponse)(nil), // 5: stream.app.v1.ListVideosResponse
|
||||
(*GetVideoRequest)(nil), // 6: stream.app.v1.GetVideoRequest
|
||||
(*GetVideoResponse)(nil), // 7: stream.app.v1.GetVideoResponse
|
||||
(*UpdateVideoRequest)(nil), // 8: stream.app.v1.UpdateVideoRequest
|
||||
(*UpdateVideoResponse)(nil), // 9: stream.app.v1.UpdateVideoResponse
|
||||
(*DeleteVideoRequest)(nil), // 10: stream.app.v1.DeleteVideoRequest
|
||||
(*Video)(nil), // 11: stream.app.v1.Video
|
||||
(*MessageResponse)(nil), // 12: stream.app.v1.MessageResponse
|
||||
}
|
||||
var file_app_v1_videos_proto_depIdxs = []int32{
|
||||
11, // 0: stream.app.v1.CreateVideoResponse.video:type_name -> stream.app.v1.Video
|
||||
11, // 1: stream.app.v1.ListVideosResponse.videos:type_name -> stream.app.v1.Video
|
||||
11, // 2: stream.app.v1.GetVideoResponse.video:type_name -> stream.app.v1.Video
|
||||
11, // 3: stream.app.v1.UpdateVideoResponse.video:type_name -> stream.app.v1.Video
|
||||
0, // 4: stream.app.v1.Videos.GetUploadUrl:input_type -> stream.app.v1.GetUploadUrlRequest
|
||||
2, // 5: stream.app.v1.Videos.CreateVideo:input_type -> stream.app.v1.CreateVideoRequest
|
||||
4, // 6: stream.app.v1.Videos.ListVideos:input_type -> stream.app.v1.ListVideosRequest
|
||||
6, // 7: stream.app.v1.Videos.GetVideo:input_type -> stream.app.v1.GetVideoRequest
|
||||
8, // 8: stream.app.v1.Videos.UpdateVideo:input_type -> stream.app.v1.UpdateVideoRequest
|
||||
10, // 9: stream.app.v1.Videos.DeleteVideo:input_type -> stream.app.v1.DeleteVideoRequest
|
||||
1, // 10: stream.app.v1.Videos.GetUploadUrl:output_type -> stream.app.v1.GetUploadUrlResponse
|
||||
3, // 11: stream.app.v1.Videos.CreateVideo:output_type -> stream.app.v1.CreateVideoResponse
|
||||
5, // 12: stream.app.v1.Videos.ListVideos:output_type -> stream.app.v1.ListVideosResponse
|
||||
7, // 13: stream.app.v1.Videos.GetVideo:output_type -> stream.app.v1.GetVideoResponse
|
||||
9, // 14: stream.app.v1.Videos.UpdateVideo:output_type -> stream.app.v1.UpdateVideoResponse
|
||||
12, // 15: stream.app.v1.Videos.DeleteVideo:output_type -> stream.app.v1.MessageResponse
|
||||
10, // [10:16] is the sub-list for method output_type
|
||||
4, // [4:10] is the sub-list for method input_type
|
||||
4, // [4:4] is the sub-list for extension type_name
|
||||
4, // [4:4] is the sub-list for extension extendee
|
||||
0, // [0:4] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_app_v1_videos_proto_init() }
|
||||
func file_app_v1_videos_proto_init() {
|
||||
if File_app_v1_videos_proto != nil {
|
||||
return
|
||||
}
|
||||
file_app_v1_common_proto_init()
|
||||
file_app_v1_videos_proto_msgTypes[2].OneofWrappers = []any{}
|
||||
file_app_v1_videos_proto_msgTypes[4].OneofWrappers = []any{}
|
||||
file_app_v1_videos_proto_msgTypes[8].OneofWrappers = []any{}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_app_v1_videos_proto_rawDesc), len(file_app_v1_videos_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 11,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_app_v1_videos_proto_goTypes,
|
||||
DependencyIndexes: file_app_v1_videos_proto_depIdxs,
|
||||
MessageInfos: file_app_v1_videos_proto_msgTypes,
|
||||
}.Build()
|
||||
File_app_v1_videos_proto = out.File
|
||||
file_app_v1_videos_proto_goTypes = nil
|
||||
file_app_v1_videos_proto_depIdxs = nil
|
||||
}
|
||||
311
internal/api/proto/app/v1/videos_grpc.pb.go
Normal file
311
internal/api/proto/app/v1/videos_grpc.pb.go
Normal file
@@ -0,0 +1,311 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.6.1
|
||||
// - protoc (unknown)
|
||||
// source: app/v1/videos.proto
|
||||
|
||||
package appv1
|
||||
|
||||
import (
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
// Requires gRPC-Go v1.64.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion9
|
||||
|
||||
const (
|
||||
Videos_GetUploadUrl_FullMethodName = "/stream.app.v1.Videos/GetUploadUrl"
|
||||
Videos_CreateVideo_FullMethodName = "/stream.app.v1.Videos/CreateVideo"
|
||||
Videos_ListVideos_FullMethodName = "/stream.app.v1.Videos/ListVideos"
|
||||
Videos_GetVideo_FullMethodName = "/stream.app.v1.Videos/GetVideo"
|
||||
Videos_UpdateVideo_FullMethodName = "/stream.app.v1.Videos/UpdateVideo"
|
||||
Videos_DeleteVideo_FullMethodName = "/stream.app.v1.Videos/DeleteVideo"
|
||||
)
|
||||
|
||||
// VideosClient is the client API for Videos 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 VideosClient interface {
|
||||
GetUploadUrl(ctx context.Context, in *GetUploadUrlRequest, opts ...grpc.CallOption) (*GetUploadUrlResponse, error)
|
||||
CreateVideo(ctx context.Context, in *CreateVideoRequest, opts ...grpc.CallOption) (*CreateVideoResponse, error)
|
||||
ListVideos(ctx context.Context, in *ListVideosRequest, opts ...grpc.CallOption) (*ListVideosResponse, error)
|
||||
GetVideo(ctx context.Context, in *GetVideoRequest, opts ...grpc.CallOption) (*GetVideoResponse, error)
|
||||
UpdateVideo(ctx context.Context, in *UpdateVideoRequest, opts ...grpc.CallOption) (*UpdateVideoResponse, error)
|
||||
DeleteVideo(ctx context.Context, in *DeleteVideoRequest, opts ...grpc.CallOption) (*MessageResponse, error)
|
||||
}
|
||||
|
||||
type videosClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewVideosClient(cc grpc.ClientConnInterface) VideosClient {
|
||||
return &videosClient{cc}
|
||||
}
|
||||
|
||||
func (c *videosClient) GetUploadUrl(ctx context.Context, in *GetUploadUrlRequest, opts ...grpc.CallOption) (*GetUploadUrlResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(GetUploadUrlResponse)
|
||||
err := c.cc.Invoke(ctx, Videos_GetUploadUrl_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *videosClient) CreateVideo(ctx context.Context, in *CreateVideoRequest, opts ...grpc.CallOption) (*CreateVideoResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(CreateVideoResponse)
|
||||
err := c.cc.Invoke(ctx, Videos_CreateVideo_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *videosClient) ListVideos(ctx context.Context, in *ListVideosRequest, opts ...grpc.CallOption) (*ListVideosResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(ListVideosResponse)
|
||||
err := c.cc.Invoke(ctx, Videos_ListVideos_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *videosClient) GetVideo(ctx context.Context, in *GetVideoRequest, opts ...grpc.CallOption) (*GetVideoResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(GetVideoResponse)
|
||||
err := c.cc.Invoke(ctx, Videos_GetVideo_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *videosClient) UpdateVideo(ctx context.Context, in *UpdateVideoRequest, opts ...grpc.CallOption) (*UpdateVideoResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(UpdateVideoResponse)
|
||||
err := c.cc.Invoke(ctx, Videos_UpdateVideo_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *videosClient) DeleteVideo(ctx context.Context, in *DeleteVideoRequest, opts ...grpc.CallOption) (*MessageResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(MessageResponse)
|
||||
err := c.cc.Invoke(ctx, Videos_DeleteVideo_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// VideosServer is the server API for Videos service.
|
||||
// All implementations must embed UnimplementedVideosServer
|
||||
// for forward compatibility.
|
||||
type VideosServer interface {
|
||||
GetUploadUrl(context.Context, *GetUploadUrlRequest) (*GetUploadUrlResponse, error)
|
||||
CreateVideo(context.Context, *CreateVideoRequest) (*CreateVideoResponse, error)
|
||||
ListVideos(context.Context, *ListVideosRequest) (*ListVideosResponse, error)
|
||||
GetVideo(context.Context, *GetVideoRequest) (*GetVideoResponse, error)
|
||||
UpdateVideo(context.Context, *UpdateVideoRequest) (*UpdateVideoResponse, error)
|
||||
DeleteVideo(context.Context, *DeleteVideoRequest) (*MessageResponse, error)
|
||||
mustEmbedUnimplementedVideosServer()
|
||||
}
|
||||
|
||||
// UnimplementedVideosServer must be embedded to have
|
||||
// forward compatible implementations.
|
||||
//
|
||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedVideosServer struct{}
|
||||
|
||||
func (UnimplementedVideosServer) GetUploadUrl(context.Context, *GetUploadUrlRequest) (*GetUploadUrlResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method GetUploadUrl not implemented")
|
||||
}
|
||||
func (UnimplementedVideosServer) CreateVideo(context.Context, *CreateVideoRequest) (*CreateVideoResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method CreateVideo not implemented")
|
||||
}
|
||||
func (UnimplementedVideosServer) ListVideos(context.Context, *ListVideosRequest) (*ListVideosResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method ListVideos not implemented")
|
||||
}
|
||||
func (UnimplementedVideosServer) GetVideo(context.Context, *GetVideoRequest) (*GetVideoResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method GetVideo not implemented")
|
||||
}
|
||||
func (UnimplementedVideosServer) UpdateVideo(context.Context, *UpdateVideoRequest) (*UpdateVideoResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method UpdateVideo not implemented")
|
||||
}
|
||||
func (UnimplementedVideosServer) DeleteVideo(context.Context, *DeleteVideoRequest) (*MessageResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method DeleteVideo not implemented")
|
||||
}
|
||||
func (UnimplementedVideosServer) mustEmbedUnimplementedVideosServer() {}
|
||||
func (UnimplementedVideosServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeVideosServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to VideosServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeVideosServer interface {
|
||||
mustEmbedUnimplementedVideosServer()
|
||||
}
|
||||
|
||||
func RegisterVideosServer(s grpc.ServiceRegistrar, srv VideosServer) {
|
||||
// If the following call panics, it indicates UnimplementedVideosServer was
|
||||
// embedded by pointer and is nil. This will cause panics if an
|
||||
// unimplemented method is ever invoked, so we test this at initialization
|
||||
// time to prevent it from happening at runtime later due to I/O.
|
||||
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
||||
t.testEmbeddedByValue()
|
||||
}
|
||||
s.RegisterService(&Videos_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _Videos_GetUploadUrl_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetUploadUrlRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(VideosServer).GetUploadUrl(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Videos_GetUploadUrl_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(VideosServer).GetUploadUrl(ctx, req.(*GetUploadUrlRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Videos_CreateVideo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CreateVideoRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(VideosServer).CreateVideo(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Videos_CreateVideo_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(VideosServer).CreateVideo(ctx, req.(*CreateVideoRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Videos_ListVideos_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ListVideosRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(VideosServer).ListVideos(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Videos_ListVideos_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(VideosServer).ListVideos(ctx, req.(*ListVideosRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Videos_GetVideo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetVideoRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(VideosServer).GetVideo(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Videos_GetVideo_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(VideosServer).GetVideo(ctx, req.(*GetVideoRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Videos_UpdateVideo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(UpdateVideoRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(VideosServer).UpdateVideo(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Videos_UpdateVideo_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(VideosServer).UpdateVideo(ctx, req.(*UpdateVideoRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Videos_DeleteVideo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DeleteVideoRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(VideosServer).DeleteVideo(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Videos_DeleteVideo_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(VideosServer).DeleteVideo(ctx, req.(*DeleteVideoRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// Videos_ServiceDesc is the grpc.ServiceDesc for Videos service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var Videos_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "stream.app.v1.Videos",
|
||||
HandlerType: (*VideosServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "GetUploadUrl",
|
||||
Handler: _Videos_GetUploadUrl_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "CreateVideo",
|
||||
Handler: _Videos_CreateVideo_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ListVideos",
|
||||
Handler: _Videos_ListVideos_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetVideo",
|
||||
Handler: _Videos_GetVideo_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UpdateVideo",
|
||||
Handler: _Videos_UpdateVideo_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "DeleteVideo",
|
||||
Handler: _Videos_DeleteVideo_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "app/v1/videos.proto",
|
||||
}
|
||||
Reference in New Issue
Block a user