draft grpc
This commit is contained in:
1076
internal/gen/proto/app/v1/account.pb.go
Normal file
1076
internal/gen/proto/app/v1/account.pb.go
Normal file
File diff suppressed because it is too large
Load Diff
731
internal/gen/proto/app/v1/account_grpc.pb.go
Normal file
731
internal/gen/proto/app/v1/account_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/account.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 (
|
||||
AccountService_GetMe_FullMethodName = "/stream.app.v1.AccountService/GetMe"
|
||||
AccountService_UpdateMe_FullMethodName = "/stream.app.v1.AccountService/UpdateMe"
|
||||
AccountService_DeleteMe_FullMethodName = "/stream.app.v1.AccountService/DeleteMe"
|
||||
AccountService_ClearMyData_FullMethodName = "/stream.app.v1.AccountService/ClearMyData"
|
||||
)
|
||||
|
||||
// AccountServiceClient is the client API for AccountService 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 AccountServiceClient 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)
|
||||
}
|
||||
|
||||
type accountServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewAccountServiceClient(cc grpc.ClientConnInterface) AccountServiceClient {
|
||||
return &accountServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *accountServiceClient) 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, AccountService_GetMe_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *accountServiceClient) 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, AccountService_UpdateMe_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *accountServiceClient) 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, AccountService_DeleteMe_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *accountServiceClient) 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, AccountService_ClearMyData_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// AccountServiceServer is the server API for AccountService service.
|
||||
// All implementations must embed UnimplementedAccountServiceServer
|
||||
// for forward compatibility.
|
||||
type AccountServiceServer 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)
|
||||
mustEmbedUnimplementedAccountServiceServer()
|
||||
}
|
||||
|
||||
// UnimplementedAccountServiceServer 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 UnimplementedAccountServiceServer struct{}
|
||||
|
||||
func (UnimplementedAccountServiceServer) GetMe(context.Context, *GetMeRequest) (*GetMeResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method GetMe not implemented")
|
||||
}
|
||||
func (UnimplementedAccountServiceServer) UpdateMe(context.Context, *UpdateMeRequest) (*UpdateMeResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method UpdateMe not implemented")
|
||||
}
|
||||
func (UnimplementedAccountServiceServer) DeleteMe(context.Context, *DeleteMeRequest) (*MessageResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method DeleteMe not implemented")
|
||||
}
|
||||
func (UnimplementedAccountServiceServer) ClearMyData(context.Context, *ClearMyDataRequest) (*MessageResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method ClearMyData not implemented")
|
||||
}
|
||||
func (UnimplementedAccountServiceServer) mustEmbedUnimplementedAccountServiceServer() {}
|
||||
func (UnimplementedAccountServiceServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeAccountServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to AccountServiceServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeAccountServiceServer interface {
|
||||
mustEmbedUnimplementedAccountServiceServer()
|
||||
}
|
||||
|
||||
func RegisterAccountServiceServer(s grpc.ServiceRegistrar, srv AccountServiceServer) {
|
||||
// If the following call panics, it indicates UnimplementedAccountServiceServer 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(&AccountService_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _AccountService_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.(AccountServiceServer).GetMe(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: AccountService_GetMe_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AccountServiceServer).GetMe(ctx, req.(*GetMeRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _AccountService_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.(AccountServiceServer).UpdateMe(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: AccountService_UpdateMe_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AccountServiceServer).UpdateMe(ctx, req.(*UpdateMeRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _AccountService_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.(AccountServiceServer).DeleteMe(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: AccountService_DeleteMe_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AccountServiceServer).DeleteMe(ctx, req.(*DeleteMeRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _AccountService_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.(AccountServiceServer).ClearMyData(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: AccountService_ClearMyData_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AccountServiceServer).ClearMyData(ctx, req.(*ClearMyDataRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// AccountService_ServiceDesc is the grpc.ServiceDesc for AccountService service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var AccountService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "stream.app.v1.AccountService",
|
||||
HandlerType: (*AccountServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "GetMe",
|
||||
Handler: _AccountService_GetMe_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UpdateMe",
|
||||
Handler: _AccountService_UpdateMe_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "DeleteMe",
|
||||
Handler: _AccountService_DeleteMe_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ClearMyData",
|
||||
Handler: _AccountService_ClearMyData_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "app/v1/account.proto",
|
||||
}
|
||||
|
||||
const (
|
||||
PreferencesService_GetPreferences_FullMethodName = "/stream.app.v1.PreferencesService/GetPreferences"
|
||||
PreferencesService_UpdatePreferences_FullMethodName = "/stream.app.v1.PreferencesService/UpdatePreferences"
|
||||
)
|
||||
|
||||
// PreferencesServiceClient is the client API for PreferencesService 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 PreferencesServiceClient interface {
|
||||
GetPreferences(ctx context.Context, in *GetPreferencesRequest, opts ...grpc.CallOption) (*GetPreferencesResponse, error)
|
||||
UpdatePreferences(ctx context.Context, in *UpdatePreferencesRequest, opts ...grpc.CallOption) (*UpdatePreferencesResponse, error)
|
||||
}
|
||||
|
||||
type preferencesServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewPreferencesServiceClient(cc grpc.ClientConnInterface) PreferencesServiceClient {
|
||||
return &preferencesServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *preferencesServiceClient) 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, PreferencesService_GetPreferences_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *preferencesServiceClient) 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, PreferencesService_UpdatePreferences_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// PreferencesServiceServer is the server API for PreferencesService service.
|
||||
// All implementations must embed UnimplementedPreferencesServiceServer
|
||||
// for forward compatibility.
|
||||
type PreferencesServiceServer interface {
|
||||
GetPreferences(context.Context, *GetPreferencesRequest) (*GetPreferencesResponse, error)
|
||||
UpdatePreferences(context.Context, *UpdatePreferencesRequest) (*UpdatePreferencesResponse, error)
|
||||
mustEmbedUnimplementedPreferencesServiceServer()
|
||||
}
|
||||
|
||||
// UnimplementedPreferencesServiceServer 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 UnimplementedPreferencesServiceServer struct{}
|
||||
|
||||
func (UnimplementedPreferencesServiceServer) GetPreferences(context.Context, *GetPreferencesRequest) (*GetPreferencesResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method GetPreferences not implemented")
|
||||
}
|
||||
func (UnimplementedPreferencesServiceServer) UpdatePreferences(context.Context, *UpdatePreferencesRequest) (*UpdatePreferencesResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method UpdatePreferences not implemented")
|
||||
}
|
||||
func (UnimplementedPreferencesServiceServer) mustEmbedUnimplementedPreferencesServiceServer() {}
|
||||
func (UnimplementedPreferencesServiceServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafePreferencesServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to PreferencesServiceServer will
|
||||
// result in compilation errors.
|
||||
type UnsafePreferencesServiceServer interface {
|
||||
mustEmbedUnimplementedPreferencesServiceServer()
|
||||
}
|
||||
|
||||
func RegisterPreferencesServiceServer(s grpc.ServiceRegistrar, srv PreferencesServiceServer) {
|
||||
// If the following call panics, it indicates UnimplementedPreferencesServiceServer 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(&PreferencesService_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _PreferencesService_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.(PreferencesServiceServer).GetPreferences(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: PreferencesService_GetPreferences_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(PreferencesServiceServer).GetPreferences(ctx, req.(*GetPreferencesRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _PreferencesService_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.(PreferencesServiceServer).UpdatePreferences(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: PreferencesService_UpdatePreferences_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(PreferencesServiceServer).UpdatePreferences(ctx, req.(*UpdatePreferencesRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// PreferencesService_ServiceDesc is the grpc.ServiceDesc for PreferencesService service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var PreferencesService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "stream.app.v1.PreferencesService",
|
||||
HandlerType: (*PreferencesServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "GetPreferences",
|
||||
Handler: _PreferencesService_GetPreferences_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UpdatePreferences",
|
||||
Handler: _PreferencesService_UpdatePreferences_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "app/v1/account.proto",
|
||||
}
|
||||
|
||||
const (
|
||||
UsageService_GetUsage_FullMethodName = "/stream.app.v1.UsageService/GetUsage"
|
||||
)
|
||||
|
||||
// UsageServiceClient is the client API for UsageService 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 UsageServiceClient interface {
|
||||
GetUsage(ctx context.Context, in *GetUsageRequest, opts ...grpc.CallOption) (*GetUsageResponse, error)
|
||||
}
|
||||
|
||||
type usageServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewUsageServiceClient(cc grpc.ClientConnInterface) UsageServiceClient {
|
||||
return &usageServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *usageServiceClient) 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, UsageService_GetUsage_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// UsageServiceServer is the server API for UsageService service.
|
||||
// All implementations must embed UnimplementedUsageServiceServer
|
||||
// for forward compatibility.
|
||||
type UsageServiceServer interface {
|
||||
GetUsage(context.Context, *GetUsageRequest) (*GetUsageResponse, error)
|
||||
mustEmbedUnimplementedUsageServiceServer()
|
||||
}
|
||||
|
||||
// UnimplementedUsageServiceServer 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 UnimplementedUsageServiceServer struct{}
|
||||
|
||||
func (UnimplementedUsageServiceServer) GetUsage(context.Context, *GetUsageRequest) (*GetUsageResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method GetUsage not implemented")
|
||||
}
|
||||
func (UnimplementedUsageServiceServer) mustEmbedUnimplementedUsageServiceServer() {}
|
||||
func (UnimplementedUsageServiceServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeUsageServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to UsageServiceServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeUsageServiceServer interface {
|
||||
mustEmbedUnimplementedUsageServiceServer()
|
||||
}
|
||||
|
||||
func RegisterUsageServiceServer(s grpc.ServiceRegistrar, srv UsageServiceServer) {
|
||||
// If the following call panics, it indicates UnimplementedUsageServiceServer 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(&UsageService_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _UsageService_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.(UsageServiceServer).GetUsage(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: UsageService_GetUsage_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(UsageServiceServer).GetUsage(ctx, req.(*GetUsageRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// UsageService_ServiceDesc is the grpc.ServiceDesc for UsageService service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var UsageService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "stream.app.v1.UsageService",
|
||||
HandlerType: (*UsageServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "GetUsage",
|
||||
Handler: _UsageService_GetUsage_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "app/v1/account.proto",
|
||||
}
|
||||
|
||||
const (
|
||||
NotificationsService_ListNotifications_FullMethodName = "/stream.app.v1.NotificationsService/ListNotifications"
|
||||
NotificationsService_MarkNotificationRead_FullMethodName = "/stream.app.v1.NotificationsService/MarkNotificationRead"
|
||||
NotificationsService_MarkAllNotificationsRead_FullMethodName = "/stream.app.v1.NotificationsService/MarkAllNotificationsRead"
|
||||
NotificationsService_DeleteNotification_FullMethodName = "/stream.app.v1.NotificationsService/DeleteNotification"
|
||||
NotificationsService_ClearNotifications_FullMethodName = "/stream.app.v1.NotificationsService/ClearNotifications"
|
||||
)
|
||||
|
||||
// NotificationsServiceClient is the client API for NotificationsService 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 NotificationsServiceClient 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 notificationsServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewNotificationsServiceClient(cc grpc.ClientConnInterface) NotificationsServiceClient {
|
||||
return ¬ificationsServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *notificationsServiceClient) 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, NotificationsService_ListNotifications_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *notificationsServiceClient) 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, NotificationsService_MarkNotificationRead_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *notificationsServiceClient) 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, NotificationsService_MarkAllNotificationsRead_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *notificationsServiceClient) 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, NotificationsService_DeleteNotification_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *notificationsServiceClient) 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, NotificationsService_ClearNotifications_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// NotificationsServiceServer is the server API for NotificationsService service.
|
||||
// All implementations must embed UnimplementedNotificationsServiceServer
|
||||
// for forward compatibility.
|
||||
type NotificationsServiceServer 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)
|
||||
mustEmbedUnimplementedNotificationsServiceServer()
|
||||
}
|
||||
|
||||
// UnimplementedNotificationsServiceServer 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 UnimplementedNotificationsServiceServer struct{}
|
||||
|
||||
func (UnimplementedNotificationsServiceServer) ListNotifications(context.Context, *ListNotificationsRequest) (*ListNotificationsResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method ListNotifications not implemented")
|
||||
}
|
||||
func (UnimplementedNotificationsServiceServer) MarkNotificationRead(context.Context, *MarkNotificationReadRequest) (*MessageResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method MarkNotificationRead not implemented")
|
||||
}
|
||||
func (UnimplementedNotificationsServiceServer) MarkAllNotificationsRead(context.Context, *MarkAllNotificationsReadRequest) (*MessageResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method MarkAllNotificationsRead not implemented")
|
||||
}
|
||||
func (UnimplementedNotificationsServiceServer) DeleteNotification(context.Context, *DeleteNotificationRequest) (*MessageResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method DeleteNotification not implemented")
|
||||
}
|
||||
func (UnimplementedNotificationsServiceServer) ClearNotifications(context.Context, *ClearNotificationsRequest) (*MessageResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method ClearNotifications not implemented")
|
||||
}
|
||||
func (UnimplementedNotificationsServiceServer) mustEmbedUnimplementedNotificationsServiceServer() {}
|
||||
func (UnimplementedNotificationsServiceServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeNotificationsServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to NotificationsServiceServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeNotificationsServiceServer interface {
|
||||
mustEmbedUnimplementedNotificationsServiceServer()
|
||||
}
|
||||
|
||||
func RegisterNotificationsServiceServer(s grpc.ServiceRegistrar, srv NotificationsServiceServer) {
|
||||
// If the following call panics, it indicates UnimplementedNotificationsServiceServer 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(&NotificationsService_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _NotificationsService_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.(NotificationsServiceServer).ListNotifications(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: NotificationsService_ListNotifications_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(NotificationsServiceServer).ListNotifications(ctx, req.(*ListNotificationsRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _NotificationsService_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.(NotificationsServiceServer).MarkNotificationRead(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: NotificationsService_MarkNotificationRead_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(NotificationsServiceServer).MarkNotificationRead(ctx, req.(*MarkNotificationReadRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _NotificationsService_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.(NotificationsServiceServer).MarkAllNotificationsRead(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: NotificationsService_MarkAllNotificationsRead_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(NotificationsServiceServer).MarkAllNotificationsRead(ctx, req.(*MarkAllNotificationsReadRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _NotificationsService_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.(NotificationsServiceServer).DeleteNotification(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: NotificationsService_DeleteNotification_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(NotificationsServiceServer).DeleteNotification(ctx, req.(*DeleteNotificationRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _NotificationsService_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.(NotificationsServiceServer).ClearNotifications(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: NotificationsService_ClearNotifications_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(NotificationsServiceServer).ClearNotifications(ctx, req.(*ClearNotificationsRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// NotificationsService_ServiceDesc is the grpc.ServiceDesc for NotificationsService service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var NotificationsService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "stream.app.v1.NotificationsService",
|
||||
HandlerType: (*NotificationsServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "ListNotifications",
|
||||
Handler: _NotificationsService_ListNotifications_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "MarkNotificationRead",
|
||||
Handler: _NotificationsService_MarkNotificationRead_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "MarkAllNotificationsRead",
|
||||
Handler: _NotificationsService_MarkAllNotificationsRead_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "DeleteNotification",
|
||||
Handler: _NotificationsService_DeleteNotification_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ClearNotifications",
|
||||
Handler: _NotificationsService_ClearNotifications_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "app/v1/account.proto",
|
||||
}
|
||||
4226
internal/gen/proto/app/v1/admin.pb.go
Normal file
4226
internal/gen/proto/app/v1/admin.pb.go
Normal file
File diff suppressed because it is too large
Load Diff
1375
internal/gen/proto/app/v1/admin_grpc.pb.go
Normal file
1375
internal/gen/proto/app/v1/admin_grpc.pb.go
Normal file
File diff suppressed because it is too large
Load Diff
697
internal/gen/proto/app/v1/auth.pb.go
Normal file
697
internal/gen/proto/app/v1/auth.pb.go
Normal file
@@ -0,0 +1,697 @@
|
||||
// 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"`
|
||||
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 ""
|
||||
}
|
||||
|
||||
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"`
|
||||
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 ""
|
||||
}
|
||||
|
||||
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\"_\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\";\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\"0\n" +
|
||||
"\x1aCompleteGoogleLoginRequest\x12\x12\n" +
|
||||
"\x04code\x18\x01 \x01(\tR\x04code\"F\n" +
|
||||
"\x1bCompleteGoogleLoginResponse\x12'\n" +
|
||||
"\x04user\x18\x01 \x01(\v2\x13.stream.app.v1.UserR\x04user2\xc2\x05\n" +
|
||||
"\vAuthService\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.AuthService.Login:input_type -> stream.app.v1.LoginRequest
|
||||
2, // 4: stream.app.v1.AuthService.Register:input_type -> stream.app.v1.RegisterRequest
|
||||
4, // 5: stream.app.v1.AuthService.Logout:input_type -> stream.app.v1.LogoutRequest
|
||||
5, // 6: stream.app.v1.AuthService.ChangePassword:input_type -> stream.app.v1.ChangePasswordRequest
|
||||
6, // 7: stream.app.v1.AuthService.ForgotPassword:input_type -> stream.app.v1.ForgotPasswordRequest
|
||||
7, // 8: stream.app.v1.AuthService.ResetPassword:input_type -> stream.app.v1.ResetPasswordRequest
|
||||
8, // 9: stream.app.v1.AuthService.GetGoogleLoginUrl:input_type -> stream.app.v1.GetGoogleLoginUrlRequest
|
||||
10, // 10: stream.app.v1.AuthService.CompleteGoogleLogin:input_type -> stream.app.v1.CompleteGoogleLoginRequest
|
||||
1, // 11: stream.app.v1.AuthService.Login:output_type -> stream.app.v1.LoginResponse
|
||||
3, // 12: stream.app.v1.AuthService.Register:output_type -> stream.app.v1.RegisterResponse
|
||||
13, // 13: stream.app.v1.AuthService.Logout:output_type -> stream.app.v1.MessageResponse
|
||||
13, // 14: stream.app.v1.AuthService.ChangePassword:output_type -> stream.app.v1.MessageResponse
|
||||
13, // 15: stream.app.v1.AuthService.ForgotPassword:output_type -> stream.app.v1.MessageResponse
|
||||
13, // 16: stream.app.v1.AuthService.ResetPassword:output_type -> stream.app.v1.MessageResponse
|
||||
9, // 17: stream.app.v1.AuthService.GetGoogleLoginUrl:output_type -> stream.app.v1.GetGoogleLoginUrlResponse
|
||||
11, // 18: stream.app.v1.AuthService.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()
|
||||
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/gen/proto/app/v1/auth_grpc.pb.go
Normal file
387
internal/gen/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 (
|
||||
AuthService_Login_FullMethodName = "/stream.app.v1.AuthService/Login"
|
||||
AuthService_Register_FullMethodName = "/stream.app.v1.AuthService/Register"
|
||||
AuthService_Logout_FullMethodName = "/stream.app.v1.AuthService/Logout"
|
||||
AuthService_ChangePassword_FullMethodName = "/stream.app.v1.AuthService/ChangePassword"
|
||||
AuthService_ForgotPassword_FullMethodName = "/stream.app.v1.AuthService/ForgotPassword"
|
||||
AuthService_ResetPassword_FullMethodName = "/stream.app.v1.AuthService/ResetPassword"
|
||||
AuthService_GetGoogleLoginUrl_FullMethodName = "/stream.app.v1.AuthService/GetGoogleLoginUrl"
|
||||
AuthService_CompleteGoogleLogin_FullMethodName = "/stream.app.v1.AuthService/CompleteGoogleLogin"
|
||||
)
|
||||
|
||||
// AuthServiceClient is the client API for AuthService 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 AuthServiceClient 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 authServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewAuthServiceClient(cc grpc.ClientConnInterface) AuthServiceClient {
|
||||
return &authServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *authServiceClient) 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, AuthService_Login_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *authServiceClient) 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, AuthService_Register_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *authServiceClient) 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, AuthService_Logout_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *authServiceClient) 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, AuthService_ChangePassword_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *authServiceClient) 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, AuthService_ForgotPassword_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *authServiceClient) 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, AuthService_ResetPassword_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *authServiceClient) 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, AuthService_GetGoogleLoginUrl_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *authServiceClient) 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, AuthService_CompleteGoogleLogin_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// AuthServiceServer is the server API for AuthService service.
|
||||
// All implementations must embed UnimplementedAuthServiceServer
|
||||
// for forward compatibility.
|
||||
type AuthServiceServer 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)
|
||||
mustEmbedUnimplementedAuthServiceServer()
|
||||
}
|
||||
|
||||
// UnimplementedAuthServiceServer 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 UnimplementedAuthServiceServer struct{}
|
||||
|
||||
func (UnimplementedAuthServiceServer) Login(context.Context, *LoginRequest) (*LoginResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method Login not implemented")
|
||||
}
|
||||
func (UnimplementedAuthServiceServer) Register(context.Context, *RegisterRequest) (*RegisterResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method Register not implemented")
|
||||
}
|
||||
func (UnimplementedAuthServiceServer) Logout(context.Context, *LogoutRequest) (*MessageResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method Logout not implemented")
|
||||
}
|
||||
func (UnimplementedAuthServiceServer) ChangePassword(context.Context, *ChangePasswordRequest) (*MessageResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method ChangePassword not implemented")
|
||||
}
|
||||
func (UnimplementedAuthServiceServer) ForgotPassword(context.Context, *ForgotPasswordRequest) (*MessageResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method ForgotPassword not implemented")
|
||||
}
|
||||
func (UnimplementedAuthServiceServer) ResetPassword(context.Context, *ResetPasswordRequest) (*MessageResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method ResetPassword not implemented")
|
||||
}
|
||||
func (UnimplementedAuthServiceServer) GetGoogleLoginUrl(context.Context, *GetGoogleLoginUrlRequest) (*GetGoogleLoginUrlResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method GetGoogleLoginUrl not implemented")
|
||||
}
|
||||
func (UnimplementedAuthServiceServer) CompleteGoogleLogin(context.Context, *CompleteGoogleLoginRequest) (*CompleteGoogleLoginResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method CompleteGoogleLogin not implemented")
|
||||
}
|
||||
func (UnimplementedAuthServiceServer) mustEmbedUnimplementedAuthServiceServer() {}
|
||||
func (UnimplementedAuthServiceServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeAuthServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to AuthServiceServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeAuthServiceServer interface {
|
||||
mustEmbedUnimplementedAuthServiceServer()
|
||||
}
|
||||
|
||||
func RegisterAuthServiceServer(s grpc.ServiceRegistrar, srv AuthServiceServer) {
|
||||
// If the following call panics, it indicates UnimplementedAuthServiceServer 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(&AuthService_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _AuthService_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.(AuthServiceServer).Login(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: AuthService_Login_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AuthServiceServer).Login(ctx, req.(*LoginRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _AuthService_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.(AuthServiceServer).Register(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: AuthService_Register_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AuthServiceServer).Register(ctx, req.(*RegisterRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _AuthService_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.(AuthServiceServer).Logout(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: AuthService_Logout_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AuthServiceServer).Logout(ctx, req.(*LogoutRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _AuthService_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.(AuthServiceServer).ChangePassword(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: AuthService_ChangePassword_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AuthServiceServer).ChangePassword(ctx, req.(*ChangePasswordRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _AuthService_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.(AuthServiceServer).ForgotPassword(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: AuthService_ForgotPassword_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AuthServiceServer).ForgotPassword(ctx, req.(*ForgotPasswordRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _AuthService_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.(AuthServiceServer).ResetPassword(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: AuthService_ResetPassword_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AuthServiceServer).ResetPassword(ctx, req.(*ResetPasswordRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _AuthService_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.(AuthServiceServer).GetGoogleLoginUrl(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: AuthService_GetGoogleLoginUrl_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AuthServiceServer).GetGoogleLoginUrl(ctx, req.(*GetGoogleLoginUrlRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _AuthService_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.(AuthServiceServer).CompleteGoogleLogin(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: AuthService_CompleteGoogleLogin_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AuthServiceServer).CompleteGoogleLogin(ctx, req.(*CompleteGoogleLoginRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// AuthService_ServiceDesc is the grpc.ServiceDesc for AuthService service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var AuthService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "stream.app.v1.AuthService",
|
||||
HandlerType: (*AuthServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "Login",
|
||||
Handler: _AuthService_Login_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Register",
|
||||
Handler: _AuthService_Register_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Logout",
|
||||
Handler: _AuthService_Logout_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ChangePassword",
|
||||
Handler: _AuthService_ChangePassword_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ForgotPassword",
|
||||
Handler: _AuthService_ForgotPassword_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ResetPassword",
|
||||
Handler: _AuthService_ResetPassword_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetGoogleLoginUrl",
|
||||
Handler: _AuthService_GetGoogleLoginUrl_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "CompleteGoogleLogin",
|
||||
Handler: _AuthService_CompleteGoogleLogin_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "app/v1/auth.proto",
|
||||
}
|
||||
881
internal/gen/proto/app/v1/catalog.pb.go
Normal file
881
internal/gen/proto/app/v1/catalog.pb.go
Normal file
@@ -0,0 +1,881 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.11
|
||||
// protoc (unknown)
|
||||
// source: app/v1/catalog.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 ListDomainsRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *ListDomainsRequest) Reset() {
|
||||
*x = ListDomainsRequest{}
|
||||
mi := &file_app_v1_catalog_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ListDomainsRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ListDomainsRequest) ProtoMessage() {}
|
||||
|
||||
func (x *ListDomainsRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_app_v1_catalog_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 ListDomainsRequest.ProtoReflect.Descriptor instead.
|
||||
func (*ListDomainsRequest) Descriptor() ([]byte, []int) {
|
||||
return file_app_v1_catalog_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
type ListDomainsResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Domains []*Domain `protobuf:"bytes,1,rep,name=domains,proto3" json:"domains,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *ListDomainsResponse) Reset() {
|
||||
*x = ListDomainsResponse{}
|
||||
mi := &file_app_v1_catalog_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ListDomainsResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ListDomainsResponse) ProtoMessage() {}
|
||||
|
||||
func (x *ListDomainsResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_app_v1_catalog_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 ListDomainsResponse.ProtoReflect.Descriptor instead.
|
||||
func (*ListDomainsResponse) Descriptor() ([]byte, []int) {
|
||||
return file_app_v1_catalog_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *ListDomainsResponse) GetDomains() []*Domain {
|
||||
if x != nil {
|
||||
return x.Domains
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type CreateDomainRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *CreateDomainRequest) Reset() {
|
||||
*x = CreateDomainRequest{}
|
||||
mi := &file_app_v1_catalog_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *CreateDomainRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*CreateDomainRequest) ProtoMessage() {}
|
||||
|
||||
func (x *CreateDomainRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_app_v1_catalog_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 CreateDomainRequest.ProtoReflect.Descriptor instead.
|
||||
func (*CreateDomainRequest) Descriptor() ([]byte, []int) {
|
||||
return file_app_v1_catalog_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *CreateDomainRequest) GetName() string {
|
||||
if x != nil {
|
||||
return x.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type CreateDomainResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Domain *Domain `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *CreateDomainResponse) Reset() {
|
||||
*x = CreateDomainResponse{}
|
||||
mi := &file_app_v1_catalog_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *CreateDomainResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*CreateDomainResponse) ProtoMessage() {}
|
||||
|
||||
func (x *CreateDomainResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_app_v1_catalog_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 CreateDomainResponse.ProtoReflect.Descriptor instead.
|
||||
func (*CreateDomainResponse) Descriptor() ([]byte, []int) {
|
||||
return file_app_v1_catalog_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *CreateDomainResponse) GetDomain() *Domain {
|
||||
if x != nil {
|
||||
return x.Domain
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type DeleteDomainRequest 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 *DeleteDomainRequest) Reset() {
|
||||
*x = DeleteDomainRequest{}
|
||||
mi := &file_app_v1_catalog_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *DeleteDomainRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DeleteDomainRequest) ProtoMessage() {}
|
||||
|
||||
func (x *DeleteDomainRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_app_v1_catalog_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 DeleteDomainRequest.ProtoReflect.Descriptor instead.
|
||||
func (*DeleteDomainRequest) Descriptor() ([]byte, []int) {
|
||||
return file_app_v1_catalog_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *DeleteDomainRequest) GetId() string {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type ListAdTemplatesRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *ListAdTemplatesRequest) Reset() {
|
||||
*x = ListAdTemplatesRequest{}
|
||||
mi := &file_app_v1_catalog_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ListAdTemplatesRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ListAdTemplatesRequest) ProtoMessage() {}
|
||||
|
||||
func (x *ListAdTemplatesRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_app_v1_catalog_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 ListAdTemplatesRequest.ProtoReflect.Descriptor instead.
|
||||
func (*ListAdTemplatesRequest) Descriptor() ([]byte, []int) {
|
||||
return file_app_v1_catalog_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
type ListAdTemplatesResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Templates []*AdTemplate `protobuf:"bytes,1,rep,name=templates,proto3" json:"templates,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *ListAdTemplatesResponse) Reset() {
|
||||
*x = ListAdTemplatesResponse{}
|
||||
mi := &file_app_v1_catalog_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ListAdTemplatesResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ListAdTemplatesResponse) ProtoMessage() {}
|
||||
|
||||
func (x *ListAdTemplatesResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_app_v1_catalog_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 ListAdTemplatesResponse.ProtoReflect.Descriptor instead.
|
||||
func (*ListAdTemplatesResponse) Descriptor() ([]byte, []int) {
|
||||
return file_app_v1_catalog_proto_rawDescGZIP(), []int{6}
|
||||
}
|
||||
|
||||
func (x *ListAdTemplatesResponse) GetTemplates() []*AdTemplate {
|
||||
if x != nil {
|
||||
return x.Templates
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type CreateAdTemplateRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Description *string `protobuf:"bytes,2,opt,name=description,proto3,oneof" json:"description,omitempty"`
|
||||
VastTagUrl string `protobuf:"bytes,3,opt,name=vast_tag_url,json=vastTagUrl,proto3" json:"vast_tag_url,omitempty"`
|
||||
AdFormat *string `protobuf:"bytes,4,opt,name=ad_format,json=adFormat,proto3,oneof" json:"ad_format,omitempty"`
|
||||
Duration *int32 `protobuf:"varint,5,opt,name=duration,proto3,oneof" json:"duration,omitempty"`
|
||||
IsActive *bool `protobuf:"varint,6,opt,name=is_active,json=isActive,proto3,oneof" json:"is_active,omitempty"`
|
||||
IsDefault *bool `protobuf:"varint,7,opt,name=is_default,json=isDefault,proto3,oneof" json:"is_default,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *CreateAdTemplateRequest) Reset() {
|
||||
*x = CreateAdTemplateRequest{}
|
||||
mi := &file_app_v1_catalog_proto_msgTypes[7]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *CreateAdTemplateRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*CreateAdTemplateRequest) ProtoMessage() {}
|
||||
|
||||
func (x *CreateAdTemplateRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_app_v1_catalog_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 CreateAdTemplateRequest.ProtoReflect.Descriptor instead.
|
||||
func (*CreateAdTemplateRequest) Descriptor() ([]byte, []int) {
|
||||
return file_app_v1_catalog_proto_rawDescGZIP(), []int{7}
|
||||
}
|
||||
|
||||
func (x *CreateAdTemplateRequest) GetName() string {
|
||||
if x != nil {
|
||||
return x.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *CreateAdTemplateRequest) GetDescription() string {
|
||||
if x != nil && x.Description != nil {
|
||||
return *x.Description
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *CreateAdTemplateRequest) GetVastTagUrl() string {
|
||||
if x != nil {
|
||||
return x.VastTagUrl
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *CreateAdTemplateRequest) GetAdFormat() string {
|
||||
if x != nil && x.AdFormat != nil {
|
||||
return *x.AdFormat
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *CreateAdTemplateRequest) GetDuration() int32 {
|
||||
if x != nil && x.Duration != nil {
|
||||
return *x.Duration
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *CreateAdTemplateRequest) GetIsActive() bool {
|
||||
if x != nil && x.IsActive != nil {
|
||||
return *x.IsActive
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *CreateAdTemplateRequest) GetIsDefault() bool {
|
||||
if x != nil && x.IsDefault != nil {
|
||||
return *x.IsDefault
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
type CreateAdTemplateResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Template *AdTemplate `protobuf:"bytes,1,opt,name=template,proto3" json:"template,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *CreateAdTemplateResponse) Reset() {
|
||||
*x = CreateAdTemplateResponse{}
|
||||
mi := &file_app_v1_catalog_proto_msgTypes[8]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *CreateAdTemplateResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*CreateAdTemplateResponse) ProtoMessage() {}
|
||||
|
||||
func (x *CreateAdTemplateResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_app_v1_catalog_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 CreateAdTemplateResponse.ProtoReflect.Descriptor instead.
|
||||
func (*CreateAdTemplateResponse) Descriptor() ([]byte, []int) {
|
||||
return file_app_v1_catalog_proto_rawDescGZIP(), []int{8}
|
||||
}
|
||||
|
||||
func (x *CreateAdTemplateResponse) GetTemplate() *AdTemplate {
|
||||
if x != nil {
|
||||
return x.Template
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type UpdateAdTemplateRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Description *string `protobuf:"bytes,3,opt,name=description,proto3,oneof" json:"description,omitempty"`
|
||||
VastTagUrl string `protobuf:"bytes,4,opt,name=vast_tag_url,json=vastTagUrl,proto3" json:"vast_tag_url,omitempty"`
|
||||
AdFormat *string `protobuf:"bytes,5,opt,name=ad_format,json=adFormat,proto3,oneof" json:"ad_format,omitempty"`
|
||||
Duration *int32 `protobuf:"varint,6,opt,name=duration,proto3,oneof" json:"duration,omitempty"`
|
||||
IsActive *bool `protobuf:"varint,7,opt,name=is_active,json=isActive,proto3,oneof" json:"is_active,omitempty"`
|
||||
IsDefault *bool `protobuf:"varint,8,opt,name=is_default,json=isDefault,proto3,oneof" json:"is_default,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *UpdateAdTemplateRequest) Reset() {
|
||||
*x = UpdateAdTemplateRequest{}
|
||||
mi := &file_app_v1_catalog_proto_msgTypes[9]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *UpdateAdTemplateRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*UpdateAdTemplateRequest) ProtoMessage() {}
|
||||
|
||||
func (x *UpdateAdTemplateRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_app_v1_catalog_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 UpdateAdTemplateRequest.ProtoReflect.Descriptor instead.
|
||||
func (*UpdateAdTemplateRequest) Descriptor() ([]byte, []int) {
|
||||
return file_app_v1_catalog_proto_rawDescGZIP(), []int{9}
|
||||
}
|
||||
|
||||
func (x *UpdateAdTemplateRequest) GetId() string {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *UpdateAdTemplateRequest) GetName() string {
|
||||
if x != nil {
|
||||
return x.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *UpdateAdTemplateRequest) GetDescription() string {
|
||||
if x != nil && x.Description != nil {
|
||||
return *x.Description
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *UpdateAdTemplateRequest) GetVastTagUrl() string {
|
||||
if x != nil {
|
||||
return x.VastTagUrl
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *UpdateAdTemplateRequest) GetAdFormat() string {
|
||||
if x != nil && x.AdFormat != nil {
|
||||
return *x.AdFormat
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *UpdateAdTemplateRequest) GetDuration() int32 {
|
||||
if x != nil && x.Duration != nil {
|
||||
return *x.Duration
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *UpdateAdTemplateRequest) GetIsActive() bool {
|
||||
if x != nil && x.IsActive != nil {
|
||||
return *x.IsActive
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *UpdateAdTemplateRequest) GetIsDefault() bool {
|
||||
if x != nil && x.IsDefault != nil {
|
||||
return *x.IsDefault
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
type UpdateAdTemplateResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Template *AdTemplate `protobuf:"bytes,1,opt,name=template,proto3" json:"template,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *UpdateAdTemplateResponse) Reset() {
|
||||
*x = UpdateAdTemplateResponse{}
|
||||
mi := &file_app_v1_catalog_proto_msgTypes[10]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *UpdateAdTemplateResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*UpdateAdTemplateResponse) ProtoMessage() {}
|
||||
|
||||
func (x *UpdateAdTemplateResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_app_v1_catalog_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 UpdateAdTemplateResponse.ProtoReflect.Descriptor instead.
|
||||
func (*UpdateAdTemplateResponse) Descriptor() ([]byte, []int) {
|
||||
return file_app_v1_catalog_proto_rawDescGZIP(), []int{10}
|
||||
}
|
||||
|
||||
func (x *UpdateAdTemplateResponse) GetTemplate() *AdTemplate {
|
||||
if x != nil {
|
||||
return x.Template
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type DeleteAdTemplateRequest 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 *DeleteAdTemplateRequest) Reset() {
|
||||
*x = DeleteAdTemplateRequest{}
|
||||
mi := &file_app_v1_catalog_proto_msgTypes[11]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *DeleteAdTemplateRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DeleteAdTemplateRequest) ProtoMessage() {}
|
||||
|
||||
func (x *DeleteAdTemplateRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_app_v1_catalog_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 DeleteAdTemplateRequest.ProtoReflect.Descriptor instead.
|
||||
func (*DeleteAdTemplateRequest) Descriptor() ([]byte, []int) {
|
||||
return file_app_v1_catalog_proto_rawDescGZIP(), []int{11}
|
||||
}
|
||||
|
||||
func (x *DeleteAdTemplateRequest) GetId() string {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type ListPlansRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *ListPlansRequest) Reset() {
|
||||
*x = ListPlansRequest{}
|
||||
mi := &file_app_v1_catalog_proto_msgTypes[12]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ListPlansRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ListPlansRequest) ProtoMessage() {}
|
||||
|
||||
func (x *ListPlansRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_app_v1_catalog_proto_msgTypes[12]
|
||||
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 ListPlansRequest.ProtoReflect.Descriptor instead.
|
||||
func (*ListPlansRequest) Descriptor() ([]byte, []int) {
|
||||
return file_app_v1_catalog_proto_rawDescGZIP(), []int{12}
|
||||
}
|
||||
|
||||
type ListPlansResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Plans []*Plan `protobuf:"bytes,1,rep,name=plans,proto3" json:"plans,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *ListPlansResponse) Reset() {
|
||||
*x = ListPlansResponse{}
|
||||
mi := &file_app_v1_catalog_proto_msgTypes[13]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ListPlansResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ListPlansResponse) ProtoMessage() {}
|
||||
|
||||
func (x *ListPlansResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_app_v1_catalog_proto_msgTypes[13]
|
||||
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 ListPlansResponse.ProtoReflect.Descriptor instead.
|
||||
func (*ListPlansResponse) Descriptor() ([]byte, []int) {
|
||||
return file_app_v1_catalog_proto_rawDescGZIP(), []int{13}
|
||||
}
|
||||
|
||||
func (x *ListPlansResponse) GetPlans() []*Plan {
|
||||
if x != nil {
|
||||
return x.Plans
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_app_v1_catalog_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_app_v1_catalog_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"\x14app/v1/catalog.proto\x12\rstream.app.v1\x1a\x13app/v1/common.proto\"\x14\n" +
|
||||
"\x12ListDomainsRequest\"F\n" +
|
||||
"\x13ListDomainsResponse\x12/\n" +
|
||||
"\adomains\x18\x01 \x03(\v2\x15.stream.app.v1.DomainR\adomains\")\n" +
|
||||
"\x13CreateDomainRequest\x12\x12\n" +
|
||||
"\x04name\x18\x01 \x01(\tR\x04name\"E\n" +
|
||||
"\x14CreateDomainResponse\x12-\n" +
|
||||
"\x06domain\x18\x01 \x01(\v2\x15.stream.app.v1.DomainR\x06domain\"%\n" +
|
||||
"\x13DeleteDomainRequest\x12\x0e\n" +
|
||||
"\x02id\x18\x01 \x01(\tR\x02id\"\x18\n" +
|
||||
"\x16ListAdTemplatesRequest\"R\n" +
|
||||
"\x17ListAdTemplatesResponse\x127\n" +
|
||||
"\ttemplates\x18\x01 \x03(\v2\x19.stream.app.v1.AdTemplateR\ttemplates\"\xc7\x02\n" +
|
||||
"\x17CreateAdTemplateRequest\x12\x12\n" +
|
||||
"\x04name\x18\x01 \x01(\tR\x04name\x12%\n" +
|
||||
"\vdescription\x18\x02 \x01(\tH\x00R\vdescription\x88\x01\x01\x12 \n" +
|
||||
"\fvast_tag_url\x18\x03 \x01(\tR\n" +
|
||||
"vastTagUrl\x12 \n" +
|
||||
"\tad_format\x18\x04 \x01(\tH\x01R\badFormat\x88\x01\x01\x12\x1f\n" +
|
||||
"\bduration\x18\x05 \x01(\x05H\x02R\bduration\x88\x01\x01\x12 \n" +
|
||||
"\tis_active\x18\x06 \x01(\bH\x03R\bisActive\x88\x01\x01\x12\"\n" +
|
||||
"\n" +
|
||||
"is_default\x18\a \x01(\bH\x04R\tisDefault\x88\x01\x01B\x0e\n" +
|
||||
"\f_descriptionB\f\n" +
|
||||
"\n" +
|
||||
"_ad_formatB\v\n" +
|
||||
"\t_durationB\f\n" +
|
||||
"\n" +
|
||||
"_is_activeB\r\n" +
|
||||
"\v_is_default\"Q\n" +
|
||||
"\x18CreateAdTemplateResponse\x125\n" +
|
||||
"\btemplate\x18\x01 \x01(\v2\x19.stream.app.v1.AdTemplateR\btemplate\"\xd7\x02\n" +
|
||||
"\x17UpdateAdTemplateRequest\x12\x0e\n" +
|
||||
"\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n" +
|
||||
"\x04name\x18\x02 \x01(\tR\x04name\x12%\n" +
|
||||
"\vdescription\x18\x03 \x01(\tH\x00R\vdescription\x88\x01\x01\x12 \n" +
|
||||
"\fvast_tag_url\x18\x04 \x01(\tR\n" +
|
||||
"vastTagUrl\x12 \n" +
|
||||
"\tad_format\x18\x05 \x01(\tH\x01R\badFormat\x88\x01\x01\x12\x1f\n" +
|
||||
"\bduration\x18\x06 \x01(\x05H\x02R\bduration\x88\x01\x01\x12 \n" +
|
||||
"\tis_active\x18\a \x01(\bH\x03R\bisActive\x88\x01\x01\x12\"\n" +
|
||||
"\n" +
|
||||
"is_default\x18\b \x01(\bH\x04R\tisDefault\x88\x01\x01B\x0e\n" +
|
||||
"\f_descriptionB\f\n" +
|
||||
"\n" +
|
||||
"_ad_formatB\v\n" +
|
||||
"\t_durationB\f\n" +
|
||||
"\n" +
|
||||
"_is_activeB\r\n" +
|
||||
"\v_is_default\"Q\n" +
|
||||
"\x18UpdateAdTemplateResponse\x125\n" +
|
||||
"\btemplate\x18\x01 \x01(\v2\x19.stream.app.v1.AdTemplateR\btemplate\")\n" +
|
||||
"\x17DeleteAdTemplateRequest\x12\x0e\n" +
|
||||
"\x02id\x18\x01 \x01(\tR\x02id\"\x12\n" +
|
||||
"\x10ListPlansRequest\">\n" +
|
||||
"\x11ListPlansResponse\x12)\n" +
|
||||
"\x05plans\x18\x01 \x03(\v2\x13.stream.app.v1.PlanR\x05plans2\x93\x02\n" +
|
||||
"\x0eDomainsService\x12T\n" +
|
||||
"\vListDomains\x12!.stream.app.v1.ListDomainsRequest\x1a\".stream.app.v1.ListDomainsResponse\x12W\n" +
|
||||
"\fCreateDomain\x12\".stream.app.v1.CreateDomainRequest\x1a#.stream.app.v1.CreateDomainResponse\x12R\n" +
|
||||
"\fDeleteDomain\x12\".stream.app.v1.DeleteDomainRequest\x1a\x1e.stream.app.v1.MessageResponse2\x9c\x03\n" +
|
||||
"\x12AdTemplatesService\x12`\n" +
|
||||
"\x0fListAdTemplates\x12%.stream.app.v1.ListAdTemplatesRequest\x1a&.stream.app.v1.ListAdTemplatesResponse\x12c\n" +
|
||||
"\x10CreateAdTemplate\x12&.stream.app.v1.CreateAdTemplateRequest\x1a'.stream.app.v1.CreateAdTemplateResponse\x12c\n" +
|
||||
"\x10UpdateAdTemplate\x12&.stream.app.v1.UpdateAdTemplateRequest\x1a'.stream.app.v1.UpdateAdTemplateResponse\x12Z\n" +
|
||||
"\x10DeleteAdTemplate\x12&.stream.app.v1.DeleteAdTemplateRequest\x1a\x1e.stream.app.v1.MessageResponse2^\n" +
|
||||
"\fPlansService\x12N\n" +
|
||||
"\tListPlans\x12\x1f.stream.app.v1.ListPlansRequest\x1a .stream.app.v1.ListPlansResponseB,Z*stream.api/internal/gen/proto/app/v1;appv1b\x06proto3"
|
||||
|
||||
var (
|
||||
file_app_v1_catalog_proto_rawDescOnce sync.Once
|
||||
file_app_v1_catalog_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_app_v1_catalog_proto_rawDescGZIP() []byte {
|
||||
file_app_v1_catalog_proto_rawDescOnce.Do(func() {
|
||||
file_app_v1_catalog_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_app_v1_catalog_proto_rawDesc), len(file_app_v1_catalog_proto_rawDesc)))
|
||||
})
|
||||
return file_app_v1_catalog_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_app_v1_catalog_proto_msgTypes = make([]protoimpl.MessageInfo, 14)
|
||||
var file_app_v1_catalog_proto_goTypes = []any{
|
||||
(*ListDomainsRequest)(nil), // 0: stream.app.v1.ListDomainsRequest
|
||||
(*ListDomainsResponse)(nil), // 1: stream.app.v1.ListDomainsResponse
|
||||
(*CreateDomainRequest)(nil), // 2: stream.app.v1.CreateDomainRequest
|
||||
(*CreateDomainResponse)(nil), // 3: stream.app.v1.CreateDomainResponse
|
||||
(*DeleteDomainRequest)(nil), // 4: stream.app.v1.DeleteDomainRequest
|
||||
(*ListAdTemplatesRequest)(nil), // 5: stream.app.v1.ListAdTemplatesRequest
|
||||
(*ListAdTemplatesResponse)(nil), // 6: stream.app.v1.ListAdTemplatesResponse
|
||||
(*CreateAdTemplateRequest)(nil), // 7: stream.app.v1.CreateAdTemplateRequest
|
||||
(*CreateAdTemplateResponse)(nil), // 8: stream.app.v1.CreateAdTemplateResponse
|
||||
(*UpdateAdTemplateRequest)(nil), // 9: stream.app.v1.UpdateAdTemplateRequest
|
||||
(*UpdateAdTemplateResponse)(nil), // 10: stream.app.v1.UpdateAdTemplateResponse
|
||||
(*DeleteAdTemplateRequest)(nil), // 11: stream.app.v1.DeleteAdTemplateRequest
|
||||
(*ListPlansRequest)(nil), // 12: stream.app.v1.ListPlansRequest
|
||||
(*ListPlansResponse)(nil), // 13: stream.app.v1.ListPlansResponse
|
||||
(*Domain)(nil), // 14: stream.app.v1.Domain
|
||||
(*AdTemplate)(nil), // 15: stream.app.v1.AdTemplate
|
||||
(*Plan)(nil), // 16: stream.app.v1.Plan
|
||||
(*MessageResponse)(nil), // 17: stream.app.v1.MessageResponse
|
||||
}
|
||||
var file_app_v1_catalog_proto_depIdxs = []int32{
|
||||
14, // 0: stream.app.v1.ListDomainsResponse.domains:type_name -> stream.app.v1.Domain
|
||||
14, // 1: stream.app.v1.CreateDomainResponse.domain:type_name -> stream.app.v1.Domain
|
||||
15, // 2: stream.app.v1.ListAdTemplatesResponse.templates:type_name -> stream.app.v1.AdTemplate
|
||||
15, // 3: stream.app.v1.CreateAdTemplateResponse.template:type_name -> stream.app.v1.AdTemplate
|
||||
15, // 4: stream.app.v1.UpdateAdTemplateResponse.template:type_name -> stream.app.v1.AdTemplate
|
||||
16, // 5: stream.app.v1.ListPlansResponse.plans:type_name -> stream.app.v1.Plan
|
||||
0, // 6: stream.app.v1.DomainsService.ListDomains:input_type -> stream.app.v1.ListDomainsRequest
|
||||
2, // 7: stream.app.v1.DomainsService.CreateDomain:input_type -> stream.app.v1.CreateDomainRequest
|
||||
4, // 8: stream.app.v1.DomainsService.DeleteDomain:input_type -> stream.app.v1.DeleteDomainRequest
|
||||
5, // 9: stream.app.v1.AdTemplatesService.ListAdTemplates:input_type -> stream.app.v1.ListAdTemplatesRequest
|
||||
7, // 10: stream.app.v1.AdTemplatesService.CreateAdTemplate:input_type -> stream.app.v1.CreateAdTemplateRequest
|
||||
9, // 11: stream.app.v1.AdTemplatesService.UpdateAdTemplate:input_type -> stream.app.v1.UpdateAdTemplateRequest
|
||||
11, // 12: stream.app.v1.AdTemplatesService.DeleteAdTemplate:input_type -> stream.app.v1.DeleteAdTemplateRequest
|
||||
12, // 13: stream.app.v1.PlansService.ListPlans:input_type -> stream.app.v1.ListPlansRequest
|
||||
1, // 14: stream.app.v1.DomainsService.ListDomains:output_type -> stream.app.v1.ListDomainsResponse
|
||||
3, // 15: stream.app.v1.DomainsService.CreateDomain:output_type -> stream.app.v1.CreateDomainResponse
|
||||
17, // 16: stream.app.v1.DomainsService.DeleteDomain:output_type -> stream.app.v1.MessageResponse
|
||||
6, // 17: stream.app.v1.AdTemplatesService.ListAdTemplates:output_type -> stream.app.v1.ListAdTemplatesResponse
|
||||
8, // 18: stream.app.v1.AdTemplatesService.CreateAdTemplate:output_type -> stream.app.v1.CreateAdTemplateResponse
|
||||
10, // 19: stream.app.v1.AdTemplatesService.UpdateAdTemplate:output_type -> stream.app.v1.UpdateAdTemplateResponse
|
||||
17, // 20: stream.app.v1.AdTemplatesService.DeleteAdTemplate:output_type -> stream.app.v1.MessageResponse
|
||||
13, // 21: stream.app.v1.PlansService.ListPlans:output_type -> stream.app.v1.ListPlansResponse
|
||||
14, // [14:22] is the sub-list for method output_type
|
||||
6, // [6:14] is the sub-list for method input_type
|
||||
6, // [6:6] is the sub-list for extension type_name
|
||||
6, // [6:6] is the sub-list for extension extendee
|
||||
0, // [0:6] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_app_v1_catalog_proto_init() }
|
||||
func file_app_v1_catalog_proto_init() {
|
||||
if File_app_v1_catalog_proto != nil {
|
||||
return
|
||||
}
|
||||
file_app_v1_common_proto_init()
|
||||
file_app_v1_catalog_proto_msgTypes[7].OneofWrappers = []any{}
|
||||
file_app_v1_catalog_proto_msgTypes[9].OneofWrappers = []any{}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_app_v1_catalog_proto_rawDesc), len(file_app_v1_catalog_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 14,
|
||||
NumExtensions: 0,
|
||||
NumServices: 3,
|
||||
},
|
||||
GoTypes: file_app_v1_catalog_proto_goTypes,
|
||||
DependencyIndexes: file_app_v1_catalog_proto_depIdxs,
|
||||
MessageInfos: file_app_v1_catalog_proto_msgTypes,
|
||||
}.Build()
|
||||
File_app_v1_catalog_proto = out.File
|
||||
file_app_v1_catalog_proto_goTypes = nil
|
||||
file_app_v1_catalog_proto_depIdxs = nil
|
||||
}
|
||||
515
internal/gen/proto/app/v1/catalog_grpc.pb.go
Normal file
515
internal/gen/proto/app/v1/catalog_grpc.pb.go
Normal file
@@ -0,0 +1,515 @@
|
||||
// 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 (
|
||||
DomainsService_ListDomains_FullMethodName = "/stream.app.v1.DomainsService/ListDomains"
|
||||
DomainsService_CreateDomain_FullMethodName = "/stream.app.v1.DomainsService/CreateDomain"
|
||||
DomainsService_DeleteDomain_FullMethodName = "/stream.app.v1.DomainsService/DeleteDomain"
|
||||
)
|
||||
|
||||
// DomainsServiceClient is the client API for DomainsService 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 DomainsServiceClient 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 domainsServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewDomainsServiceClient(cc grpc.ClientConnInterface) DomainsServiceClient {
|
||||
return &domainsServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *domainsServiceClient) 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, DomainsService_ListDomains_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *domainsServiceClient) 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, DomainsService_CreateDomain_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *domainsServiceClient) 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, DomainsService_DeleteDomain_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// DomainsServiceServer is the server API for DomainsService service.
|
||||
// All implementations must embed UnimplementedDomainsServiceServer
|
||||
// for forward compatibility.
|
||||
type DomainsServiceServer interface {
|
||||
ListDomains(context.Context, *ListDomainsRequest) (*ListDomainsResponse, error)
|
||||
CreateDomain(context.Context, *CreateDomainRequest) (*CreateDomainResponse, error)
|
||||
DeleteDomain(context.Context, *DeleteDomainRequest) (*MessageResponse, error)
|
||||
mustEmbedUnimplementedDomainsServiceServer()
|
||||
}
|
||||
|
||||
// UnimplementedDomainsServiceServer 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 UnimplementedDomainsServiceServer struct{}
|
||||
|
||||
func (UnimplementedDomainsServiceServer) ListDomains(context.Context, *ListDomainsRequest) (*ListDomainsResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method ListDomains not implemented")
|
||||
}
|
||||
func (UnimplementedDomainsServiceServer) CreateDomain(context.Context, *CreateDomainRequest) (*CreateDomainResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method CreateDomain not implemented")
|
||||
}
|
||||
func (UnimplementedDomainsServiceServer) DeleteDomain(context.Context, *DeleteDomainRequest) (*MessageResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method DeleteDomain not implemented")
|
||||
}
|
||||
func (UnimplementedDomainsServiceServer) mustEmbedUnimplementedDomainsServiceServer() {}
|
||||
func (UnimplementedDomainsServiceServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeDomainsServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to DomainsServiceServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeDomainsServiceServer interface {
|
||||
mustEmbedUnimplementedDomainsServiceServer()
|
||||
}
|
||||
|
||||
func RegisterDomainsServiceServer(s grpc.ServiceRegistrar, srv DomainsServiceServer) {
|
||||
// If the following call panics, it indicates UnimplementedDomainsServiceServer 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(&DomainsService_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _DomainsService_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.(DomainsServiceServer).ListDomains(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: DomainsService_ListDomains_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DomainsServiceServer).ListDomains(ctx, req.(*ListDomainsRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _DomainsService_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.(DomainsServiceServer).CreateDomain(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: DomainsService_CreateDomain_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DomainsServiceServer).CreateDomain(ctx, req.(*CreateDomainRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _DomainsService_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.(DomainsServiceServer).DeleteDomain(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: DomainsService_DeleteDomain_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DomainsServiceServer).DeleteDomain(ctx, req.(*DeleteDomainRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// DomainsService_ServiceDesc is the grpc.ServiceDesc for DomainsService service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var DomainsService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "stream.app.v1.DomainsService",
|
||||
HandlerType: (*DomainsServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "ListDomains",
|
||||
Handler: _DomainsService_ListDomains_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "CreateDomain",
|
||||
Handler: _DomainsService_CreateDomain_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "DeleteDomain",
|
||||
Handler: _DomainsService_DeleteDomain_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "app/v1/catalog.proto",
|
||||
}
|
||||
|
||||
const (
|
||||
AdTemplatesService_ListAdTemplates_FullMethodName = "/stream.app.v1.AdTemplatesService/ListAdTemplates"
|
||||
AdTemplatesService_CreateAdTemplate_FullMethodName = "/stream.app.v1.AdTemplatesService/CreateAdTemplate"
|
||||
AdTemplatesService_UpdateAdTemplate_FullMethodName = "/stream.app.v1.AdTemplatesService/UpdateAdTemplate"
|
||||
AdTemplatesService_DeleteAdTemplate_FullMethodName = "/stream.app.v1.AdTemplatesService/DeleteAdTemplate"
|
||||
)
|
||||
|
||||
// AdTemplatesServiceClient is the client API for AdTemplatesService 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 AdTemplatesServiceClient 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 adTemplatesServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewAdTemplatesServiceClient(cc grpc.ClientConnInterface) AdTemplatesServiceClient {
|
||||
return &adTemplatesServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *adTemplatesServiceClient) 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, AdTemplatesService_ListAdTemplates_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *adTemplatesServiceClient) 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, AdTemplatesService_CreateAdTemplate_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *adTemplatesServiceClient) 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, AdTemplatesService_UpdateAdTemplate_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *adTemplatesServiceClient) 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, AdTemplatesService_DeleteAdTemplate_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// AdTemplatesServiceServer is the server API for AdTemplatesService service.
|
||||
// All implementations must embed UnimplementedAdTemplatesServiceServer
|
||||
// for forward compatibility.
|
||||
type AdTemplatesServiceServer 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)
|
||||
mustEmbedUnimplementedAdTemplatesServiceServer()
|
||||
}
|
||||
|
||||
// UnimplementedAdTemplatesServiceServer 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 UnimplementedAdTemplatesServiceServer struct{}
|
||||
|
||||
func (UnimplementedAdTemplatesServiceServer) ListAdTemplates(context.Context, *ListAdTemplatesRequest) (*ListAdTemplatesResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method ListAdTemplates not implemented")
|
||||
}
|
||||
func (UnimplementedAdTemplatesServiceServer) CreateAdTemplate(context.Context, *CreateAdTemplateRequest) (*CreateAdTemplateResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method CreateAdTemplate not implemented")
|
||||
}
|
||||
func (UnimplementedAdTemplatesServiceServer) UpdateAdTemplate(context.Context, *UpdateAdTemplateRequest) (*UpdateAdTemplateResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method UpdateAdTemplate not implemented")
|
||||
}
|
||||
func (UnimplementedAdTemplatesServiceServer) DeleteAdTemplate(context.Context, *DeleteAdTemplateRequest) (*MessageResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method DeleteAdTemplate not implemented")
|
||||
}
|
||||
func (UnimplementedAdTemplatesServiceServer) mustEmbedUnimplementedAdTemplatesServiceServer() {}
|
||||
func (UnimplementedAdTemplatesServiceServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeAdTemplatesServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to AdTemplatesServiceServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeAdTemplatesServiceServer interface {
|
||||
mustEmbedUnimplementedAdTemplatesServiceServer()
|
||||
}
|
||||
|
||||
func RegisterAdTemplatesServiceServer(s grpc.ServiceRegistrar, srv AdTemplatesServiceServer) {
|
||||
// If the following call panics, it indicates UnimplementedAdTemplatesServiceServer 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(&AdTemplatesService_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _AdTemplatesService_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.(AdTemplatesServiceServer).ListAdTemplates(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: AdTemplatesService_ListAdTemplates_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AdTemplatesServiceServer).ListAdTemplates(ctx, req.(*ListAdTemplatesRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _AdTemplatesService_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.(AdTemplatesServiceServer).CreateAdTemplate(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: AdTemplatesService_CreateAdTemplate_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AdTemplatesServiceServer).CreateAdTemplate(ctx, req.(*CreateAdTemplateRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _AdTemplatesService_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.(AdTemplatesServiceServer).UpdateAdTemplate(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: AdTemplatesService_UpdateAdTemplate_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AdTemplatesServiceServer).UpdateAdTemplate(ctx, req.(*UpdateAdTemplateRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _AdTemplatesService_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.(AdTemplatesServiceServer).DeleteAdTemplate(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: AdTemplatesService_DeleteAdTemplate_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AdTemplatesServiceServer).DeleteAdTemplate(ctx, req.(*DeleteAdTemplateRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// AdTemplatesService_ServiceDesc is the grpc.ServiceDesc for AdTemplatesService service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var AdTemplatesService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "stream.app.v1.AdTemplatesService",
|
||||
HandlerType: (*AdTemplatesServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "ListAdTemplates",
|
||||
Handler: _AdTemplatesService_ListAdTemplates_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "CreateAdTemplate",
|
||||
Handler: _AdTemplatesService_CreateAdTemplate_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UpdateAdTemplate",
|
||||
Handler: _AdTemplatesService_UpdateAdTemplate_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "DeleteAdTemplate",
|
||||
Handler: _AdTemplatesService_DeleteAdTemplate_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "app/v1/catalog.proto",
|
||||
}
|
||||
|
||||
const (
|
||||
PlansService_ListPlans_FullMethodName = "/stream.app.v1.PlansService/ListPlans"
|
||||
)
|
||||
|
||||
// PlansServiceClient is the client API for PlansService 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 PlansServiceClient interface {
|
||||
ListPlans(ctx context.Context, in *ListPlansRequest, opts ...grpc.CallOption) (*ListPlansResponse, error)
|
||||
}
|
||||
|
||||
type plansServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewPlansServiceClient(cc grpc.ClientConnInterface) PlansServiceClient {
|
||||
return &plansServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *plansServiceClient) 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, PlansService_ListPlans_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// PlansServiceServer is the server API for PlansService service.
|
||||
// All implementations must embed UnimplementedPlansServiceServer
|
||||
// for forward compatibility.
|
||||
type PlansServiceServer interface {
|
||||
ListPlans(context.Context, *ListPlansRequest) (*ListPlansResponse, error)
|
||||
mustEmbedUnimplementedPlansServiceServer()
|
||||
}
|
||||
|
||||
// UnimplementedPlansServiceServer 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 UnimplementedPlansServiceServer struct{}
|
||||
|
||||
func (UnimplementedPlansServiceServer) ListPlans(context.Context, *ListPlansRequest) (*ListPlansResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method ListPlans not implemented")
|
||||
}
|
||||
func (UnimplementedPlansServiceServer) mustEmbedUnimplementedPlansServiceServer() {}
|
||||
func (UnimplementedPlansServiceServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafePlansServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to PlansServiceServer will
|
||||
// result in compilation errors.
|
||||
type UnsafePlansServiceServer interface {
|
||||
mustEmbedUnimplementedPlansServiceServer()
|
||||
}
|
||||
|
||||
func RegisterPlansServiceServer(s grpc.ServiceRegistrar, srv PlansServiceServer) {
|
||||
// If the following call panics, it indicates UnimplementedPlansServiceServer 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(&PlansService_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _PlansService_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.(PlansServiceServer).ListPlans(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: PlansService_ListPlans_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(PlansServiceServer).ListPlans(ctx, req.(*ListPlansRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// PlansService_ServiceDesc is the grpc.ServiceDesc for PlansService service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var PlansService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "stream.app.v1.PlansService",
|
||||
HandlerType: (*PlansServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "ListPlans",
|
||||
Handler: _PlansService_ListPlans_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "app/v1/catalog.proto",
|
||||
}
|
||||
3187
internal/gen/proto/app/v1/common.pb.go
Normal file
3187
internal/gen/proto/app/v1/common.pb.go
Normal file
File diff suppressed because it is too large
Load Diff
568
internal/gen/proto/app/v1/payments.pb.go
Normal file
568
internal/gen/proto/app/v1/payments.pb.go
Normal file
@@ -0,0 +1,568 @@
|
||||
// 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"`
|
||||
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}
|
||||
}
|
||||
|
||||
type ListPaymentHistoryResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Payments []*PaymentHistoryItem `protobuf:"bytes,1,rep,name=payments,proto3" json:"payments,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
|
||||
}
|
||||
|
||||
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\"\x1b\n" +
|
||||
"\x19ListPaymentHistoryRequest\"[\n" +
|
||||
"\x1aListPaymentHistoryResponse\x12=\n" +
|
||||
"\bpayments\x18\x01 \x03(\v2!.stream.app.v1.PaymentHistoryItemR\bpayments\",\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\x90\x03\n" +
|
||||
"\x0fPaymentsService\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.PaymentsService.CreatePayment:input_type -> stream.app.v1.CreatePaymentRequest
|
||||
2, // 5: stream.app.v1.PaymentsService.ListPaymentHistory:input_type -> stream.app.v1.ListPaymentHistoryRequest
|
||||
4, // 6: stream.app.v1.PaymentsService.TopupWallet:input_type -> stream.app.v1.TopupWalletRequest
|
||||
6, // 7: stream.app.v1.PaymentsService.DownloadInvoice:input_type -> stream.app.v1.DownloadInvoiceRequest
|
||||
1, // 8: stream.app.v1.PaymentsService.CreatePayment:output_type -> stream.app.v1.CreatePaymentResponse
|
||||
3, // 9: stream.app.v1.PaymentsService.ListPaymentHistory:output_type -> stream.app.v1.ListPaymentHistoryResponse
|
||||
5, // 10: stream.app.v1.PaymentsService.TopupWallet:output_type -> stream.app.v1.TopupWalletResponse
|
||||
7, // 11: stream.app.v1.PaymentsService.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/gen/proto/app/v1/payments_grpc.pb.go
Normal file
235
internal/gen/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 (
|
||||
PaymentsService_CreatePayment_FullMethodName = "/stream.app.v1.PaymentsService/CreatePayment"
|
||||
PaymentsService_ListPaymentHistory_FullMethodName = "/stream.app.v1.PaymentsService/ListPaymentHistory"
|
||||
PaymentsService_TopupWallet_FullMethodName = "/stream.app.v1.PaymentsService/TopupWallet"
|
||||
PaymentsService_DownloadInvoice_FullMethodName = "/stream.app.v1.PaymentsService/DownloadInvoice"
|
||||
)
|
||||
|
||||
// PaymentsServiceClient is the client API for PaymentsService 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 PaymentsServiceClient 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 paymentsServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewPaymentsServiceClient(cc grpc.ClientConnInterface) PaymentsServiceClient {
|
||||
return &paymentsServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *paymentsServiceClient) 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, PaymentsService_CreatePayment_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *paymentsServiceClient) 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, PaymentsService_ListPaymentHistory_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *paymentsServiceClient) 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, PaymentsService_TopupWallet_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *paymentsServiceClient) 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, PaymentsService_DownloadInvoice_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// PaymentsServiceServer is the server API for PaymentsService service.
|
||||
// All implementations must embed UnimplementedPaymentsServiceServer
|
||||
// for forward compatibility.
|
||||
type PaymentsServiceServer 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)
|
||||
mustEmbedUnimplementedPaymentsServiceServer()
|
||||
}
|
||||
|
||||
// UnimplementedPaymentsServiceServer 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 UnimplementedPaymentsServiceServer struct{}
|
||||
|
||||
func (UnimplementedPaymentsServiceServer) CreatePayment(context.Context, *CreatePaymentRequest) (*CreatePaymentResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method CreatePayment not implemented")
|
||||
}
|
||||
func (UnimplementedPaymentsServiceServer) ListPaymentHistory(context.Context, *ListPaymentHistoryRequest) (*ListPaymentHistoryResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method ListPaymentHistory not implemented")
|
||||
}
|
||||
func (UnimplementedPaymentsServiceServer) TopupWallet(context.Context, *TopupWalletRequest) (*TopupWalletResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method TopupWallet not implemented")
|
||||
}
|
||||
func (UnimplementedPaymentsServiceServer) DownloadInvoice(context.Context, *DownloadInvoiceRequest) (*DownloadInvoiceResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method DownloadInvoice not implemented")
|
||||
}
|
||||
func (UnimplementedPaymentsServiceServer) mustEmbedUnimplementedPaymentsServiceServer() {}
|
||||
func (UnimplementedPaymentsServiceServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafePaymentsServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to PaymentsServiceServer will
|
||||
// result in compilation errors.
|
||||
type UnsafePaymentsServiceServer interface {
|
||||
mustEmbedUnimplementedPaymentsServiceServer()
|
||||
}
|
||||
|
||||
func RegisterPaymentsServiceServer(s grpc.ServiceRegistrar, srv PaymentsServiceServer) {
|
||||
// If the following call panics, it indicates UnimplementedPaymentsServiceServer 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(&PaymentsService_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _PaymentsService_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.(PaymentsServiceServer).CreatePayment(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: PaymentsService_CreatePayment_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(PaymentsServiceServer).CreatePayment(ctx, req.(*CreatePaymentRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _PaymentsService_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.(PaymentsServiceServer).ListPaymentHistory(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: PaymentsService_ListPaymentHistory_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(PaymentsServiceServer).ListPaymentHistory(ctx, req.(*ListPaymentHistoryRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _PaymentsService_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.(PaymentsServiceServer).TopupWallet(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: PaymentsService_TopupWallet_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(PaymentsServiceServer).TopupWallet(ctx, req.(*TopupWalletRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _PaymentsService_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.(PaymentsServiceServer).DownloadInvoice(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: PaymentsService_DownloadInvoice_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(PaymentsServiceServer).DownloadInvoice(ctx, req.(*DownloadInvoiceRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// PaymentsService_ServiceDesc is the grpc.ServiceDesc for PaymentsService service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var PaymentsService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "stream.app.v1.PaymentsService",
|
||||
HandlerType: (*PaymentsServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "CreatePayment",
|
||||
Handler: _PaymentsService_CreatePayment_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ListPaymentHistory",
|
||||
Handler: _PaymentsService_ListPaymentHistory_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "TopupWallet",
|
||||
Handler: _PaymentsService_TopupWallet_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "DownloadInvoice",
|
||||
Handler: _PaymentsService_DownloadInvoice_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "app/v1/payments.proto",
|
||||
}
|
||||
810
internal/gen/proto/app/v1/videos.pb.go
Normal file
810
internal/gen/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\x86\x04\n" +
|
||||
"\rVideosService\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.VideosService.GetUploadUrl:input_type -> stream.app.v1.GetUploadUrlRequest
|
||||
2, // 5: stream.app.v1.VideosService.CreateVideo:input_type -> stream.app.v1.CreateVideoRequest
|
||||
4, // 6: stream.app.v1.VideosService.ListVideos:input_type -> stream.app.v1.ListVideosRequest
|
||||
6, // 7: stream.app.v1.VideosService.GetVideo:input_type -> stream.app.v1.GetVideoRequest
|
||||
8, // 8: stream.app.v1.VideosService.UpdateVideo:input_type -> stream.app.v1.UpdateVideoRequest
|
||||
10, // 9: stream.app.v1.VideosService.DeleteVideo:input_type -> stream.app.v1.DeleteVideoRequest
|
||||
1, // 10: stream.app.v1.VideosService.GetUploadUrl:output_type -> stream.app.v1.GetUploadUrlResponse
|
||||
3, // 11: stream.app.v1.VideosService.CreateVideo:output_type -> stream.app.v1.CreateVideoResponse
|
||||
5, // 12: stream.app.v1.VideosService.ListVideos:output_type -> stream.app.v1.ListVideosResponse
|
||||
7, // 13: stream.app.v1.VideosService.GetVideo:output_type -> stream.app.v1.GetVideoResponse
|
||||
9, // 14: stream.app.v1.VideosService.UpdateVideo:output_type -> stream.app.v1.UpdateVideoResponse
|
||||
12, // 15: stream.app.v1.VideosService.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/gen/proto/app/v1/videos_grpc.pb.go
Normal file
311
internal/gen/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 (
|
||||
VideosService_GetUploadUrl_FullMethodName = "/stream.app.v1.VideosService/GetUploadUrl"
|
||||
VideosService_CreateVideo_FullMethodName = "/stream.app.v1.VideosService/CreateVideo"
|
||||
VideosService_ListVideos_FullMethodName = "/stream.app.v1.VideosService/ListVideos"
|
||||
VideosService_GetVideo_FullMethodName = "/stream.app.v1.VideosService/GetVideo"
|
||||
VideosService_UpdateVideo_FullMethodName = "/stream.app.v1.VideosService/UpdateVideo"
|
||||
VideosService_DeleteVideo_FullMethodName = "/stream.app.v1.VideosService/DeleteVideo"
|
||||
)
|
||||
|
||||
// VideosServiceClient is the client API for VideosService 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 VideosServiceClient 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 videosServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewVideosServiceClient(cc grpc.ClientConnInterface) VideosServiceClient {
|
||||
return &videosServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *videosServiceClient) 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, VideosService_GetUploadUrl_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *videosServiceClient) 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, VideosService_CreateVideo_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *videosServiceClient) 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, VideosService_ListVideos_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *videosServiceClient) 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, VideosService_GetVideo_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *videosServiceClient) 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, VideosService_UpdateVideo_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *videosServiceClient) 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, VideosService_DeleteVideo_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// VideosServiceServer is the server API for VideosService service.
|
||||
// All implementations must embed UnimplementedVideosServiceServer
|
||||
// for forward compatibility.
|
||||
type VideosServiceServer 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)
|
||||
mustEmbedUnimplementedVideosServiceServer()
|
||||
}
|
||||
|
||||
// UnimplementedVideosServiceServer 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 UnimplementedVideosServiceServer struct{}
|
||||
|
||||
func (UnimplementedVideosServiceServer) GetUploadUrl(context.Context, *GetUploadUrlRequest) (*GetUploadUrlResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method GetUploadUrl not implemented")
|
||||
}
|
||||
func (UnimplementedVideosServiceServer) CreateVideo(context.Context, *CreateVideoRequest) (*CreateVideoResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method CreateVideo not implemented")
|
||||
}
|
||||
func (UnimplementedVideosServiceServer) ListVideos(context.Context, *ListVideosRequest) (*ListVideosResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method ListVideos not implemented")
|
||||
}
|
||||
func (UnimplementedVideosServiceServer) GetVideo(context.Context, *GetVideoRequest) (*GetVideoResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method GetVideo not implemented")
|
||||
}
|
||||
func (UnimplementedVideosServiceServer) UpdateVideo(context.Context, *UpdateVideoRequest) (*UpdateVideoResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method UpdateVideo not implemented")
|
||||
}
|
||||
func (UnimplementedVideosServiceServer) DeleteVideo(context.Context, *DeleteVideoRequest) (*MessageResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method DeleteVideo not implemented")
|
||||
}
|
||||
func (UnimplementedVideosServiceServer) mustEmbedUnimplementedVideosServiceServer() {}
|
||||
func (UnimplementedVideosServiceServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeVideosServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to VideosServiceServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeVideosServiceServer interface {
|
||||
mustEmbedUnimplementedVideosServiceServer()
|
||||
}
|
||||
|
||||
func RegisterVideosServiceServer(s grpc.ServiceRegistrar, srv VideosServiceServer) {
|
||||
// If the following call panics, it indicates UnimplementedVideosServiceServer 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(&VideosService_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _VideosService_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.(VideosServiceServer).GetUploadUrl(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: VideosService_GetUploadUrl_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(VideosServiceServer).GetUploadUrl(ctx, req.(*GetUploadUrlRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _VideosService_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.(VideosServiceServer).CreateVideo(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: VideosService_CreateVideo_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(VideosServiceServer).CreateVideo(ctx, req.(*CreateVideoRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _VideosService_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.(VideosServiceServer).ListVideos(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: VideosService_ListVideos_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(VideosServiceServer).ListVideos(ctx, req.(*ListVideosRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _VideosService_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.(VideosServiceServer).GetVideo(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: VideosService_GetVideo_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(VideosServiceServer).GetVideo(ctx, req.(*GetVideoRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _VideosService_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.(VideosServiceServer).UpdateVideo(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: VideosService_UpdateVideo_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(VideosServiceServer).UpdateVideo(ctx, req.(*UpdateVideoRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _VideosService_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.(VideosServiceServer).DeleteVideo(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: VideosService_DeleteVideo_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(VideosServiceServer).DeleteVideo(ctx, req.(*DeleteVideoRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// VideosService_ServiceDesc is the grpc.ServiceDesc for VideosService service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var VideosService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "stream.app.v1.VideosService",
|
||||
HandlerType: (*VideosServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "GetUploadUrl",
|
||||
Handler: _VideosService_GetUploadUrl_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "CreateVideo",
|
||||
Handler: _VideosService_CreateVideo_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ListVideos",
|
||||
Handler: _VideosService_ListVideos_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetVideo",
|
||||
Handler: _VideosService_GetVideo_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UpdateVideo",
|
||||
Handler: _VideosService_UpdateVideo_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "DeleteVideo",
|
||||
Handler: _VideosService_DeleteVideo_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "app/v1/videos.proto",
|
||||
}
|
||||
Reference in New Issue
Block a user