🎉 Initial Commit of Ring

This commit is contained in:
2025-12-13 22:51:11 +08:00
parent aed5d53f9e
commit 445363406b
47 changed files with 31140 additions and 48 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,968 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.6.0
// - protoc v6.33.1
// source: account.proto
package gen
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
wrapperspb "google.golang.org/protobuf/types/known/wrapperspb"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.64.0 or later.
const _ = grpc.SupportPackageIsVersion9
const (
AccountService_GetAccount_FullMethodName = "/proto.AccountService/GetAccount"
AccountService_GetBotAccount_FullMethodName = "/proto.AccountService/GetBotAccount"
AccountService_GetAccountBatch_FullMethodName = "/proto.AccountService/GetAccountBatch"
AccountService_GetBotAccountBatch_FullMethodName = "/proto.AccountService/GetBotAccountBatch"
AccountService_LookupAccountBatch_FullMethodName = "/proto.AccountService/LookupAccountBatch"
AccountService_SearchAccount_FullMethodName = "/proto.AccountService/SearchAccount"
AccountService_ListAccounts_FullMethodName = "/proto.AccountService/ListAccounts"
AccountService_GetAccountStatus_FullMethodName = "/proto.AccountService/GetAccountStatus"
AccountService_GetAccountStatusBatch_FullMethodName = "/proto.AccountService/GetAccountStatusBatch"
AccountService_GetProfile_FullMethodName = "/proto.AccountService/GetProfile"
AccountService_ListContacts_FullMethodName = "/proto.AccountService/ListContacts"
AccountService_ListBadges_FullMethodName = "/proto.AccountService/ListBadges"
AccountService_ListAuthFactors_FullMethodName = "/proto.AccountService/ListAuthFactors"
AccountService_ListConnections_FullMethodName = "/proto.AccountService/ListConnections"
AccountService_ListRelationships_FullMethodName = "/proto.AccountService/ListRelationships"
AccountService_GetRelationship_FullMethodName = "/proto.AccountService/GetRelationship"
AccountService_HasRelationship_FullMethodName = "/proto.AccountService/HasRelationship"
AccountService_ListFriends_FullMethodName = "/proto.AccountService/ListFriends"
AccountService_ListBlocked_FullMethodName = "/proto.AccountService/ListBlocked"
)
// 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.
//
// AccountService provides CRUD operations for user accounts and related entities
type AccountServiceClient interface {
// Account Operations
GetAccount(ctx context.Context, in *GetAccountRequest, opts ...grpc.CallOption) (*Account, error)
GetBotAccount(ctx context.Context, in *GetBotAccountRequest, opts ...grpc.CallOption) (*Account, error)
GetAccountBatch(ctx context.Context, in *GetAccountBatchRequest, opts ...grpc.CallOption) (*GetAccountBatchResponse, error)
GetBotAccountBatch(ctx context.Context, in *GetBotAccountBatchRequest, opts ...grpc.CallOption) (*GetAccountBatchResponse, error)
LookupAccountBatch(ctx context.Context, in *LookupAccountBatchRequest, opts ...grpc.CallOption) (*GetAccountBatchResponse, error)
SearchAccount(ctx context.Context, in *SearchAccountRequest, opts ...grpc.CallOption) (*GetAccountBatchResponse, error)
ListAccounts(ctx context.Context, in *ListAccountsRequest, opts ...grpc.CallOption) (*ListAccountsResponse, error)
GetAccountStatus(ctx context.Context, in *GetAccountRequest, opts ...grpc.CallOption) (*AccountStatus, error)
GetAccountStatusBatch(ctx context.Context, in *GetAccountBatchRequest, opts ...grpc.CallOption) (*GetAccountStatusBatchResponse, error)
// Profile Operations
GetProfile(ctx context.Context, in *GetProfileRequest, opts ...grpc.CallOption) (*AccountProfile, error)
// Contact Operations
ListContacts(ctx context.Context, in *ListContactsRequest, opts ...grpc.CallOption) (*ListContactsResponse, error)
// Badge Operations
ListBadges(ctx context.Context, in *ListBadgesRequest, opts ...grpc.CallOption) (*ListBadgesResponse, error)
// Authentication Factor Operations
ListAuthFactors(ctx context.Context, in *ListAuthFactorsRequest, opts ...grpc.CallOption) (*ListAuthFactorsResponse, error)
// Connection Operations
ListConnections(ctx context.Context, in *ListConnectionsRequest, opts ...grpc.CallOption) (*ListConnectionsResponse, error)
// Relationship Operations
ListRelationships(ctx context.Context, in *ListRelationshipsRequest, opts ...grpc.CallOption) (*ListRelationshipsResponse, error)
GetRelationship(ctx context.Context, in *GetRelationshipRequest, opts ...grpc.CallOption) (*GetRelationshipResponse, error)
HasRelationship(ctx context.Context, in *GetRelationshipRequest, opts ...grpc.CallOption) (*wrapperspb.BoolValue, error)
ListFriends(ctx context.Context, in *ListRelationshipSimpleRequest, opts ...grpc.CallOption) (*ListRelationshipSimpleResponse, error)
ListBlocked(ctx context.Context, in *ListRelationshipSimpleRequest, opts ...grpc.CallOption) (*ListRelationshipSimpleResponse, error)
}
type accountServiceClient struct {
cc grpc.ClientConnInterface
}
func NewAccountServiceClient(cc grpc.ClientConnInterface) AccountServiceClient {
return &accountServiceClient{cc}
}
func (c *accountServiceClient) GetAccount(ctx context.Context, in *GetAccountRequest, opts ...grpc.CallOption) (*Account, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Account)
err := c.cc.Invoke(ctx, AccountService_GetAccount_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *accountServiceClient) GetBotAccount(ctx context.Context, in *GetBotAccountRequest, opts ...grpc.CallOption) (*Account, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Account)
err := c.cc.Invoke(ctx, AccountService_GetBotAccount_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *accountServiceClient) GetAccountBatch(ctx context.Context, in *GetAccountBatchRequest, opts ...grpc.CallOption) (*GetAccountBatchResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetAccountBatchResponse)
err := c.cc.Invoke(ctx, AccountService_GetAccountBatch_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *accountServiceClient) GetBotAccountBatch(ctx context.Context, in *GetBotAccountBatchRequest, opts ...grpc.CallOption) (*GetAccountBatchResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetAccountBatchResponse)
err := c.cc.Invoke(ctx, AccountService_GetBotAccountBatch_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *accountServiceClient) LookupAccountBatch(ctx context.Context, in *LookupAccountBatchRequest, opts ...grpc.CallOption) (*GetAccountBatchResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetAccountBatchResponse)
err := c.cc.Invoke(ctx, AccountService_LookupAccountBatch_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *accountServiceClient) SearchAccount(ctx context.Context, in *SearchAccountRequest, opts ...grpc.CallOption) (*GetAccountBatchResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetAccountBatchResponse)
err := c.cc.Invoke(ctx, AccountService_SearchAccount_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *accountServiceClient) ListAccounts(ctx context.Context, in *ListAccountsRequest, opts ...grpc.CallOption) (*ListAccountsResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ListAccountsResponse)
err := c.cc.Invoke(ctx, AccountService_ListAccounts_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *accountServiceClient) GetAccountStatus(ctx context.Context, in *GetAccountRequest, opts ...grpc.CallOption) (*AccountStatus, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(AccountStatus)
err := c.cc.Invoke(ctx, AccountService_GetAccountStatus_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *accountServiceClient) GetAccountStatusBatch(ctx context.Context, in *GetAccountBatchRequest, opts ...grpc.CallOption) (*GetAccountStatusBatchResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetAccountStatusBatchResponse)
err := c.cc.Invoke(ctx, AccountService_GetAccountStatusBatch_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *accountServiceClient) GetProfile(ctx context.Context, in *GetProfileRequest, opts ...grpc.CallOption) (*AccountProfile, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(AccountProfile)
err := c.cc.Invoke(ctx, AccountService_GetProfile_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *accountServiceClient) ListContacts(ctx context.Context, in *ListContactsRequest, opts ...grpc.CallOption) (*ListContactsResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ListContactsResponse)
err := c.cc.Invoke(ctx, AccountService_ListContacts_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *accountServiceClient) ListBadges(ctx context.Context, in *ListBadgesRequest, opts ...grpc.CallOption) (*ListBadgesResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ListBadgesResponse)
err := c.cc.Invoke(ctx, AccountService_ListBadges_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *accountServiceClient) ListAuthFactors(ctx context.Context, in *ListAuthFactorsRequest, opts ...grpc.CallOption) (*ListAuthFactorsResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ListAuthFactorsResponse)
err := c.cc.Invoke(ctx, AccountService_ListAuthFactors_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *accountServiceClient) ListConnections(ctx context.Context, in *ListConnectionsRequest, opts ...grpc.CallOption) (*ListConnectionsResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ListConnectionsResponse)
err := c.cc.Invoke(ctx, AccountService_ListConnections_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *accountServiceClient) ListRelationships(ctx context.Context, in *ListRelationshipsRequest, opts ...grpc.CallOption) (*ListRelationshipsResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ListRelationshipsResponse)
err := c.cc.Invoke(ctx, AccountService_ListRelationships_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *accountServiceClient) GetRelationship(ctx context.Context, in *GetRelationshipRequest, opts ...grpc.CallOption) (*GetRelationshipResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetRelationshipResponse)
err := c.cc.Invoke(ctx, AccountService_GetRelationship_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *accountServiceClient) HasRelationship(ctx context.Context, in *GetRelationshipRequest, opts ...grpc.CallOption) (*wrapperspb.BoolValue, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(wrapperspb.BoolValue)
err := c.cc.Invoke(ctx, AccountService_HasRelationship_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *accountServiceClient) ListFriends(ctx context.Context, in *ListRelationshipSimpleRequest, opts ...grpc.CallOption) (*ListRelationshipSimpleResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ListRelationshipSimpleResponse)
err := c.cc.Invoke(ctx, AccountService_ListFriends_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *accountServiceClient) ListBlocked(ctx context.Context, in *ListRelationshipSimpleRequest, opts ...grpc.CallOption) (*ListRelationshipSimpleResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ListRelationshipSimpleResponse)
err := c.cc.Invoke(ctx, AccountService_ListBlocked_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.
//
// AccountService provides CRUD operations for user accounts and related entities
type AccountServiceServer interface {
// Account Operations
GetAccount(context.Context, *GetAccountRequest) (*Account, error)
GetBotAccount(context.Context, *GetBotAccountRequest) (*Account, error)
GetAccountBatch(context.Context, *GetAccountBatchRequest) (*GetAccountBatchResponse, error)
GetBotAccountBatch(context.Context, *GetBotAccountBatchRequest) (*GetAccountBatchResponse, error)
LookupAccountBatch(context.Context, *LookupAccountBatchRequest) (*GetAccountBatchResponse, error)
SearchAccount(context.Context, *SearchAccountRequest) (*GetAccountBatchResponse, error)
ListAccounts(context.Context, *ListAccountsRequest) (*ListAccountsResponse, error)
GetAccountStatus(context.Context, *GetAccountRequest) (*AccountStatus, error)
GetAccountStatusBatch(context.Context, *GetAccountBatchRequest) (*GetAccountStatusBatchResponse, error)
// Profile Operations
GetProfile(context.Context, *GetProfileRequest) (*AccountProfile, error)
// Contact Operations
ListContacts(context.Context, *ListContactsRequest) (*ListContactsResponse, error)
// Badge Operations
ListBadges(context.Context, *ListBadgesRequest) (*ListBadgesResponse, error)
// Authentication Factor Operations
ListAuthFactors(context.Context, *ListAuthFactorsRequest) (*ListAuthFactorsResponse, error)
// Connection Operations
ListConnections(context.Context, *ListConnectionsRequest) (*ListConnectionsResponse, error)
// Relationship Operations
ListRelationships(context.Context, *ListRelationshipsRequest) (*ListRelationshipsResponse, error)
GetRelationship(context.Context, *GetRelationshipRequest) (*GetRelationshipResponse, error)
HasRelationship(context.Context, *GetRelationshipRequest) (*wrapperspb.BoolValue, error)
ListFriends(context.Context, *ListRelationshipSimpleRequest) (*ListRelationshipSimpleResponse, error)
ListBlocked(context.Context, *ListRelationshipSimpleRequest) (*ListRelationshipSimpleResponse, 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) GetAccount(context.Context, *GetAccountRequest) (*Account, error) {
return nil, status.Error(codes.Unimplemented, "method GetAccount not implemented")
}
func (UnimplementedAccountServiceServer) GetBotAccount(context.Context, *GetBotAccountRequest) (*Account, error) {
return nil, status.Error(codes.Unimplemented, "method GetBotAccount not implemented")
}
func (UnimplementedAccountServiceServer) GetAccountBatch(context.Context, *GetAccountBatchRequest) (*GetAccountBatchResponse, error) {
return nil, status.Error(codes.Unimplemented, "method GetAccountBatch not implemented")
}
func (UnimplementedAccountServiceServer) GetBotAccountBatch(context.Context, *GetBotAccountBatchRequest) (*GetAccountBatchResponse, error) {
return nil, status.Error(codes.Unimplemented, "method GetBotAccountBatch not implemented")
}
func (UnimplementedAccountServiceServer) LookupAccountBatch(context.Context, *LookupAccountBatchRequest) (*GetAccountBatchResponse, error) {
return nil, status.Error(codes.Unimplemented, "method LookupAccountBatch not implemented")
}
func (UnimplementedAccountServiceServer) SearchAccount(context.Context, *SearchAccountRequest) (*GetAccountBatchResponse, error) {
return nil, status.Error(codes.Unimplemented, "method SearchAccount not implemented")
}
func (UnimplementedAccountServiceServer) ListAccounts(context.Context, *ListAccountsRequest) (*ListAccountsResponse, error) {
return nil, status.Error(codes.Unimplemented, "method ListAccounts not implemented")
}
func (UnimplementedAccountServiceServer) GetAccountStatus(context.Context, *GetAccountRequest) (*AccountStatus, error) {
return nil, status.Error(codes.Unimplemented, "method GetAccountStatus not implemented")
}
func (UnimplementedAccountServiceServer) GetAccountStatusBatch(context.Context, *GetAccountBatchRequest) (*GetAccountStatusBatchResponse, error) {
return nil, status.Error(codes.Unimplemented, "method GetAccountStatusBatch not implemented")
}
func (UnimplementedAccountServiceServer) GetProfile(context.Context, *GetProfileRequest) (*AccountProfile, error) {
return nil, status.Error(codes.Unimplemented, "method GetProfile not implemented")
}
func (UnimplementedAccountServiceServer) ListContacts(context.Context, *ListContactsRequest) (*ListContactsResponse, error) {
return nil, status.Error(codes.Unimplemented, "method ListContacts not implemented")
}
func (UnimplementedAccountServiceServer) ListBadges(context.Context, *ListBadgesRequest) (*ListBadgesResponse, error) {
return nil, status.Error(codes.Unimplemented, "method ListBadges not implemented")
}
func (UnimplementedAccountServiceServer) ListAuthFactors(context.Context, *ListAuthFactorsRequest) (*ListAuthFactorsResponse, error) {
return nil, status.Error(codes.Unimplemented, "method ListAuthFactors not implemented")
}
func (UnimplementedAccountServiceServer) ListConnections(context.Context, *ListConnectionsRequest) (*ListConnectionsResponse, error) {
return nil, status.Error(codes.Unimplemented, "method ListConnections not implemented")
}
func (UnimplementedAccountServiceServer) ListRelationships(context.Context, *ListRelationshipsRequest) (*ListRelationshipsResponse, error) {
return nil, status.Error(codes.Unimplemented, "method ListRelationships not implemented")
}
func (UnimplementedAccountServiceServer) GetRelationship(context.Context, *GetRelationshipRequest) (*GetRelationshipResponse, error) {
return nil, status.Error(codes.Unimplemented, "method GetRelationship not implemented")
}
func (UnimplementedAccountServiceServer) HasRelationship(context.Context, *GetRelationshipRequest) (*wrapperspb.BoolValue, error) {
return nil, status.Error(codes.Unimplemented, "method HasRelationship not implemented")
}
func (UnimplementedAccountServiceServer) ListFriends(context.Context, *ListRelationshipSimpleRequest) (*ListRelationshipSimpleResponse, error) {
return nil, status.Error(codes.Unimplemented, "method ListFriends not implemented")
}
func (UnimplementedAccountServiceServer) ListBlocked(context.Context, *ListRelationshipSimpleRequest) (*ListRelationshipSimpleResponse, error) {
return nil, status.Error(codes.Unimplemented, "method ListBlocked 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_GetAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetAccountRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AccountServiceServer).GetAccount(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: AccountService_GetAccount_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AccountServiceServer).GetAccount(ctx, req.(*GetAccountRequest))
}
return interceptor(ctx, in, info, handler)
}
func _AccountService_GetBotAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetBotAccountRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AccountServiceServer).GetBotAccount(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: AccountService_GetBotAccount_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AccountServiceServer).GetBotAccount(ctx, req.(*GetBotAccountRequest))
}
return interceptor(ctx, in, info, handler)
}
func _AccountService_GetAccountBatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetAccountBatchRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AccountServiceServer).GetAccountBatch(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: AccountService_GetAccountBatch_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AccountServiceServer).GetAccountBatch(ctx, req.(*GetAccountBatchRequest))
}
return interceptor(ctx, in, info, handler)
}
func _AccountService_GetBotAccountBatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetBotAccountBatchRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AccountServiceServer).GetBotAccountBatch(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: AccountService_GetBotAccountBatch_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AccountServiceServer).GetBotAccountBatch(ctx, req.(*GetBotAccountBatchRequest))
}
return interceptor(ctx, in, info, handler)
}
func _AccountService_LookupAccountBatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(LookupAccountBatchRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AccountServiceServer).LookupAccountBatch(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: AccountService_LookupAccountBatch_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AccountServiceServer).LookupAccountBatch(ctx, req.(*LookupAccountBatchRequest))
}
return interceptor(ctx, in, info, handler)
}
func _AccountService_SearchAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SearchAccountRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AccountServiceServer).SearchAccount(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: AccountService_SearchAccount_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AccountServiceServer).SearchAccount(ctx, req.(*SearchAccountRequest))
}
return interceptor(ctx, in, info, handler)
}
func _AccountService_ListAccounts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListAccountsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AccountServiceServer).ListAccounts(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: AccountService_ListAccounts_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AccountServiceServer).ListAccounts(ctx, req.(*ListAccountsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _AccountService_GetAccountStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetAccountRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AccountServiceServer).GetAccountStatus(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: AccountService_GetAccountStatus_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AccountServiceServer).GetAccountStatus(ctx, req.(*GetAccountRequest))
}
return interceptor(ctx, in, info, handler)
}
func _AccountService_GetAccountStatusBatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetAccountBatchRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AccountServiceServer).GetAccountStatusBatch(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: AccountService_GetAccountStatusBatch_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AccountServiceServer).GetAccountStatusBatch(ctx, req.(*GetAccountBatchRequest))
}
return interceptor(ctx, in, info, handler)
}
func _AccountService_GetProfile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetProfileRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AccountServiceServer).GetProfile(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: AccountService_GetProfile_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AccountServiceServer).GetProfile(ctx, req.(*GetProfileRequest))
}
return interceptor(ctx, in, info, handler)
}
func _AccountService_ListContacts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListContactsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AccountServiceServer).ListContacts(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: AccountService_ListContacts_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AccountServiceServer).ListContacts(ctx, req.(*ListContactsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _AccountService_ListBadges_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListBadgesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AccountServiceServer).ListBadges(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: AccountService_ListBadges_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AccountServiceServer).ListBadges(ctx, req.(*ListBadgesRequest))
}
return interceptor(ctx, in, info, handler)
}
func _AccountService_ListAuthFactors_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListAuthFactorsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AccountServiceServer).ListAuthFactors(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: AccountService_ListAuthFactors_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AccountServiceServer).ListAuthFactors(ctx, req.(*ListAuthFactorsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _AccountService_ListConnections_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListConnectionsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AccountServiceServer).ListConnections(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: AccountService_ListConnections_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AccountServiceServer).ListConnections(ctx, req.(*ListConnectionsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _AccountService_ListRelationships_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListRelationshipsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AccountServiceServer).ListRelationships(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: AccountService_ListRelationships_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AccountServiceServer).ListRelationships(ctx, req.(*ListRelationshipsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _AccountService_GetRelationship_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetRelationshipRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AccountServiceServer).GetRelationship(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: AccountService_GetRelationship_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AccountServiceServer).GetRelationship(ctx, req.(*GetRelationshipRequest))
}
return interceptor(ctx, in, info, handler)
}
func _AccountService_HasRelationship_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetRelationshipRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AccountServiceServer).HasRelationship(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: AccountService_HasRelationship_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AccountServiceServer).HasRelationship(ctx, req.(*GetRelationshipRequest))
}
return interceptor(ctx, in, info, handler)
}
func _AccountService_ListFriends_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListRelationshipSimpleRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AccountServiceServer).ListFriends(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: AccountService_ListFriends_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AccountServiceServer).ListFriends(ctx, req.(*ListRelationshipSimpleRequest))
}
return interceptor(ctx, in, info, handler)
}
func _AccountService_ListBlocked_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListRelationshipSimpleRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AccountServiceServer).ListBlocked(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: AccountService_ListBlocked_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AccountServiceServer).ListBlocked(ctx, req.(*ListRelationshipSimpleRequest))
}
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: "proto.AccountService",
HandlerType: (*AccountServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetAccount",
Handler: _AccountService_GetAccount_Handler,
},
{
MethodName: "GetBotAccount",
Handler: _AccountService_GetBotAccount_Handler,
},
{
MethodName: "GetAccountBatch",
Handler: _AccountService_GetAccountBatch_Handler,
},
{
MethodName: "GetBotAccountBatch",
Handler: _AccountService_GetBotAccountBatch_Handler,
},
{
MethodName: "LookupAccountBatch",
Handler: _AccountService_LookupAccountBatch_Handler,
},
{
MethodName: "SearchAccount",
Handler: _AccountService_SearchAccount_Handler,
},
{
MethodName: "ListAccounts",
Handler: _AccountService_ListAccounts_Handler,
},
{
MethodName: "GetAccountStatus",
Handler: _AccountService_GetAccountStatus_Handler,
},
{
MethodName: "GetAccountStatusBatch",
Handler: _AccountService_GetAccountStatusBatch_Handler,
},
{
MethodName: "GetProfile",
Handler: _AccountService_GetProfile_Handler,
},
{
MethodName: "ListContacts",
Handler: _AccountService_ListContacts_Handler,
},
{
MethodName: "ListBadges",
Handler: _AccountService_ListBadges_Handler,
},
{
MethodName: "ListAuthFactors",
Handler: _AccountService_ListAuthFactors_Handler,
},
{
MethodName: "ListConnections",
Handler: _AccountService_ListConnections_Handler,
},
{
MethodName: "ListRelationships",
Handler: _AccountService_ListRelationships_Handler,
},
{
MethodName: "GetRelationship",
Handler: _AccountService_GetRelationship_Handler,
},
{
MethodName: "HasRelationship",
Handler: _AccountService_HasRelationship_Handler,
},
{
MethodName: "ListFriends",
Handler: _AccountService_ListFriends_Handler,
},
{
MethodName: "ListBlocked",
Handler: _AccountService_ListBlocked_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "account.proto",
}
const (
ActionLogService_CreateActionLog_FullMethodName = "/proto.ActionLogService/CreateActionLog"
ActionLogService_ListActionLogs_FullMethodName = "/proto.ActionLogService/ListActionLogs"
)
// ActionLogServiceClient is the client API for ActionLogService 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.
//
// ActionLogService provides operations for action logs
type ActionLogServiceClient interface {
CreateActionLog(ctx context.Context, in *CreateActionLogRequest, opts ...grpc.CallOption) (*CreateActionLogResponse, error)
ListActionLogs(ctx context.Context, in *ListActionLogsRequest, opts ...grpc.CallOption) (*ListActionLogsResponse, error)
}
type actionLogServiceClient struct {
cc grpc.ClientConnInterface
}
func NewActionLogServiceClient(cc grpc.ClientConnInterface) ActionLogServiceClient {
return &actionLogServiceClient{cc}
}
func (c *actionLogServiceClient) CreateActionLog(ctx context.Context, in *CreateActionLogRequest, opts ...grpc.CallOption) (*CreateActionLogResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(CreateActionLogResponse)
err := c.cc.Invoke(ctx, ActionLogService_CreateActionLog_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *actionLogServiceClient) ListActionLogs(ctx context.Context, in *ListActionLogsRequest, opts ...grpc.CallOption) (*ListActionLogsResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ListActionLogsResponse)
err := c.cc.Invoke(ctx, ActionLogService_ListActionLogs_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// ActionLogServiceServer is the server API for ActionLogService service.
// All implementations must embed UnimplementedActionLogServiceServer
// for forward compatibility.
//
// ActionLogService provides operations for action logs
type ActionLogServiceServer interface {
CreateActionLog(context.Context, *CreateActionLogRequest) (*CreateActionLogResponse, error)
ListActionLogs(context.Context, *ListActionLogsRequest) (*ListActionLogsResponse, error)
mustEmbedUnimplementedActionLogServiceServer()
}
// UnimplementedActionLogServiceServer 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 UnimplementedActionLogServiceServer struct{}
func (UnimplementedActionLogServiceServer) CreateActionLog(context.Context, *CreateActionLogRequest) (*CreateActionLogResponse, error) {
return nil, status.Error(codes.Unimplemented, "method CreateActionLog not implemented")
}
func (UnimplementedActionLogServiceServer) ListActionLogs(context.Context, *ListActionLogsRequest) (*ListActionLogsResponse, error) {
return nil, status.Error(codes.Unimplemented, "method ListActionLogs not implemented")
}
func (UnimplementedActionLogServiceServer) mustEmbedUnimplementedActionLogServiceServer() {}
func (UnimplementedActionLogServiceServer) testEmbeddedByValue() {}
// UnsafeActionLogServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to ActionLogServiceServer will
// result in compilation errors.
type UnsafeActionLogServiceServer interface {
mustEmbedUnimplementedActionLogServiceServer()
}
func RegisterActionLogServiceServer(s grpc.ServiceRegistrar, srv ActionLogServiceServer) {
// If the following call panics, it indicates UnimplementedActionLogServiceServer 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(&ActionLogService_ServiceDesc, srv)
}
func _ActionLogService_CreateActionLog_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateActionLogRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ActionLogServiceServer).CreateActionLog(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ActionLogService_CreateActionLog_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ActionLogServiceServer).CreateActionLog(ctx, req.(*CreateActionLogRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ActionLogService_ListActionLogs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListActionLogsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ActionLogServiceServer).ListActionLogs(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ActionLogService_ListActionLogs_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ActionLogServiceServer).ListActionLogs(ctx, req.(*ListActionLogsRequest))
}
return interceptor(ctx, in, info, handler)
}
// ActionLogService_ServiceDesc is the grpc.ServiceDesc for ActionLogService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var ActionLogService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "proto.ActionLogService",
HandlerType: (*ActionLogServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "CreateActionLog",
Handler: _ActionLogService_CreateActionLog_Handler,
},
{
MethodName: "ListActionLogs",
Handler: _ActionLogService_ListActionLogs_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "account.proto",
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,489 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.6.0
// - protoc v6.33.1
// source: auth.proto
package gen
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_Authenticate_FullMethodName = "/proto.AuthService/Authenticate"
AuthService_ValidatePin_FullMethodName = "/proto.AuthService/ValidatePin"
AuthService_ValidateCaptcha_FullMethodName = "/proto.AuthService/ValidateCaptcha"
)
// 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 {
Authenticate(ctx context.Context, in *AuthenticateRequest, opts ...grpc.CallOption) (*AuthenticateResponse, error)
ValidatePin(ctx context.Context, in *ValidatePinRequest, opts ...grpc.CallOption) (*ValidateResponse, error)
ValidateCaptcha(ctx context.Context, in *ValidateCaptchaRequest, opts ...grpc.CallOption) (*ValidateResponse, error)
}
type authServiceClient struct {
cc grpc.ClientConnInterface
}
func NewAuthServiceClient(cc grpc.ClientConnInterface) AuthServiceClient {
return &authServiceClient{cc}
}
func (c *authServiceClient) Authenticate(ctx context.Context, in *AuthenticateRequest, opts ...grpc.CallOption) (*AuthenticateResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(AuthenticateResponse)
err := c.cc.Invoke(ctx, AuthService_Authenticate_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *authServiceClient) ValidatePin(ctx context.Context, in *ValidatePinRequest, opts ...grpc.CallOption) (*ValidateResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ValidateResponse)
err := c.cc.Invoke(ctx, AuthService_ValidatePin_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *authServiceClient) ValidateCaptcha(ctx context.Context, in *ValidateCaptchaRequest, opts ...grpc.CallOption) (*ValidateResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ValidateResponse)
err := c.cc.Invoke(ctx, AuthService_ValidateCaptcha_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 {
Authenticate(context.Context, *AuthenticateRequest) (*AuthenticateResponse, error)
ValidatePin(context.Context, *ValidatePinRequest) (*ValidateResponse, error)
ValidateCaptcha(context.Context, *ValidateCaptchaRequest) (*ValidateResponse, 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) Authenticate(context.Context, *AuthenticateRequest) (*AuthenticateResponse, error) {
return nil, status.Error(codes.Unimplemented, "method Authenticate not implemented")
}
func (UnimplementedAuthServiceServer) ValidatePin(context.Context, *ValidatePinRequest) (*ValidateResponse, error) {
return nil, status.Error(codes.Unimplemented, "method ValidatePin not implemented")
}
func (UnimplementedAuthServiceServer) ValidateCaptcha(context.Context, *ValidateCaptchaRequest) (*ValidateResponse, error) {
return nil, status.Error(codes.Unimplemented, "method ValidateCaptcha 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_Authenticate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(AuthenticateRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AuthServiceServer).Authenticate(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: AuthService_Authenticate_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AuthServiceServer).Authenticate(ctx, req.(*AuthenticateRequest))
}
return interceptor(ctx, in, info, handler)
}
func _AuthService_ValidatePin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ValidatePinRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AuthServiceServer).ValidatePin(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: AuthService_ValidatePin_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AuthServiceServer).ValidatePin(ctx, req.(*ValidatePinRequest))
}
return interceptor(ctx, in, info, handler)
}
func _AuthService_ValidateCaptcha_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ValidateCaptchaRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AuthServiceServer).ValidateCaptcha(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: AuthService_ValidateCaptcha_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AuthServiceServer).ValidateCaptcha(ctx, req.(*ValidateCaptchaRequest))
}
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: "proto.AuthService",
HandlerType: (*AuthServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Authenticate",
Handler: _AuthService_Authenticate_Handler,
},
{
MethodName: "ValidatePin",
Handler: _AuthService_ValidatePin_Handler,
},
{
MethodName: "ValidateCaptcha",
Handler: _AuthService_ValidateCaptcha_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "auth.proto",
}
const (
PermissionService_HasPermission_FullMethodName = "/proto.PermissionService/HasPermission"
PermissionService_GetPermission_FullMethodName = "/proto.PermissionService/GetPermission"
PermissionService_AddPermissionNode_FullMethodName = "/proto.PermissionService/AddPermissionNode"
PermissionService_AddPermissionNodeToGroup_FullMethodName = "/proto.PermissionService/AddPermissionNodeToGroup"
PermissionService_RemovePermissionNode_FullMethodName = "/proto.PermissionService/RemovePermissionNode"
PermissionService_RemovePermissionNodeFromGroup_FullMethodName = "/proto.PermissionService/RemovePermissionNodeFromGroup"
)
// PermissionServiceClient is the client API for PermissionService 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 PermissionServiceClient interface {
HasPermission(ctx context.Context, in *HasPermissionRequest, opts ...grpc.CallOption) (*HasPermissionResponse, error)
GetPermission(ctx context.Context, in *GetPermissionRequest, opts ...grpc.CallOption) (*GetPermissionResponse, error)
AddPermissionNode(ctx context.Context, in *AddPermissionNodeRequest, opts ...grpc.CallOption) (*AddPermissionNodeResponse, error)
AddPermissionNodeToGroup(ctx context.Context, in *AddPermissionNodeToGroupRequest, opts ...grpc.CallOption) (*AddPermissionNodeToGroupResponse, error)
RemovePermissionNode(ctx context.Context, in *RemovePermissionNodeRequest, opts ...grpc.CallOption) (*RemovePermissionNodeResponse, error)
RemovePermissionNodeFromGroup(ctx context.Context, in *RemovePermissionNodeFromGroupRequest, opts ...grpc.CallOption) (*RemovePermissionNodeFromGroupResponse, error)
}
type permissionServiceClient struct {
cc grpc.ClientConnInterface
}
func NewPermissionServiceClient(cc grpc.ClientConnInterface) PermissionServiceClient {
return &permissionServiceClient{cc}
}
func (c *permissionServiceClient) HasPermission(ctx context.Context, in *HasPermissionRequest, opts ...grpc.CallOption) (*HasPermissionResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(HasPermissionResponse)
err := c.cc.Invoke(ctx, PermissionService_HasPermission_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *permissionServiceClient) GetPermission(ctx context.Context, in *GetPermissionRequest, opts ...grpc.CallOption) (*GetPermissionResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetPermissionResponse)
err := c.cc.Invoke(ctx, PermissionService_GetPermission_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *permissionServiceClient) AddPermissionNode(ctx context.Context, in *AddPermissionNodeRequest, opts ...grpc.CallOption) (*AddPermissionNodeResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(AddPermissionNodeResponse)
err := c.cc.Invoke(ctx, PermissionService_AddPermissionNode_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *permissionServiceClient) AddPermissionNodeToGroup(ctx context.Context, in *AddPermissionNodeToGroupRequest, opts ...grpc.CallOption) (*AddPermissionNodeToGroupResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(AddPermissionNodeToGroupResponse)
err := c.cc.Invoke(ctx, PermissionService_AddPermissionNodeToGroup_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *permissionServiceClient) RemovePermissionNode(ctx context.Context, in *RemovePermissionNodeRequest, opts ...grpc.CallOption) (*RemovePermissionNodeResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(RemovePermissionNodeResponse)
err := c.cc.Invoke(ctx, PermissionService_RemovePermissionNode_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *permissionServiceClient) RemovePermissionNodeFromGroup(ctx context.Context, in *RemovePermissionNodeFromGroupRequest, opts ...grpc.CallOption) (*RemovePermissionNodeFromGroupResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(RemovePermissionNodeFromGroupResponse)
err := c.cc.Invoke(ctx, PermissionService_RemovePermissionNodeFromGroup_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// PermissionServiceServer is the server API for PermissionService service.
// All implementations must embed UnimplementedPermissionServiceServer
// for forward compatibility.
type PermissionServiceServer interface {
HasPermission(context.Context, *HasPermissionRequest) (*HasPermissionResponse, error)
GetPermission(context.Context, *GetPermissionRequest) (*GetPermissionResponse, error)
AddPermissionNode(context.Context, *AddPermissionNodeRequest) (*AddPermissionNodeResponse, error)
AddPermissionNodeToGroup(context.Context, *AddPermissionNodeToGroupRequest) (*AddPermissionNodeToGroupResponse, error)
RemovePermissionNode(context.Context, *RemovePermissionNodeRequest) (*RemovePermissionNodeResponse, error)
RemovePermissionNodeFromGroup(context.Context, *RemovePermissionNodeFromGroupRequest) (*RemovePermissionNodeFromGroupResponse, error)
mustEmbedUnimplementedPermissionServiceServer()
}
// UnimplementedPermissionServiceServer 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 UnimplementedPermissionServiceServer struct{}
func (UnimplementedPermissionServiceServer) HasPermission(context.Context, *HasPermissionRequest) (*HasPermissionResponse, error) {
return nil, status.Error(codes.Unimplemented, "method HasPermission not implemented")
}
func (UnimplementedPermissionServiceServer) GetPermission(context.Context, *GetPermissionRequest) (*GetPermissionResponse, error) {
return nil, status.Error(codes.Unimplemented, "method GetPermission not implemented")
}
func (UnimplementedPermissionServiceServer) AddPermissionNode(context.Context, *AddPermissionNodeRequest) (*AddPermissionNodeResponse, error) {
return nil, status.Error(codes.Unimplemented, "method AddPermissionNode not implemented")
}
func (UnimplementedPermissionServiceServer) AddPermissionNodeToGroup(context.Context, *AddPermissionNodeToGroupRequest) (*AddPermissionNodeToGroupResponse, error) {
return nil, status.Error(codes.Unimplemented, "method AddPermissionNodeToGroup not implemented")
}
func (UnimplementedPermissionServiceServer) RemovePermissionNode(context.Context, *RemovePermissionNodeRequest) (*RemovePermissionNodeResponse, error) {
return nil, status.Error(codes.Unimplemented, "method RemovePermissionNode not implemented")
}
func (UnimplementedPermissionServiceServer) RemovePermissionNodeFromGroup(context.Context, *RemovePermissionNodeFromGroupRequest) (*RemovePermissionNodeFromGroupResponse, error) {
return nil, status.Error(codes.Unimplemented, "method RemovePermissionNodeFromGroup not implemented")
}
func (UnimplementedPermissionServiceServer) mustEmbedUnimplementedPermissionServiceServer() {}
func (UnimplementedPermissionServiceServer) testEmbeddedByValue() {}
// UnsafePermissionServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to PermissionServiceServer will
// result in compilation errors.
type UnsafePermissionServiceServer interface {
mustEmbedUnimplementedPermissionServiceServer()
}
func RegisterPermissionServiceServer(s grpc.ServiceRegistrar, srv PermissionServiceServer) {
// If the following call panics, it indicates UnimplementedPermissionServiceServer 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(&PermissionService_ServiceDesc, srv)
}
func _PermissionService_HasPermission_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(HasPermissionRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PermissionServiceServer).HasPermission(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PermissionService_HasPermission_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PermissionServiceServer).HasPermission(ctx, req.(*HasPermissionRequest))
}
return interceptor(ctx, in, info, handler)
}
func _PermissionService_GetPermission_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetPermissionRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PermissionServiceServer).GetPermission(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PermissionService_GetPermission_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PermissionServiceServer).GetPermission(ctx, req.(*GetPermissionRequest))
}
return interceptor(ctx, in, info, handler)
}
func _PermissionService_AddPermissionNode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(AddPermissionNodeRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PermissionServiceServer).AddPermissionNode(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PermissionService_AddPermissionNode_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PermissionServiceServer).AddPermissionNode(ctx, req.(*AddPermissionNodeRequest))
}
return interceptor(ctx, in, info, handler)
}
func _PermissionService_AddPermissionNodeToGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(AddPermissionNodeToGroupRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PermissionServiceServer).AddPermissionNodeToGroup(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PermissionService_AddPermissionNodeToGroup_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PermissionServiceServer).AddPermissionNodeToGroup(ctx, req.(*AddPermissionNodeToGroupRequest))
}
return interceptor(ctx, in, info, handler)
}
func _PermissionService_RemovePermissionNode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(RemovePermissionNodeRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PermissionServiceServer).RemovePermissionNode(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PermissionService_RemovePermissionNode_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PermissionServiceServer).RemovePermissionNode(ctx, req.(*RemovePermissionNodeRequest))
}
return interceptor(ctx, in, info, handler)
}
func _PermissionService_RemovePermissionNodeFromGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(RemovePermissionNodeFromGroupRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PermissionServiceServer).RemovePermissionNodeFromGroup(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PermissionService_RemovePermissionNodeFromGroup_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PermissionServiceServer).RemovePermissionNodeFromGroup(ctx, req.(*RemovePermissionNodeFromGroupRequest))
}
return interceptor(ctx, in, info, handler)
}
// PermissionService_ServiceDesc is the grpc.ServiceDesc for PermissionService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var PermissionService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "proto.PermissionService",
HandlerType: (*PermissionServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "HasPermission",
Handler: _PermissionService_HasPermission_Handler,
},
{
MethodName: "GetPermission",
Handler: _PermissionService_GetPermission_Handler,
},
{
MethodName: "AddPermissionNode",
Handler: _PermissionService_AddPermissionNode_Handler,
},
{
MethodName: "AddPermissionNodeToGroup",
Handler: _PermissionService_AddPermissionNodeToGroup_Handler,
},
{
MethodName: "RemovePermissionNode",
Handler: _PermissionService_RemovePermissionNode_Handler,
},
{
MethodName: "RemovePermissionNodeFromGroup",
Handler: _PermissionService_RemovePermissionNodeFromGroup_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "auth.proto",
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,570 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.6.0
// - protoc v6.33.1
// source: develop.proto
package gen
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 (
CustomAppService_GetCustomApp_FullMethodName = "/proto.CustomAppService/GetCustomApp"
CustomAppService_CheckCustomAppSecret_FullMethodName = "/proto.CustomAppService/CheckCustomAppSecret"
)
// CustomAppServiceClient is the client API for CustomAppService 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 CustomAppServiceClient interface {
GetCustomApp(ctx context.Context, in *GetCustomAppRequest, opts ...grpc.CallOption) (*GetCustomAppResponse, error)
CheckCustomAppSecret(ctx context.Context, in *CheckCustomAppSecretRequest, opts ...grpc.CallOption) (*CheckCustomAppSecretResponse, error)
}
type customAppServiceClient struct {
cc grpc.ClientConnInterface
}
func NewCustomAppServiceClient(cc grpc.ClientConnInterface) CustomAppServiceClient {
return &customAppServiceClient{cc}
}
func (c *customAppServiceClient) GetCustomApp(ctx context.Context, in *GetCustomAppRequest, opts ...grpc.CallOption) (*GetCustomAppResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetCustomAppResponse)
err := c.cc.Invoke(ctx, CustomAppService_GetCustomApp_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *customAppServiceClient) CheckCustomAppSecret(ctx context.Context, in *CheckCustomAppSecretRequest, opts ...grpc.CallOption) (*CheckCustomAppSecretResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(CheckCustomAppSecretResponse)
err := c.cc.Invoke(ctx, CustomAppService_CheckCustomAppSecret_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// CustomAppServiceServer is the server API for CustomAppService service.
// All implementations must embed UnimplementedCustomAppServiceServer
// for forward compatibility.
type CustomAppServiceServer interface {
GetCustomApp(context.Context, *GetCustomAppRequest) (*GetCustomAppResponse, error)
CheckCustomAppSecret(context.Context, *CheckCustomAppSecretRequest) (*CheckCustomAppSecretResponse, error)
mustEmbedUnimplementedCustomAppServiceServer()
}
// UnimplementedCustomAppServiceServer 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 UnimplementedCustomAppServiceServer struct{}
func (UnimplementedCustomAppServiceServer) GetCustomApp(context.Context, *GetCustomAppRequest) (*GetCustomAppResponse, error) {
return nil, status.Error(codes.Unimplemented, "method GetCustomApp not implemented")
}
func (UnimplementedCustomAppServiceServer) CheckCustomAppSecret(context.Context, *CheckCustomAppSecretRequest) (*CheckCustomAppSecretResponse, error) {
return nil, status.Error(codes.Unimplemented, "method CheckCustomAppSecret not implemented")
}
func (UnimplementedCustomAppServiceServer) mustEmbedUnimplementedCustomAppServiceServer() {}
func (UnimplementedCustomAppServiceServer) testEmbeddedByValue() {}
// UnsafeCustomAppServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to CustomAppServiceServer will
// result in compilation errors.
type UnsafeCustomAppServiceServer interface {
mustEmbedUnimplementedCustomAppServiceServer()
}
func RegisterCustomAppServiceServer(s grpc.ServiceRegistrar, srv CustomAppServiceServer) {
// If the following call panics, it indicates UnimplementedCustomAppServiceServer 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(&CustomAppService_ServiceDesc, srv)
}
func _CustomAppService_GetCustomApp_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetCustomAppRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(CustomAppServiceServer).GetCustomApp(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: CustomAppService_GetCustomApp_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CustomAppServiceServer).GetCustomApp(ctx, req.(*GetCustomAppRequest))
}
return interceptor(ctx, in, info, handler)
}
func _CustomAppService_CheckCustomAppSecret_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CheckCustomAppSecretRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(CustomAppServiceServer).CheckCustomAppSecret(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: CustomAppService_CheckCustomAppSecret_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CustomAppServiceServer).CheckCustomAppSecret(ctx, req.(*CheckCustomAppSecretRequest))
}
return interceptor(ctx, in, info, handler)
}
// CustomAppService_ServiceDesc is the grpc.ServiceDesc for CustomAppService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var CustomAppService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "proto.CustomAppService",
HandlerType: (*CustomAppServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetCustomApp",
Handler: _CustomAppService_GetCustomApp_Handler,
},
{
MethodName: "CheckCustomAppSecret",
Handler: _CustomAppService_CheckCustomAppSecret_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "develop.proto",
}
const (
BotAccountReceiverService_CreateBotAccount_FullMethodName = "/proto.BotAccountReceiverService/CreateBotAccount"
BotAccountReceiverService_UpdateBotAccount_FullMethodName = "/proto.BotAccountReceiverService/UpdateBotAccount"
BotAccountReceiverService_DeleteBotAccount_FullMethodName = "/proto.BotAccountReceiverService/DeleteBotAccount"
BotAccountReceiverService_GetApiKey_FullMethodName = "/proto.BotAccountReceiverService/GetApiKey"
BotAccountReceiverService_ListApiKey_FullMethodName = "/proto.BotAccountReceiverService/ListApiKey"
BotAccountReceiverService_CreateApiKey_FullMethodName = "/proto.BotAccountReceiverService/CreateApiKey"
BotAccountReceiverService_UpdateApiKey_FullMethodName = "/proto.BotAccountReceiverService/UpdateApiKey"
BotAccountReceiverService_RotateApiKey_FullMethodName = "/proto.BotAccountReceiverService/RotateApiKey"
BotAccountReceiverService_DeleteApiKey_FullMethodName = "/proto.BotAccountReceiverService/DeleteApiKey"
)
// BotAccountReceiverServiceClient is the client API for BotAccountReceiverService 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.
//
// This service should be implemented by the Pass service to handle the creation, update, and deletion of bot accounts
type BotAccountReceiverServiceClient interface {
CreateBotAccount(ctx context.Context, in *CreateBotAccountRequest, opts ...grpc.CallOption) (*CreateBotAccountResponse, error)
UpdateBotAccount(ctx context.Context, in *UpdateBotAccountRequest, opts ...grpc.CallOption) (*UpdateBotAccountResponse, error)
DeleteBotAccount(ctx context.Context, in *DeleteBotAccountRequest, opts ...grpc.CallOption) (*DeleteBotAccountResponse, error)
GetApiKey(ctx context.Context, in *GetApiKeyRequest, opts ...grpc.CallOption) (*ApiKey, error)
ListApiKey(ctx context.Context, in *ListApiKeyRequest, opts ...grpc.CallOption) (*GetApiKeyBatchResponse, error)
CreateApiKey(ctx context.Context, in *ApiKey, opts ...grpc.CallOption) (*ApiKey, error)
UpdateApiKey(ctx context.Context, in *ApiKey, opts ...grpc.CallOption) (*ApiKey, error)
RotateApiKey(ctx context.Context, in *GetApiKeyRequest, opts ...grpc.CallOption) (*ApiKey, error)
DeleteApiKey(ctx context.Context, in *GetApiKeyRequest, opts ...grpc.CallOption) (*DeleteApiKeyResponse, error)
}
type botAccountReceiverServiceClient struct {
cc grpc.ClientConnInterface
}
func NewBotAccountReceiverServiceClient(cc grpc.ClientConnInterface) BotAccountReceiverServiceClient {
return &botAccountReceiverServiceClient{cc}
}
func (c *botAccountReceiverServiceClient) CreateBotAccount(ctx context.Context, in *CreateBotAccountRequest, opts ...grpc.CallOption) (*CreateBotAccountResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(CreateBotAccountResponse)
err := c.cc.Invoke(ctx, BotAccountReceiverService_CreateBotAccount_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *botAccountReceiverServiceClient) UpdateBotAccount(ctx context.Context, in *UpdateBotAccountRequest, opts ...grpc.CallOption) (*UpdateBotAccountResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(UpdateBotAccountResponse)
err := c.cc.Invoke(ctx, BotAccountReceiverService_UpdateBotAccount_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *botAccountReceiverServiceClient) DeleteBotAccount(ctx context.Context, in *DeleteBotAccountRequest, opts ...grpc.CallOption) (*DeleteBotAccountResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(DeleteBotAccountResponse)
err := c.cc.Invoke(ctx, BotAccountReceiverService_DeleteBotAccount_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *botAccountReceiverServiceClient) GetApiKey(ctx context.Context, in *GetApiKeyRequest, opts ...grpc.CallOption) (*ApiKey, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ApiKey)
err := c.cc.Invoke(ctx, BotAccountReceiverService_GetApiKey_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *botAccountReceiverServiceClient) ListApiKey(ctx context.Context, in *ListApiKeyRequest, opts ...grpc.CallOption) (*GetApiKeyBatchResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetApiKeyBatchResponse)
err := c.cc.Invoke(ctx, BotAccountReceiverService_ListApiKey_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *botAccountReceiverServiceClient) CreateApiKey(ctx context.Context, in *ApiKey, opts ...grpc.CallOption) (*ApiKey, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ApiKey)
err := c.cc.Invoke(ctx, BotAccountReceiverService_CreateApiKey_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *botAccountReceiverServiceClient) UpdateApiKey(ctx context.Context, in *ApiKey, opts ...grpc.CallOption) (*ApiKey, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ApiKey)
err := c.cc.Invoke(ctx, BotAccountReceiverService_UpdateApiKey_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *botAccountReceiverServiceClient) RotateApiKey(ctx context.Context, in *GetApiKeyRequest, opts ...grpc.CallOption) (*ApiKey, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ApiKey)
err := c.cc.Invoke(ctx, BotAccountReceiverService_RotateApiKey_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *botAccountReceiverServiceClient) DeleteApiKey(ctx context.Context, in *GetApiKeyRequest, opts ...grpc.CallOption) (*DeleteApiKeyResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(DeleteApiKeyResponse)
err := c.cc.Invoke(ctx, BotAccountReceiverService_DeleteApiKey_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// BotAccountReceiverServiceServer is the server API for BotAccountReceiverService service.
// All implementations must embed UnimplementedBotAccountReceiverServiceServer
// for forward compatibility.
//
// This service should be implemented by the Pass service to handle the creation, update, and deletion of bot accounts
type BotAccountReceiverServiceServer interface {
CreateBotAccount(context.Context, *CreateBotAccountRequest) (*CreateBotAccountResponse, error)
UpdateBotAccount(context.Context, *UpdateBotAccountRequest) (*UpdateBotAccountResponse, error)
DeleteBotAccount(context.Context, *DeleteBotAccountRequest) (*DeleteBotAccountResponse, error)
GetApiKey(context.Context, *GetApiKeyRequest) (*ApiKey, error)
ListApiKey(context.Context, *ListApiKeyRequest) (*GetApiKeyBatchResponse, error)
CreateApiKey(context.Context, *ApiKey) (*ApiKey, error)
UpdateApiKey(context.Context, *ApiKey) (*ApiKey, error)
RotateApiKey(context.Context, *GetApiKeyRequest) (*ApiKey, error)
DeleteApiKey(context.Context, *GetApiKeyRequest) (*DeleteApiKeyResponse, error)
mustEmbedUnimplementedBotAccountReceiverServiceServer()
}
// UnimplementedBotAccountReceiverServiceServer 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 UnimplementedBotAccountReceiverServiceServer struct{}
func (UnimplementedBotAccountReceiverServiceServer) CreateBotAccount(context.Context, *CreateBotAccountRequest) (*CreateBotAccountResponse, error) {
return nil, status.Error(codes.Unimplemented, "method CreateBotAccount not implemented")
}
func (UnimplementedBotAccountReceiverServiceServer) UpdateBotAccount(context.Context, *UpdateBotAccountRequest) (*UpdateBotAccountResponse, error) {
return nil, status.Error(codes.Unimplemented, "method UpdateBotAccount not implemented")
}
func (UnimplementedBotAccountReceiverServiceServer) DeleteBotAccount(context.Context, *DeleteBotAccountRequest) (*DeleteBotAccountResponse, error) {
return nil, status.Error(codes.Unimplemented, "method DeleteBotAccount not implemented")
}
func (UnimplementedBotAccountReceiverServiceServer) GetApiKey(context.Context, *GetApiKeyRequest) (*ApiKey, error) {
return nil, status.Error(codes.Unimplemented, "method GetApiKey not implemented")
}
func (UnimplementedBotAccountReceiverServiceServer) ListApiKey(context.Context, *ListApiKeyRequest) (*GetApiKeyBatchResponse, error) {
return nil, status.Error(codes.Unimplemented, "method ListApiKey not implemented")
}
func (UnimplementedBotAccountReceiverServiceServer) CreateApiKey(context.Context, *ApiKey) (*ApiKey, error) {
return nil, status.Error(codes.Unimplemented, "method CreateApiKey not implemented")
}
func (UnimplementedBotAccountReceiverServiceServer) UpdateApiKey(context.Context, *ApiKey) (*ApiKey, error) {
return nil, status.Error(codes.Unimplemented, "method UpdateApiKey not implemented")
}
func (UnimplementedBotAccountReceiverServiceServer) RotateApiKey(context.Context, *GetApiKeyRequest) (*ApiKey, error) {
return nil, status.Error(codes.Unimplemented, "method RotateApiKey not implemented")
}
func (UnimplementedBotAccountReceiverServiceServer) DeleteApiKey(context.Context, *GetApiKeyRequest) (*DeleteApiKeyResponse, error) {
return nil, status.Error(codes.Unimplemented, "method DeleteApiKey not implemented")
}
func (UnimplementedBotAccountReceiverServiceServer) mustEmbedUnimplementedBotAccountReceiverServiceServer() {
}
func (UnimplementedBotAccountReceiverServiceServer) testEmbeddedByValue() {}
// UnsafeBotAccountReceiverServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to BotAccountReceiverServiceServer will
// result in compilation errors.
type UnsafeBotAccountReceiverServiceServer interface {
mustEmbedUnimplementedBotAccountReceiverServiceServer()
}
func RegisterBotAccountReceiverServiceServer(s grpc.ServiceRegistrar, srv BotAccountReceiverServiceServer) {
// If the following call panics, it indicates UnimplementedBotAccountReceiverServiceServer 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(&BotAccountReceiverService_ServiceDesc, srv)
}
func _BotAccountReceiverService_CreateBotAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateBotAccountRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(BotAccountReceiverServiceServer).CreateBotAccount(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: BotAccountReceiverService_CreateBotAccount_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BotAccountReceiverServiceServer).CreateBotAccount(ctx, req.(*CreateBotAccountRequest))
}
return interceptor(ctx, in, info, handler)
}
func _BotAccountReceiverService_UpdateBotAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateBotAccountRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(BotAccountReceiverServiceServer).UpdateBotAccount(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: BotAccountReceiverService_UpdateBotAccount_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BotAccountReceiverServiceServer).UpdateBotAccount(ctx, req.(*UpdateBotAccountRequest))
}
return interceptor(ctx, in, info, handler)
}
func _BotAccountReceiverService_DeleteBotAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteBotAccountRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(BotAccountReceiverServiceServer).DeleteBotAccount(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: BotAccountReceiverService_DeleteBotAccount_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BotAccountReceiverServiceServer).DeleteBotAccount(ctx, req.(*DeleteBotAccountRequest))
}
return interceptor(ctx, in, info, handler)
}
func _BotAccountReceiverService_GetApiKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetApiKeyRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(BotAccountReceiverServiceServer).GetApiKey(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: BotAccountReceiverService_GetApiKey_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BotAccountReceiverServiceServer).GetApiKey(ctx, req.(*GetApiKeyRequest))
}
return interceptor(ctx, in, info, handler)
}
func _BotAccountReceiverService_ListApiKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListApiKeyRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(BotAccountReceiverServiceServer).ListApiKey(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: BotAccountReceiverService_ListApiKey_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BotAccountReceiverServiceServer).ListApiKey(ctx, req.(*ListApiKeyRequest))
}
return interceptor(ctx, in, info, handler)
}
func _BotAccountReceiverService_CreateApiKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ApiKey)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(BotAccountReceiverServiceServer).CreateApiKey(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: BotAccountReceiverService_CreateApiKey_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BotAccountReceiverServiceServer).CreateApiKey(ctx, req.(*ApiKey))
}
return interceptor(ctx, in, info, handler)
}
func _BotAccountReceiverService_UpdateApiKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ApiKey)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(BotAccountReceiverServiceServer).UpdateApiKey(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: BotAccountReceiverService_UpdateApiKey_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BotAccountReceiverServiceServer).UpdateApiKey(ctx, req.(*ApiKey))
}
return interceptor(ctx, in, info, handler)
}
func _BotAccountReceiverService_RotateApiKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetApiKeyRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(BotAccountReceiverServiceServer).RotateApiKey(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: BotAccountReceiverService_RotateApiKey_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BotAccountReceiverServiceServer).RotateApiKey(ctx, req.(*GetApiKeyRequest))
}
return interceptor(ctx, in, info, handler)
}
func _BotAccountReceiverService_DeleteApiKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetApiKeyRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(BotAccountReceiverServiceServer).DeleteApiKey(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: BotAccountReceiverService_DeleteApiKey_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BotAccountReceiverServiceServer).DeleteApiKey(ctx, req.(*GetApiKeyRequest))
}
return interceptor(ctx, in, info, handler)
}
// BotAccountReceiverService_ServiceDesc is the grpc.ServiceDesc for BotAccountReceiverService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var BotAccountReceiverService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "proto.BotAccountReceiverService",
HandlerType: (*BotAccountReceiverServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "CreateBotAccount",
Handler: _BotAccountReceiverService_CreateBotAccount_Handler,
},
{
MethodName: "UpdateBotAccount",
Handler: _BotAccountReceiverService_UpdateBotAccount_Handler,
},
{
MethodName: "DeleteBotAccount",
Handler: _BotAccountReceiverService_DeleteBotAccount_Handler,
},
{
MethodName: "GetApiKey",
Handler: _BotAccountReceiverService_GetApiKey_Handler,
},
{
MethodName: "ListApiKey",
Handler: _BotAccountReceiverService_ListApiKey_Handler,
},
{
MethodName: "CreateApiKey",
Handler: _BotAccountReceiverService_CreateApiKey_Handler,
},
{
MethodName: "UpdateApiKey",
Handler: _BotAccountReceiverService_UpdateApiKey_Handler,
},
{
MethodName: "RotateApiKey",
Handler: _BotAccountReceiverService_RotateApiKey_Handler,
},
{
MethodName: "DeleteApiKey",
Handler: _BotAccountReceiverService_DeleteApiKey_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "develop.proto",
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,952 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.6.0
// - protoc v6.33.1
// source: file.proto
package gen
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
emptypb "google.golang.org/protobuf/types/known/emptypb"
)
// 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 (
FileService_GetFile_FullMethodName = "/proto.FileService/GetFile"
FileService_GetFileBatch_FullMethodName = "/proto.FileService/GetFileBatch"
FileService_UpdateFile_FullMethodName = "/proto.FileService/UpdateFile"
FileService_DeleteFile_FullMethodName = "/proto.FileService/DeleteFile"
FileService_LoadFromReference_FullMethodName = "/proto.FileService/LoadFromReference"
FileService_IsReferenced_FullMethodName = "/proto.FileService/IsReferenced"
FileService_PurgeCache_FullMethodName = "/proto.FileService/PurgeCache"
)
// FileServiceClient is the client API for FileService 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.
//
// Service for file operations
type FileServiceClient interface {
// Get file reference by ID
GetFile(ctx context.Context, in *GetFileRequest, opts ...grpc.CallOption) (*CloudFile, error)
GetFileBatch(ctx context.Context, in *GetFileBatchRequest, opts ...grpc.CallOption) (*GetFileBatchResponse, error)
// Update an existing file reference
UpdateFile(ctx context.Context, in *UpdateFileRequest, opts ...grpc.CallOption) (*CloudFile, error)
// Delete a file reference
DeleteFile(ctx context.Context, in *DeleteFileRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
// Load files from references
LoadFromReference(ctx context.Context, in *LoadFromReferenceRequest, opts ...grpc.CallOption) (*LoadFromReferenceResponse, error)
// Check if a file is referenced by any resource
IsReferenced(ctx context.Context, in *IsReferencedRequest, opts ...grpc.CallOption) (*IsReferencedResponse, error)
// Purge cache for a file
PurgeCache(ctx context.Context, in *PurgeCacheRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
}
type fileServiceClient struct {
cc grpc.ClientConnInterface
}
func NewFileServiceClient(cc grpc.ClientConnInterface) FileServiceClient {
return &fileServiceClient{cc}
}
func (c *fileServiceClient) GetFile(ctx context.Context, in *GetFileRequest, opts ...grpc.CallOption) (*CloudFile, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(CloudFile)
err := c.cc.Invoke(ctx, FileService_GetFile_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *fileServiceClient) GetFileBatch(ctx context.Context, in *GetFileBatchRequest, opts ...grpc.CallOption) (*GetFileBatchResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetFileBatchResponse)
err := c.cc.Invoke(ctx, FileService_GetFileBatch_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *fileServiceClient) UpdateFile(ctx context.Context, in *UpdateFileRequest, opts ...grpc.CallOption) (*CloudFile, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(CloudFile)
err := c.cc.Invoke(ctx, FileService_UpdateFile_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *fileServiceClient) DeleteFile(ctx context.Context, in *DeleteFileRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, FileService_DeleteFile_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *fileServiceClient) LoadFromReference(ctx context.Context, in *LoadFromReferenceRequest, opts ...grpc.CallOption) (*LoadFromReferenceResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(LoadFromReferenceResponse)
err := c.cc.Invoke(ctx, FileService_LoadFromReference_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *fileServiceClient) IsReferenced(ctx context.Context, in *IsReferencedRequest, opts ...grpc.CallOption) (*IsReferencedResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(IsReferencedResponse)
err := c.cc.Invoke(ctx, FileService_IsReferenced_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *fileServiceClient) PurgeCache(ctx context.Context, in *PurgeCacheRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, FileService_PurgeCache_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// FileServiceServer is the server API for FileService service.
// All implementations must embed UnimplementedFileServiceServer
// for forward compatibility.
//
// Service for file operations
type FileServiceServer interface {
// Get file reference by ID
GetFile(context.Context, *GetFileRequest) (*CloudFile, error)
GetFileBatch(context.Context, *GetFileBatchRequest) (*GetFileBatchResponse, error)
// Update an existing file reference
UpdateFile(context.Context, *UpdateFileRequest) (*CloudFile, error)
// Delete a file reference
DeleteFile(context.Context, *DeleteFileRequest) (*emptypb.Empty, error)
// Load files from references
LoadFromReference(context.Context, *LoadFromReferenceRequest) (*LoadFromReferenceResponse, error)
// Check if a file is referenced by any resource
IsReferenced(context.Context, *IsReferencedRequest) (*IsReferencedResponse, error)
// Purge cache for a file
PurgeCache(context.Context, *PurgeCacheRequest) (*emptypb.Empty, error)
mustEmbedUnimplementedFileServiceServer()
}
// UnimplementedFileServiceServer 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 UnimplementedFileServiceServer struct{}
func (UnimplementedFileServiceServer) GetFile(context.Context, *GetFileRequest) (*CloudFile, error) {
return nil, status.Error(codes.Unimplemented, "method GetFile not implemented")
}
func (UnimplementedFileServiceServer) GetFileBatch(context.Context, *GetFileBatchRequest) (*GetFileBatchResponse, error) {
return nil, status.Error(codes.Unimplemented, "method GetFileBatch not implemented")
}
func (UnimplementedFileServiceServer) UpdateFile(context.Context, *UpdateFileRequest) (*CloudFile, error) {
return nil, status.Error(codes.Unimplemented, "method UpdateFile not implemented")
}
func (UnimplementedFileServiceServer) DeleteFile(context.Context, *DeleteFileRequest) (*emptypb.Empty, error) {
return nil, status.Error(codes.Unimplemented, "method DeleteFile not implemented")
}
func (UnimplementedFileServiceServer) LoadFromReference(context.Context, *LoadFromReferenceRequest) (*LoadFromReferenceResponse, error) {
return nil, status.Error(codes.Unimplemented, "method LoadFromReference not implemented")
}
func (UnimplementedFileServiceServer) IsReferenced(context.Context, *IsReferencedRequest) (*IsReferencedResponse, error) {
return nil, status.Error(codes.Unimplemented, "method IsReferenced not implemented")
}
func (UnimplementedFileServiceServer) PurgeCache(context.Context, *PurgeCacheRequest) (*emptypb.Empty, error) {
return nil, status.Error(codes.Unimplemented, "method PurgeCache not implemented")
}
func (UnimplementedFileServiceServer) mustEmbedUnimplementedFileServiceServer() {}
func (UnimplementedFileServiceServer) testEmbeddedByValue() {}
// UnsafeFileServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to FileServiceServer will
// result in compilation errors.
type UnsafeFileServiceServer interface {
mustEmbedUnimplementedFileServiceServer()
}
func RegisterFileServiceServer(s grpc.ServiceRegistrar, srv FileServiceServer) {
// If the following call panics, it indicates UnimplementedFileServiceServer 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(&FileService_ServiceDesc, srv)
}
func _FileService_GetFile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetFileRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FileServiceServer).GetFile(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: FileService_GetFile_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FileServiceServer).GetFile(ctx, req.(*GetFileRequest))
}
return interceptor(ctx, in, info, handler)
}
func _FileService_GetFileBatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetFileBatchRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FileServiceServer).GetFileBatch(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: FileService_GetFileBatch_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FileServiceServer).GetFileBatch(ctx, req.(*GetFileBatchRequest))
}
return interceptor(ctx, in, info, handler)
}
func _FileService_UpdateFile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateFileRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FileServiceServer).UpdateFile(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: FileService_UpdateFile_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FileServiceServer).UpdateFile(ctx, req.(*UpdateFileRequest))
}
return interceptor(ctx, in, info, handler)
}
func _FileService_DeleteFile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteFileRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FileServiceServer).DeleteFile(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: FileService_DeleteFile_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FileServiceServer).DeleteFile(ctx, req.(*DeleteFileRequest))
}
return interceptor(ctx, in, info, handler)
}
func _FileService_LoadFromReference_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(LoadFromReferenceRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FileServiceServer).LoadFromReference(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: FileService_LoadFromReference_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FileServiceServer).LoadFromReference(ctx, req.(*LoadFromReferenceRequest))
}
return interceptor(ctx, in, info, handler)
}
func _FileService_IsReferenced_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(IsReferencedRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FileServiceServer).IsReferenced(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: FileService_IsReferenced_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FileServiceServer).IsReferenced(ctx, req.(*IsReferencedRequest))
}
return interceptor(ctx, in, info, handler)
}
func _FileService_PurgeCache_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(PurgeCacheRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FileServiceServer).PurgeCache(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: FileService_PurgeCache_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FileServiceServer).PurgeCache(ctx, req.(*PurgeCacheRequest))
}
return interceptor(ctx, in, info, handler)
}
// FileService_ServiceDesc is the grpc.ServiceDesc for FileService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var FileService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "proto.FileService",
HandlerType: (*FileServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetFile",
Handler: _FileService_GetFile_Handler,
},
{
MethodName: "GetFileBatch",
Handler: _FileService_GetFileBatch_Handler,
},
{
MethodName: "UpdateFile",
Handler: _FileService_UpdateFile_Handler,
},
{
MethodName: "DeleteFile",
Handler: _FileService_DeleteFile_Handler,
},
{
MethodName: "LoadFromReference",
Handler: _FileService_LoadFromReference_Handler,
},
{
MethodName: "IsReferenced",
Handler: _FileService_IsReferenced_Handler,
},
{
MethodName: "PurgeCache",
Handler: _FileService_PurgeCache_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "file.proto",
}
const (
FileReferenceService_CreateReference_FullMethodName = "/proto.FileReferenceService/CreateReference"
FileReferenceService_CreateReferenceBatch_FullMethodName = "/proto.FileReferenceService/CreateReferenceBatch"
FileReferenceService_GetReferences_FullMethodName = "/proto.FileReferenceService/GetReferences"
FileReferenceService_GetReferenceCount_FullMethodName = "/proto.FileReferenceService/GetReferenceCount"
FileReferenceService_GetResourceReferences_FullMethodName = "/proto.FileReferenceService/GetResourceReferences"
FileReferenceService_GetResourceFiles_FullMethodName = "/proto.FileReferenceService/GetResourceFiles"
FileReferenceService_DeleteResourceReferences_FullMethodName = "/proto.FileReferenceService/DeleteResourceReferences"
FileReferenceService_DeleteResourceReferencesBatch_FullMethodName = "/proto.FileReferenceService/DeleteResourceReferencesBatch"
FileReferenceService_DeleteReference_FullMethodName = "/proto.FileReferenceService/DeleteReference"
FileReferenceService_UpdateResourceFiles_FullMethodName = "/proto.FileReferenceService/UpdateResourceFiles"
FileReferenceService_SetReferenceExpiration_FullMethodName = "/proto.FileReferenceService/SetReferenceExpiration"
FileReferenceService_SetFileReferencesExpiration_FullMethodName = "/proto.FileReferenceService/SetFileReferencesExpiration"
FileReferenceService_HasFileReferences_FullMethodName = "/proto.FileReferenceService/HasFileReferences"
)
// FileReferenceServiceClient is the client API for FileReferenceService 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.
//
// Service for managing file references
type FileReferenceServiceClient interface {
// Creates a new reference to a file for a specific resource
CreateReference(ctx context.Context, in *CreateReferenceRequest, opts ...grpc.CallOption) (*CloudFileReference, error)
CreateReferenceBatch(ctx context.Context, in *CreateReferenceBatchRequest, opts ...grpc.CallOption) (*CreateReferenceBatchResponse, error)
// Gets all references to a file
GetReferences(ctx context.Context, in *GetReferencesRequest, opts ...grpc.CallOption) (*GetReferencesResponse, error)
// Gets the number of references to a file
GetReferenceCount(ctx context.Context, in *GetReferenceCountRequest, opts ...grpc.CallOption) (*GetReferenceCountResponse, error)
// Gets all references for a specific resource and optional usage
GetResourceReferences(ctx context.Context, in *GetResourceReferencesRequest, opts ...grpc.CallOption) (*GetReferencesResponse, error)
// Gets all files referenced by a resource with optional usage filter
GetResourceFiles(ctx context.Context, in *GetResourceFilesRequest, opts ...grpc.CallOption) (*GetResourceFilesResponse, error)
// Deletes references for a specific resource and optional usage
DeleteResourceReferences(ctx context.Context, in *DeleteResourceReferencesRequest, opts ...grpc.CallOption) (*DeleteResourceReferencesResponse, error)
// Deletes references for multiple specific resources and optional usage
DeleteResourceReferencesBatch(ctx context.Context, in *DeleteResourceReferencesBatchRequest, opts ...grpc.CallOption) (*DeleteResourceReferencesResponse, error)
// Deletes a specific file reference
DeleteReference(ctx context.Context, in *DeleteReferenceRequest, opts ...grpc.CallOption) (*DeleteReferenceResponse, error)
// Updates the files referenced by a resource
UpdateResourceFiles(ctx context.Context, in *UpdateResourceFilesRequest, opts ...grpc.CallOption) (*UpdateResourceFilesResponse, error)
// Updates the expiration time for a file reference
SetReferenceExpiration(ctx context.Context, in *SetReferenceExpirationRequest, opts ...grpc.CallOption) (*SetReferenceExpirationResponse, error)
// Updates the expiration time for all references to a file
SetFileReferencesExpiration(ctx context.Context, in *SetFileReferencesExpirationRequest, opts ...grpc.CallOption) (*SetFileReferencesExpirationResponse, error)
// Checks if a file has any references
HasFileReferences(ctx context.Context, in *HasFileReferencesRequest, opts ...grpc.CallOption) (*HasFileReferencesResponse, error)
}
type fileReferenceServiceClient struct {
cc grpc.ClientConnInterface
}
func NewFileReferenceServiceClient(cc grpc.ClientConnInterface) FileReferenceServiceClient {
return &fileReferenceServiceClient{cc}
}
func (c *fileReferenceServiceClient) CreateReference(ctx context.Context, in *CreateReferenceRequest, opts ...grpc.CallOption) (*CloudFileReference, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(CloudFileReference)
err := c.cc.Invoke(ctx, FileReferenceService_CreateReference_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *fileReferenceServiceClient) CreateReferenceBatch(ctx context.Context, in *CreateReferenceBatchRequest, opts ...grpc.CallOption) (*CreateReferenceBatchResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(CreateReferenceBatchResponse)
err := c.cc.Invoke(ctx, FileReferenceService_CreateReferenceBatch_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *fileReferenceServiceClient) GetReferences(ctx context.Context, in *GetReferencesRequest, opts ...grpc.CallOption) (*GetReferencesResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetReferencesResponse)
err := c.cc.Invoke(ctx, FileReferenceService_GetReferences_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *fileReferenceServiceClient) GetReferenceCount(ctx context.Context, in *GetReferenceCountRequest, opts ...grpc.CallOption) (*GetReferenceCountResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetReferenceCountResponse)
err := c.cc.Invoke(ctx, FileReferenceService_GetReferenceCount_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *fileReferenceServiceClient) GetResourceReferences(ctx context.Context, in *GetResourceReferencesRequest, opts ...grpc.CallOption) (*GetReferencesResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetReferencesResponse)
err := c.cc.Invoke(ctx, FileReferenceService_GetResourceReferences_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *fileReferenceServiceClient) GetResourceFiles(ctx context.Context, in *GetResourceFilesRequest, opts ...grpc.CallOption) (*GetResourceFilesResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetResourceFilesResponse)
err := c.cc.Invoke(ctx, FileReferenceService_GetResourceFiles_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *fileReferenceServiceClient) DeleteResourceReferences(ctx context.Context, in *DeleteResourceReferencesRequest, opts ...grpc.CallOption) (*DeleteResourceReferencesResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(DeleteResourceReferencesResponse)
err := c.cc.Invoke(ctx, FileReferenceService_DeleteResourceReferences_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *fileReferenceServiceClient) DeleteResourceReferencesBatch(ctx context.Context, in *DeleteResourceReferencesBatchRequest, opts ...grpc.CallOption) (*DeleteResourceReferencesResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(DeleteResourceReferencesResponse)
err := c.cc.Invoke(ctx, FileReferenceService_DeleteResourceReferencesBatch_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *fileReferenceServiceClient) DeleteReference(ctx context.Context, in *DeleteReferenceRequest, opts ...grpc.CallOption) (*DeleteReferenceResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(DeleteReferenceResponse)
err := c.cc.Invoke(ctx, FileReferenceService_DeleteReference_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *fileReferenceServiceClient) UpdateResourceFiles(ctx context.Context, in *UpdateResourceFilesRequest, opts ...grpc.CallOption) (*UpdateResourceFilesResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(UpdateResourceFilesResponse)
err := c.cc.Invoke(ctx, FileReferenceService_UpdateResourceFiles_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *fileReferenceServiceClient) SetReferenceExpiration(ctx context.Context, in *SetReferenceExpirationRequest, opts ...grpc.CallOption) (*SetReferenceExpirationResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(SetReferenceExpirationResponse)
err := c.cc.Invoke(ctx, FileReferenceService_SetReferenceExpiration_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *fileReferenceServiceClient) SetFileReferencesExpiration(ctx context.Context, in *SetFileReferencesExpirationRequest, opts ...grpc.CallOption) (*SetFileReferencesExpirationResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(SetFileReferencesExpirationResponse)
err := c.cc.Invoke(ctx, FileReferenceService_SetFileReferencesExpiration_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *fileReferenceServiceClient) HasFileReferences(ctx context.Context, in *HasFileReferencesRequest, opts ...grpc.CallOption) (*HasFileReferencesResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(HasFileReferencesResponse)
err := c.cc.Invoke(ctx, FileReferenceService_HasFileReferences_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// FileReferenceServiceServer is the server API for FileReferenceService service.
// All implementations must embed UnimplementedFileReferenceServiceServer
// for forward compatibility.
//
// Service for managing file references
type FileReferenceServiceServer interface {
// Creates a new reference to a file for a specific resource
CreateReference(context.Context, *CreateReferenceRequest) (*CloudFileReference, error)
CreateReferenceBatch(context.Context, *CreateReferenceBatchRequest) (*CreateReferenceBatchResponse, error)
// Gets all references to a file
GetReferences(context.Context, *GetReferencesRequest) (*GetReferencesResponse, error)
// Gets the number of references to a file
GetReferenceCount(context.Context, *GetReferenceCountRequest) (*GetReferenceCountResponse, error)
// Gets all references for a specific resource and optional usage
GetResourceReferences(context.Context, *GetResourceReferencesRequest) (*GetReferencesResponse, error)
// Gets all files referenced by a resource with optional usage filter
GetResourceFiles(context.Context, *GetResourceFilesRequest) (*GetResourceFilesResponse, error)
// Deletes references for a specific resource and optional usage
DeleteResourceReferences(context.Context, *DeleteResourceReferencesRequest) (*DeleteResourceReferencesResponse, error)
// Deletes references for multiple specific resources and optional usage
DeleteResourceReferencesBatch(context.Context, *DeleteResourceReferencesBatchRequest) (*DeleteResourceReferencesResponse, error)
// Deletes a specific file reference
DeleteReference(context.Context, *DeleteReferenceRequest) (*DeleteReferenceResponse, error)
// Updates the files referenced by a resource
UpdateResourceFiles(context.Context, *UpdateResourceFilesRequest) (*UpdateResourceFilesResponse, error)
// Updates the expiration time for a file reference
SetReferenceExpiration(context.Context, *SetReferenceExpirationRequest) (*SetReferenceExpirationResponse, error)
// Updates the expiration time for all references to a file
SetFileReferencesExpiration(context.Context, *SetFileReferencesExpirationRequest) (*SetFileReferencesExpirationResponse, error)
// Checks if a file has any references
HasFileReferences(context.Context, *HasFileReferencesRequest) (*HasFileReferencesResponse, error)
mustEmbedUnimplementedFileReferenceServiceServer()
}
// UnimplementedFileReferenceServiceServer 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 UnimplementedFileReferenceServiceServer struct{}
func (UnimplementedFileReferenceServiceServer) CreateReference(context.Context, *CreateReferenceRequest) (*CloudFileReference, error) {
return nil, status.Error(codes.Unimplemented, "method CreateReference not implemented")
}
func (UnimplementedFileReferenceServiceServer) CreateReferenceBatch(context.Context, *CreateReferenceBatchRequest) (*CreateReferenceBatchResponse, error) {
return nil, status.Error(codes.Unimplemented, "method CreateReferenceBatch not implemented")
}
func (UnimplementedFileReferenceServiceServer) GetReferences(context.Context, *GetReferencesRequest) (*GetReferencesResponse, error) {
return nil, status.Error(codes.Unimplemented, "method GetReferences not implemented")
}
func (UnimplementedFileReferenceServiceServer) GetReferenceCount(context.Context, *GetReferenceCountRequest) (*GetReferenceCountResponse, error) {
return nil, status.Error(codes.Unimplemented, "method GetReferenceCount not implemented")
}
func (UnimplementedFileReferenceServiceServer) GetResourceReferences(context.Context, *GetResourceReferencesRequest) (*GetReferencesResponse, error) {
return nil, status.Error(codes.Unimplemented, "method GetResourceReferences not implemented")
}
func (UnimplementedFileReferenceServiceServer) GetResourceFiles(context.Context, *GetResourceFilesRequest) (*GetResourceFilesResponse, error) {
return nil, status.Error(codes.Unimplemented, "method GetResourceFiles not implemented")
}
func (UnimplementedFileReferenceServiceServer) DeleteResourceReferences(context.Context, *DeleteResourceReferencesRequest) (*DeleteResourceReferencesResponse, error) {
return nil, status.Error(codes.Unimplemented, "method DeleteResourceReferences not implemented")
}
func (UnimplementedFileReferenceServiceServer) DeleteResourceReferencesBatch(context.Context, *DeleteResourceReferencesBatchRequest) (*DeleteResourceReferencesResponse, error) {
return nil, status.Error(codes.Unimplemented, "method DeleteResourceReferencesBatch not implemented")
}
func (UnimplementedFileReferenceServiceServer) DeleteReference(context.Context, *DeleteReferenceRequest) (*DeleteReferenceResponse, error) {
return nil, status.Error(codes.Unimplemented, "method DeleteReference not implemented")
}
func (UnimplementedFileReferenceServiceServer) UpdateResourceFiles(context.Context, *UpdateResourceFilesRequest) (*UpdateResourceFilesResponse, error) {
return nil, status.Error(codes.Unimplemented, "method UpdateResourceFiles not implemented")
}
func (UnimplementedFileReferenceServiceServer) SetReferenceExpiration(context.Context, *SetReferenceExpirationRequest) (*SetReferenceExpirationResponse, error) {
return nil, status.Error(codes.Unimplemented, "method SetReferenceExpiration not implemented")
}
func (UnimplementedFileReferenceServiceServer) SetFileReferencesExpiration(context.Context, *SetFileReferencesExpirationRequest) (*SetFileReferencesExpirationResponse, error) {
return nil, status.Error(codes.Unimplemented, "method SetFileReferencesExpiration not implemented")
}
func (UnimplementedFileReferenceServiceServer) HasFileReferences(context.Context, *HasFileReferencesRequest) (*HasFileReferencesResponse, error) {
return nil, status.Error(codes.Unimplemented, "method HasFileReferences not implemented")
}
func (UnimplementedFileReferenceServiceServer) mustEmbedUnimplementedFileReferenceServiceServer() {}
func (UnimplementedFileReferenceServiceServer) testEmbeddedByValue() {}
// UnsafeFileReferenceServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to FileReferenceServiceServer will
// result in compilation errors.
type UnsafeFileReferenceServiceServer interface {
mustEmbedUnimplementedFileReferenceServiceServer()
}
func RegisterFileReferenceServiceServer(s grpc.ServiceRegistrar, srv FileReferenceServiceServer) {
// If the following call panics, it indicates UnimplementedFileReferenceServiceServer 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(&FileReferenceService_ServiceDesc, srv)
}
func _FileReferenceService_CreateReference_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateReferenceRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FileReferenceServiceServer).CreateReference(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: FileReferenceService_CreateReference_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FileReferenceServiceServer).CreateReference(ctx, req.(*CreateReferenceRequest))
}
return interceptor(ctx, in, info, handler)
}
func _FileReferenceService_CreateReferenceBatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateReferenceBatchRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FileReferenceServiceServer).CreateReferenceBatch(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: FileReferenceService_CreateReferenceBatch_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FileReferenceServiceServer).CreateReferenceBatch(ctx, req.(*CreateReferenceBatchRequest))
}
return interceptor(ctx, in, info, handler)
}
func _FileReferenceService_GetReferences_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetReferencesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FileReferenceServiceServer).GetReferences(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: FileReferenceService_GetReferences_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FileReferenceServiceServer).GetReferences(ctx, req.(*GetReferencesRequest))
}
return interceptor(ctx, in, info, handler)
}
func _FileReferenceService_GetReferenceCount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetReferenceCountRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FileReferenceServiceServer).GetReferenceCount(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: FileReferenceService_GetReferenceCount_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FileReferenceServiceServer).GetReferenceCount(ctx, req.(*GetReferenceCountRequest))
}
return interceptor(ctx, in, info, handler)
}
func _FileReferenceService_GetResourceReferences_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetResourceReferencesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FileReferenceServiceServer).GetResourceReferences(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: FileReferenceService_GetResourceReferences_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FileReferenceServiceServer).GetResourceReferences(ctx, req.(*GetResourceReferencesRequest))
}
return interceptor(ctx, in, info, handler)
}
func _FileReferenceService_GetResourceFiles_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetResourceFilesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FileReferenceServiceServer).GetResourceFiles(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: FileReferenceService_GetResourceFiles_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FileReferenceServiceServer).GetResourceFiles(ctx, req.(*GetResourceFilesRequest))
}
return interceptor(ctx, in, info, handler)
}
func _FileReferenceService_DeleteResourceReferences_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteResourceReferencesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FileReferenceServiceServer).DeleteResourceReferences(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: FileReferenceService_DeleteResourceReferences_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FileReferenceServiceServer).DeleteResourceReferences(ctx, req.(*DeleteResourceReferencesRequest))
}
return interceptor(ctx, in, info, handler)
}
func _FileReferenceService_DeleteResourceReferencesBatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteResourceReferencesBatchRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FileReferenceServiceServer).DeleteResourceReferencesBatch(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: FileReferenceService_DeleteResourceReferencesBatch_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FileReferenceServiceServer).DeleteResourceReferencesBatch(ctx, req.(*DeleteResourceReferencesBatchRequest))
}
return interceptor(ctx, in, info, handler)
}
func _FileReferenceService_DeleteReference_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteReferenceRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FileReferenceServiceServer).DeleteReference(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: FileReferenceService_DeleteReference_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FileReferenceServiceServer).DeleteReference(ctx, req.(*DeleteReferenceRequest))
}
return interceptor(ctx, in, info, handler)
}
func _FileReferenceService_UpdateResourceFiles_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateResourceFilesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FileReferenceServiceServer).UpdateResourceFiles(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: FileReferenceService_UpdateResourceFiles_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FileReferenceServiceServer).UpdateResourceFiles(ctx, req.(*UpdateResourceFilesRequest))
}
return interceptor(ctx, in, info, handler)
}
func _FileReferenceService_SetReferenceExpiration_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SetReferenceExpirationRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FileReferenceServiceServer).SetReferenceExpiration(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: FileReferenceService_SetReferenceExpiration_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FileReferenceServiceServer).SetReferenceExpiration(ctx, req.(*SetReferenceExpirationRequest))
}
return interceptor(ctx, in, info, handler)
}
func _FileReferenceService_SetFileReferencesExpiration_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SetFileReferencesExpirationRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FileReferenceServiceServer).SetFileReferencesExpiration(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: FileReferenceService_SetFileReferencesExpiration_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FileReferenceServiceServer).SetFileReferencesExpiration(ctx, req.(*SetFileReferencesExpirationRequest))
}
return interceptor(ctx, in, info, handler)
}
func _FileReferenceService_HasFileReferences_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(HasFileReferencesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FileReferenceServiceServer).HasFileReferences(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: FileReferenceService_HasFileReferences_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FileReferenceServiceServer).HasFileReferences(ctx, req.(*HasFileReferencesRequest))
}
return interceptor(ctx, in, info, handler)
}
// FileReferenceService_ServiceDesc is the grpc.ServiceDesc for FileReferenceService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var FileReferenceService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "proto.FileReferenceService",
HandlerType: (*FileReferenceServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "CreateReference",
Handler: _FileReferenceService_CreateReference_Handler,
},
{
MethodName: "CreateReferenceBatch",
Handler: _FileReferenceService_CreateReferenceBatch_Handler,
},
{
MethodName: "GetReferences",
Handler: _FileReferenceService_GetReferences_Handler,
},
{
MethodName: "GetReferenceCount",
Handler: _FileReferenceService_GetReferenceCount_Handler,
},
{
MethodName: "GetResourceReferences",
Handler: _FileReferenceService_GetResourceReferences_Handler,
},
{
MethodName: "GetResourceFiles",
Handler: _FileReferenceService_GetResourceFiles_Handler,
},
{
MethodName: "DeleteResourceReferences",
Handler: _FileReferenceService_DeleteResourceReferences_Handler,
},
{
MethodName: "DeleteResourceReferencesBatch",
Handler: _FileReferenceService_DeleteResourceReferencesBatch_Handler,
},
{
MethodName: "DeleteReference",
Handler: _FileReferenceService_DeleteReference_Handler,
},
{
MethodName: "UpdateResourceFiles",
Handler: _FileReferenceService_UpdateResourceFiles_Handler,
},
{
MethodName: "SetReferenceExpiration",
Handler: _FileReferenceService_SetReferenceExpiration_Handler,
},
{
MethodName: "SetFileReferencesExpiration",
Handler: _FileReferenceService_SetFileReferencesExpiration_Handler,
},
{
MethodName: "HasFileReferences",
Handler: _FileReferenceService_HasFileReferences_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "file.proto",
}

View File

@@ -0,0 +1,573 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.10
// protoc v6.33.1
// source: leveling.proto
package gen
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
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)
)
// SocialCreditRecord represents a record of social credit changes for an account
type SocialCreditRecord struct {
state protoimpl.MessageState `protogen:"open.v1"`
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // UUID string
ReasonType string `protobuf:"bytes,2,opt,name=reason_type,json=reasonType,proto3" json:"reason_type,omitempty"`
Reason string `protobuf:"bytes,3,opt,name=reason,proto3" json:"reason,omitempty"`
Delta float64 `protobuf:"fixed64,4,opt,name=delta,proto3" json:"delta,omitempty"`
AccountId string `protobuf:"bytes,5,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` // UUID string
CreatedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *SocialCreditRecord) Reset() {
*x = SocialCreditRecord{}
mi := &file_leveling_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *SocialCreditRecord) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SocialCreditRecord) ProtoMessage() {}
func (x *SocialCreditRecord) ProtoReflect() protoreflect.Message {
mi := &file_leveling_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 SocialCreditRecord.ProtoReflect.Descriptor instead.
func (*SocialCreditRecord) Descriptor() ([]byte, []int) {
return file_leveling_proto_rawDescGZIP(), []int{0}
}
func (x *SocialCreditRecord) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *SocialCreditRecord) GetReasonType() string {
if x != nil {
return x.ReasonType
}
return ""
}
func (x *SocialCreditRecord) GetReason() string {
if x != nil {
return x.Reason
}
return ""
}
func (x *SocialCreditRecord) GetDelta() float64 {
if x != nil {
return x.Delta
}
return 0
}
func (x *SocialCreditRecord) GetAccountId() string {
if x != nil {
return x.AccountId
}
return ""
}
func (x *SocialCreditRecord) GetCreatedAt() *timestamppb.Timestamp {
if x != nil {
return x.CreatedAt
}
return nil
}
func (x *SocialCreditRecord) GetUpdatedAt() *timestamppb.Timestamp {
if x != nil {
return x.UpdatedAt
}
return nil
}
// ExperienceRecord represents a record of experience points gained by an account
type ExperienceRecord struct {
state protoimpl.MessageState `protogen:"open.v1"`
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // UUID string
ReasonType string `protobuf:"bytes,2,opt,name=reason_type,json=reasonType,proto3" json:"reason_type,omitempty"`
Reason string `protobuf:"bytes,3,opt,name=reason,proto3" json:"reason,omitempty"`
Delta int64 `protobuf:"varint,4,opt,name=delta,proto3" json:"delta,omitempty"`
BonusMultiplier float64 `protobuf:"fixed64,5,opt,name=bonus_multiplier,json=bonusMultiplier,proto3" json:"bonus_multiplier,omitempty"`
AccountId string `protobuf:"bytes,6,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` // UUID string
CreatedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *ExperienceRecord) Reset() {
*x = ExperienceRecord{}
mi := &file_leveling_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *ExperienceRecord) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ExperienceRecord) ProtoMessage() {}
func (x *ExperienceRecord) ProtoReflect() protoreflect.Message {
mi := &file_leveling_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 ExperienceRecord.ProtoReflect.Descriptor instead.
func (*ExperienceRecord) Descriptor() ([]byte, []int) {
return file_leveling_proto_rawDescGZIP(), []int{1}
}
func (x *ExperienceRecord) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *ExperienceRecord) GetReasonType() string {
if x != nil {
return x.ReasonType
}
return ""
}
func (x *ExperienceRecord) GetReason() string {
if x != nil {
return x.Reason
}
return ""
}
func (x *ExperienceRecord) GetDelta() int64 {
if x != nil {
return x.Delta
}
return 0
}
func (x *ExperienceRecord) GetBonusMultiplier() float64 {
if x != nil {
return x.BonusMultiplier
}
return 0
}
func (x *ExperienceRecord) GetAccountId() string {
if x != nil {
return x.AccountId
}
return ""
}
func (x *ExperienceRecord) GetCreatedAt() *timestamppb.Timestamp {
if x != nil {
return x.CreatedAt
}
return nil
}
func (x *ExperienceRecord) GetUpdatedAt() *timestamppb.Timestamp {
if x != nil {
return x.UpdatedAt
}
return nil
}
// Social Credit Requests/Responses
type AddSocialCreditRecordRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
ReasonType string `protobuf:"bytes,1,opt,name=reason_type,json=reasonType,proto3" json:"reason_type,omitempty"`
Reason string `protobuf:"bytes,2,opt,name=reason,proto3" json:"reason,omitempty"`
Delta float64 `protobuf:"fixed64,3,opt,name=delta,proto3" json:"delta,omitempty"`
AccountId string `protobuf:"bytes,4,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` // UUID string
ExpiredAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=expired_at,json=expiredAt,proto3" json:"expired_at,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *AddSocialCreditRecordRequest) Reset() {
*x = AddSocialCreditRecordRequest{}
mi := &file_leveling_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *AddSocialCreditRecordRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AddSocialCreditRecordRequest) ProtoMessage() {}
func (x *AddSocialCreditRecordRequest) ProtoReflect() protoreflect.Message {
mi := &file_leveling_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 AddSocialCreditRecordRequest.ProtoReflect.Descriptor instead.
func (*AddSocialCreditRecordRequest) Descriptor() ([]byte, []int) {
return file_leveling_proto_rawDescGZIP(), []int{2}
}
func (x *AddSocialCreditRecordRequest) GetReasonType() string {
if x != nil {
return x.ReasonType
}
return ""
}
func (x *AddSocialCreditRecordRequest) GetReason() string {
if x != nil {
return x.Reason
}
return ""
}
func (x *AddSocialCreditRecordRequest) GetDelta() float64 {
if x != nil {
return x.Delta
}
return 0
}
func (x *AddSocialCreditRecordRequest) GetAccountId() string {
if x != nil {
return x.AccountId
}
return ""
}
func (x *AddSocialCreditRecordRequest) GetExpiredAt() *timestamppb.Timestamp {
if x != nil {
return x.ExpiredAt
}
return nil
}
type GetSocialCreditRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
AccountId string `protobuf:"bytes,1,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` // UUID string
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *GetSocialCreditRequest) Reset() {
*x = GetSocialCreditRequest{}
mi := &file_leveling_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *GetSocialCreditRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetSocialCreditRequest) ProtoMessage() {}
func (x *GetSocialCreditRequest) ProtoReflect() protoreflect.Message {
mi := &file_leveling_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 GetSocialCreditRequest.ProtoReflect.Descriptor instead.
func (*GetSocialCreditRequest) Descriptor() ([]byte, []int) {
return file_leveling_proto_rawDescGZIP(), []int{3}
}
func (x *GetSocialCreditRequest) GetAccountId() string {
if x != nil {
return x.AccountId
}
return ""
}
type SocialCreditResponse 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 *SocialCreditResponse) Reset() {
*x = SocialCreditResponse{}
mi := &file_leveling_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *SocialCreditResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SocialCreditResponse) ProtoMessage() {}
func (x *SocialCreditResponse) ProtoReflect() protoreflect.Message {
mi := &file_leveling_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 SocialCreditResponse.ProtoReflect.Descriptor instead.
func (*SocialCreditResponse) Descriptor() ([]byte, []int) {
return file_leveling_proto_rawDescGZIP(), []int{4}
}
func (x *SocialCreditResponse) GetAmount() float64 {
if x != nil {
return x.Amount
}
return 0
}
// Experience Requests/Responses
type AddExperienceRecordRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
ReasonType string `protobuf:"bytes,1,opt,name=reason_type,json=reasonType,proto3" json:"reason_type,omitempty"`
Reason string `protobuf:"bytes,2,opt,name=reason,proto3" json:"reason,omitempty"`
Delta int64 `protobuf:"varint,3,opt,name=delta,proto3" json:"delta,omitempty"`
AccountId string `protobuf:"bytes,4,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` // UUID string
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *AddExperienceRecordRequest) Reset() {
*x = AddExperienceRecordRequest{}
mi := &file_leveling_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *AddExperienceRecordRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AddExperienceRecordRequest) ProtoMessage() {}
func (x *AddExperienceRecordRequest) ProtoReflect() protoreflect.Message {
mi := &file_leveling_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 AddExperienceRecordRequest.ProtoReflect.Descriptor instead.
func (*AddExperienceRecordRequest) Descriptor() ([]byte, []int) {
return file_leveling_proto_rawDescGZIP(), []int{5}
}
func (x *AddExperienceRecordRequest) GetReasonType() string {
if x != nil {
return x.ReasonType
}
return ""
}
func (x *AddExperienceRecordRequest) GetReason() string {
if x != nil {
return x.Reason
}
return ""
}
func (x *AddExperienceRecordRequest) GetDelta() int64 {
if x != nil {
return x.Delta
}
return 0
}
func (x *AddExperienceRecordRequest) GetAccountId() string {
if x != nil {
return x.AccountId
}
return ""
}
var File_leveling_proto protoreflect.FileDescriptor
const file_leveling_proto_rawDesc = "" +
"\n" +
"\x0eleveling.proto\x12\x05proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x88\x02\n" +
"\x12SocialCreditRecord\x12\x0e\n" +
"\x02id\x18\x01 \x01(\tR\x02id\x12\x1f\n" +
"\vreason_type\x18\x02 \x01(\tR\n" +
"reasonType\x12\x16\n" +
"\x06reason\x18\x03 \x01(\tR\x06reason\x12\x14\n" +
"\x05delta\x18\x04 \x01(\x01R\x05delta\x12\x1d\n" +
"\n" +
"account_id\x18\x05 \x01(\tR\taccountId\x129\n" +
"\n" +
"created_at\x18\x06 \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x129\n" +
"\n" +
"updated_at\x18\a \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAt\"\xb1\x02\n" +
"\x10ExperienceRecord\x12\x0e\n" +
"\x02id\x18\x01 \x01(\tR\x02id\x12\x1f\n" +
"\vreason_type\x18\x02 \x01(\tR\n" +
"reasonType\x12\x16\n" +
"\x06reason\x18\x03 \x01(\tR\x06reason\x12\x14\n" +
"\x05delta\x18\x04 \x01(\x03R\x05delta\x12)\n" +
"\x10bonus_multiplier\x18\x05 \x01(\x01R\x0fbonusMultiplier\x12\x1d\n" +
"\n" +
"account_id\x18\x06 \x01(\tR\taccountId\x129\n" +
"\n" +
"created_at\x18\a \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x129\n" +
"\n" +
"updated_at\x18\b \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAt\"\xc7\x01\n" +
"\x1cAddSocialCreditRecordRequest\x12\x1f\n" +
"\vreason_type\x18\x01 \x01(\tR\n" +
"reasonType\x12\x16\n" +
"\x06reason\x18\x02 \x01(\tR\x06reason\x12\x14\n" +
"\x05delta\x18\x03 \x01(\x01R\x05delta\x12\x1d\n" +
"\n" +
"account_id\x18\x04 \x01(\tR\taccountId\x129\n" +
"\n" +
"expired_at\x18\x05 \x01(\v2\x1a.google.protobuf.TimestampR\texpiredAt\"7\n" +
"\x16GetSocialCreditRequest\x12\x1d\n" +
"\n" +
"account_id\x18\x01 \x01(\tR\taccountId\".\n" +
"\x14SocialCreditResponse\x12\x16\n" +
"\x06amount\x18\x01 \x01(\x01R\x06amount\"\x8a\x01\n" +
"\x1aAddExperienceRecordRequest\x12\x1f\n" +
"\vreason_type\x18\x01 \x01(\tR\n" +
"reasonType\x12\x16\n" +
"\x06reason\x18\x02 \x01(\tR\x06reason\x12\x14\n" +
"\x05delta\x18\x03 \x01(\x03R\x05delta\x12\x1d\n" +
"\n" +
"account_id\x18\x04 \x01(\tR\taccountId2\xb1\x01\n" +
"\x13SocialCreditService\x12K\n" +
"\tAddRecord\x12#.proto.AddSocialCreditRecordRequest\x1a\x19.proto.SocialCreditRecord\x12M\n" +
"\x0fGetSocialCredit\x12\x1d.proto.GetSocialCreditRequest\x1a\x1b.proto.SocialCreditResponse2\\\n" +
"\x11ExperienceService\x12G\n" +
"\tAddRecord\x12!.proto.AddExperienceRecordRequest\x1a\x17.proto.ExperienceRecordBUZ7git.solsynth.dev/goatworks/turbine/pkg/shared/proto/gen\xaa\x02\x19DysonNetwork.Shared.Protob\x06proto3"
var (
file_leveling_proto_rawDescOnce sync.Once
file_leveling_proto_rawDescData []byte
)
func file_leveling_proto_rawDescGZIP() []byte {
file_leveling_proto_rawDescOnce.Do(func() {
file_leveling_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_leveling_proto_rawDesc), len(file_leveling_proto_rawDesc)))
})
return file_leveling_proto_rawDescData
}
var file_leveling_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
var file_leveling_proto_goTypes = []any{
(*SocialCreditRecord)(nil), // 0: proto.SocialCreditRecord
(*ExperienceRecord)(nil), // 1: proto.ExperienceRecord
(*AddSocialCreditRecordRequest)(nil), // 2: proto.AddSocialCreditRecordRequest
(*GetSocialCreditRequest)(nil), // 3: proto.GetSocialCreditRequest
(*SocialCreditResponse)(nil), // 4: proto.SocialCreditResponse
(*AddExperienceRecordRequest)(nil), // 5: proto.AddExperienceRecordRequest
(*timestamppb.Timestamp)(nil), // 6: google.protobuf.Timestamp
}
var file_leveling_proto_depIdxs = []int32{
6, // 0: proto.SocialCreditRecord.created_at:type_name -> google.protobuf.Timestamp
6, // 1: proto.SocialCreditRecord.updated_at:type_name -> google.protobuf.Timestamp
6, // 2: proto.ExperienceRecord.created_at:type_name -> google.protobuf.Timestamp
6, // 3: proto.ExperienceRecord.updated_at:type_name -> google.protobuf.Timestamp
6, // 4: proto.AddSocialCreditRecordRequest.expired_at:type_name -> google.protobuf.Timestamp
2, // 5: proto.SocialCreditService.AddRecord:input_type -> proto.AddSocialCreditRecordRequest
3, // 6: proto.SocialCreditService.GetSocialCredit:input_type -> proto.GetSocialCreditRequest
5, // 7: proto.ExperienceService.AddRecord:input_type -> proto.AddExperienceRecordRequest
0, // 8: proto.SocialCreditService.AddRecord:output_type -> proto.SocialCreditRecord
4, // 9: proto.SocialCreditService.GetSocialCredit:output_type -> proto.SocialCreditResponse
1, // 10: proto.ExperienceService.AddRecord:output_type -> proto.ExperienceRecord
8, // [8:11] is the sub-list for method output_type
5, // [5:8] is the sub-list for method input_type
5, // [5:5] is the sub-list for extension type_name
5, // [5:5] is the sub-list for extension extendee
0, // [0:5] is the sub-list for field type_name
}
func init() { file_leveling_proto_init() }
func file_leveling_proto_init() {
if File_leveling_proto != nil {
return
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_leveling_proto_rawDesc), len(file_leveling_proto_rawDesc)),
NumEnums: 0,
NumMessages: 6,
NumExtensions: 0,
NumServices: 2,
},
GoTypes: file_leveling_proto_goTypes,
DependencyIndexes: file_leveling_proto_depIdxs,
MessageInfos: file_leveling_proto_msgTypes,
}.Build()
File_leveling_proto = out.File
file_leveling_proto_goTypes = nil
file_leveling_proto_depIdxs = nil
}

View File

@@ -0,0 +1,275 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.6.0
// - protoc v6.33.1
// source: leveling.proto
package gen
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 (
SocialCreditService_AddRecord_FullMethodName = "/proto.SocialCreditService/AddRecord"
SocialCreditService_GetSocialCredit_FullMethodName = "/proto.SocialCreditService/GetSocialCredit"
)
// SocialCreditServiceClient is the client API for SocialCreditService 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.
//
// SocialCreditService provides operations for managing social credit scores
type SocialCreditServiceClient interface {
// Adds a new social credit record for an account
AddRecord(ctx context.Context, in *AddSocialCreditRecordRequest, opts ...grpc.CallOption) (*SocialCreditRecord, error)
// Gets the current social credit score for an account
GetSocialCredit(ctx context.Context, in *GetSocialCreditRequest, opts ...grpc.CallOption) (*SocialCreditResponse, error)
}
type socialCreditServiceClient struct {
cc grpc.ClientConnInterface
}
func NewSocialCreditServiceClient(cc grpc.ClientConnInterface) SocialCreditServiceClient {
return &socialCreditServiceClient{cc}
}
func (c *socialCreditServiceClient) AddRecord(ctx context.Context, in *AddSocialCreditRecordRequest, opts ...grpc.CallOption) (*SocialCreditRecord, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(SocialCreditRecord)
err := c.cc.Invoke(ctx, SocialCreditService_AddRecord_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *socialCreditServiceClient) GetSocialCredit(ctx context.Context, in *GetSocialCreditRequest, opts ...grpc.CallOption) (*SocialCreditResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(SocialCreditResponse)
err := c.cc.Invoke(ctx, SocialCreditService_GetSocialCredit_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// SocialCreditServiceServer is the server API for SocialCreditService service.
// All implementations must embed UnimplementedSocialCreditServiceServer
// for forward compatibility.
//
// SocialCreditService provides operations for managing social credit scores
type SocialCreditServiceServer interface {
// Adds a new social credit record for an account
AddRecord(context.Context, *AddSocialCreditRecordRequest) (*SocialCreditRecord, error)
// Gets the current social credit score for an account
GetSocialCredit(context.Context, *GetSocialCreditRequest) (*SocialCreditResponse, error)
mustEmbedUnimplementedSocialCreditServiceServer()
}
// UnimplementedSocialCreditServiceServer 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 UnimplementedSocialCreditServiceServer struct{}
func (UnimplementedSocialCreditServiceServer) AddRecord(context.Context, *AddSocialCreditRecordRequest) (*SocialCreditRecord, error) {
return nil, status.Error(codes.Unimplemented, "method AddRecord not implemented")
}
func (UnimplementedSocialCreditServiceServer) GetSocialCredit(context.Context, *GetSocialCreditRequest) (*SocialCreditResponse, error) {
return nil, status.Error(codes.Unimplemented, "method GetSocialCredit not implemented")
}
func (UnimplementedSocialCreditServiceServer) mustEmbedUnimplementedSocialCreditServiceServer() {}
func (UnimplementedSocialCreditServiceServer) testEmbeddedByValue() {}
// UnsafeSocialCreditServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to SocialCreditServiceServer will
// result in compilation errors.
type UnsafeSocialCreditServiceServer interface {
mustEmbedUnimplementedSocialCreditServiceServer()
}
func RegisterSocialCreditServiceServer(s grpc.ServiceRegistrar, srv SocialCreditServiceServer) {
// If the following call panics, it indicates UnimplementedSocialCreditServiceServer 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(&SocialCreditService_ServiceDesc, srv)
}
func _SocialCreditService_AddRecord_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(AddSocialCreditRecordRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SocialCreditServiceServer).AddRecord(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: SocialCreditService_AddRecord_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SocialCreditServiceServer).AddRecord(ctx, req.(*AddSocialCreditRecordRequest))
}
return interceptor(ctx, in, info, handler)
}
func _SocialCreditService_GetSocialCredit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetSocialCreditRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SocialCreditServiceServer).GetSocialCredit(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: SocialCreditService_GetSocialCredit_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SocialCreditServiceServer).GetSocialCredit(ctx, req.(*GetSocialCreditRequest))
}
return interceptor(ctx, in, info, handler)
}
// SocialCreditService_ServiceDesc is the grpc.ServiceDesc for SocialCreditService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var SocialCreditService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "proto.SocialCreditService",
HandlerType: (*SocialCreditServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "AddRecord",
Handler: _SocialCreditService_AddRecord_Handler,
},
{
MethodName: "GetSocialCredit",
Handler: _SocialCreditService_GetSocialCredit_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "leveling.proto",
}
const (
ExperienceService_AddRecord_FullMethodName = "/proto.ExperienceService/AddRecord"
)
// ExperienceServiceClient is the client API for ExperienceService 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.
//
// ExperienceService provides operations for managing experience points
type ExperienceServiceClient interface {
// Adds a new experience record for an account
AddRecord(ctx context.Context, in *AddExperienceRecordRequest, opts ...grpc.CallOption) (*ExperienceRecord, error)
}
type experienceServiceClient struct {
cc grpc.ClientConnInterface
}
func NewExperienceServiceClient(cc grpc.ClientConnInterface) ExperienceServiceClient {
return &experienceServiceClient{cc}
}
func (c *experienceServiceClient) AddRecord(ctx context.Context, in *AddExperienceRecordRequest, opts ...grpc.CallOption) (*ExperienceRecord, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ExperienceRecord)
err := c.cc.Invoke(ctx, ExperienceService_AddRecord_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// ExperienceServiceServer is the server API for ExperienceService service.
// All implementations must embed UnimplementedExperienceServiceServer
// for forward compatibility.
//
// ExperienceService provides operations for managing experience points
type ExperienceServiceServer interface {
// Adds a new experience record for an account
AddRecord(context.Context, *AddExperienceRecordRequest) (*ExperienceRecord, error)
mustEmbedUnimplementedExperienceServiceServer()
}
// UnimplementedExperienceServiceServer 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 UnimplementedExperienceServiceServer struct{}
func (UnimplementedExperienceServiceServer) AddRecord(context.Context, *AddExperienceRecordRequest) (*ExperienceRecord, error) {
return nil, status.Error(codes.Unimplemented, "method AddRecord not implemented")
}
func (UnimplementedExperienceServiceServer) mustEmbedUnimplementedExperienceServiceServer() {}
func (UnimplementedExperienceServiceServer) testEmbeddedByValue() {}
// UnsafeExperienceServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to ExperienceServiceServer will
// result in compilation errors.
type UnsafeExperienceServiceServer interface {
mustEmbedUnimplementedExperienceServiceServer()
}
func RegisterExperienceServiceServer(s grpc.ServiceRegistrar, srv ExperienceServiceServer) {
// If the following call panics, it indicates UnimplementedExperienceServiceServer 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(&ExperienceService_ServiceDesc, srv)
}
func _ExperienceService_AddRecord_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(AddExperienceRecordRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ExperienceServiceServer).AddRecord(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ExperienceService_AddRecord_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ExperienceServiceServer).AddRecord(ctx, req.(*AddExperienceRecordRequest))
}
return interceptor(ctx, in, info, handler)
}
// ExperienceService_ServiceDesc is the grpc.ServiceDesc for ExperienceService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var ExperienceService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "proto.ExperienceService",
HandlerType: (*ExperienceServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "AddRecord",
Handler: _ExperienceService_AddRecord_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "leveling.proto",
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,243 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.6.0
// - protoc v6.33.1
// source: post.proto
package gen
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 (
PostService_GetPost_FullMethodName = "/proto.PostService/GetPost"
PostService_GetPostBatch_FullMethodName = "/proto.PostService/GetPostBatch"
PostService_SearchPosts_FullMethodName = "/proto.PostService/SearchPosts"
PostService_ListPosts_FullMethodName = "/proto.PostService/ListPosts"
)
// PostServiceClient is the client API for PostService 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 PostServiceClient interface {
// Get a single post by id
GetPost(ctx context.Context, in *GetPostRequest, opts ...grpc.CallOption) (*Post, error)
// Get multiple posts by ids
GetPostBatch(ctx context.Context, in *GetPostBatchRequest, opts ...grpc.CallOption) (*GetPostBatchResponse, error)
// Search posts
SearchPosts(ctx context.Context, in *SearchPostsRequest, opts ...grpc.CallOption) (*SearchPostsResponse, error)
// List posts with filters
ListPosts(ctx context.Context, in *ListPostsRequest, opts ...grpc.CallOption) (*ListPostsResponse, error)
}
type postServiceClient struct {
cc grpc.ClientConnInterface
}
func NewPostServiceClient(cc grpc.ClientConnInterface) PostServiceClient {
return &postServiceClient{cc}
}
func (c *postServiceClient) GetPost(ctx context.Context, in *GetPostRequest, opts ...grpc.CallOption) (*Post, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Post)
err := c.cc.Invoke(ctx, PostService_GetPost_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *postServiceClient) GetPostBatch(ctx context.Context, in *GetPostBatchRequest, opts ...grpc.CallOption) (*GetPostBatchResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetPostBatchResponse)
err := c.cc.Invoke(ctx, PostService_GetPostBatch_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *postServiceClient) SearchPosts(ctx context.Context, in *SearchPostsRequest, opts ...grpc.CallOption) (*SearchPostsResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(SearchPostsResponse)
err := c.cc.Invoke(ctx, PostService_SearchPosts_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *postServiceClient) ListPosts(ctx context.Context, in *ListPostsRequest, opts ...grpc.CallOption) (*ListPostsResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ListPostsResponse)
err := c.cc.Invoke(ctx, PostService_ListPosts_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// PostServiceServer is the server API for PostService service.
// All implementations must embed UnimplementedPostServiceServer
// for forward compatibility.
type PostServiceServer interface {
// Get a single post by id
GetPost(context.Context, *GetPostRequest) (*Post, error)
// Get multiple posts by ids
GetPostBatch(context.Context, *GetPostBatchRequest) (*GetPostBatchResponse, error)
// Search posts
SearchPosts(context.Context, *SearchPostsRequest) (*SearchPostsResponse, error)
// List posts with filters
ListPosts(context.Context, *ListPostsRequest) (*ListPostsResponse, error)
mustEmbedUnimplementedPostServiceServer()
}
// UnimplementedPostServiceServer 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 UnimplementedPostServiceServer struct{}
func (UnimplementedPostServiceServer) GetPost(context.Context, *GetPostRequest) (*Post, error) {
return nil, status.Error(codes.Unimplemented, "method GetPost not implemented")
}
func (UnimplementedPostServiceServer) GetPostBatch(context.Context, *GetPostBatchRequest) (*GetPostBatchResponse, error) {
return nil, status.Error(codes.Unimplemented, "method GetPostBatch not implemented")
}
func (UnimplementedPostServiceServer) SearchPosts(context.Context, *SearchPostsRequest) (*SearchPostsResponse, error) {
return nil, status.Error(codes.Unimplemented, "method SearchPosts not implemented")
}
func (UnimplementedPostServiceServer) ListPosts(context.Context, *ListPostsRequest) (*ListPostsResponse, error) {
return nil, status.Error(codes.Unimplemented, "method ListPosts not implemented")
}
func (UnimplementedPostServiceServer) mustEmbedUnimplementedPostServiceServer() {}
func (UnimplementedPostServiceServer) testEmbeddedByValue() {}
// UnsafePostServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to PostServiceServer will
// result in compilation errors.
type UnsafePostServiceServer interface {
mustEmbedUnimplementedPostServiceServer()
}
func RegisterPostServiceServer(s grpc.ServiceRegistrar, srv PostServiceServer) {
// If the following call panics, it indicates UnimplementedPostServiceServer 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(&PostService_ServiceDesc, srv)
}
func _PostService_GetPost_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetPostRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PostServiceServer).GetPost(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PostService_GetPost_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PostServiceServer).GetPost(ctx, req.(*GetPostRequest))
}
return interceptor(ctx, in, info, handler)
}
func _PostService_GetPostBatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetPostBatchRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PostServiceServer).GetPostBatch(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PostService_GetPostBatch_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PostServiceServer).GetPostBatch(ctx, req.(*GetPostBatchRequest))
}
return interceptor(ctx, in, info, handler)
}
func _PostService_SearchPosts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SearchPostsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PostServiceServer).SearchPosts(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PostService_SearchPosts_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PostServiceServer).SearchPosts(ctx, req.(*SearchPostsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _PostService_ListPosts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListPostsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PostServiceServer).ListPosts(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PostService_ListPosts_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PostServiceServer).ListPosts(ctx, req.(*ListPostsRequest))
}
return interceptor(ctx, in, info, handler)
}
// PostService_ServiceDesc is the grpc.ServiceDesc for PostService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var PostService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "proto.PostService",
HandlerType: (*PostServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetPost",
Handler: _PostService_GetPost_Handler,
},
{
MethodName: "GetPostBatch",
Handler: _PostService_GetPostBatch_Handler,
},
{
MethodName: "SearchPosts",
Handler: _PostService_SearchPosts_Handler,
},
{
MethodName: "ListPosts",
Handler: _PostService_ListPosts_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "post.proto",
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,350 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.6.0
// - protoc v6.33.1
// source: publisher.proto
package gen
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
wrapperspb "google.golang.org/protobuf/types/known/wrapperspb"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.64.0 or later.
const _ = grpc.SupportPackageIsVersion9
const (
PublisherService_GetPublisher_FullMethodName = "/proto.PublisherService/GetPublisher"
PublisherService_GetPublisherBatch_FullMethodName = "/proto.PublisherService/GetPublisherBatch"
PublisherService_ListPublishers_FullMethodName = "/proto.PublisherService/ListPublishers"
PublisherService_ListPublisherMembers_FullMethodName = "/proto.PublisherService/ListPublisherMembers"
PublisherService_SetPublisherFeatureFlag_FullMethodName = "/proto.PublisherService/SetPublisherFeatureFlag"
PublisherService_HasPublisherFeature_FullMethodName = "/proto.PublisherService/HasPublisherFeature"
PublisherService_IsPublisherMember_FullMethodName = "/proto.PublisherService/IsPublisherMember"
)
// PublisherServiceClient is the client API for PublisherService 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 PublisherServiceClient interface {
GetPublisher(ctx context.Context, in *GetPublisherRequest, opts ...grpc.CallOption) (*GetPublisherResponse, error)
GetPublisherBatch(ctx context.Context, in *GetPublisherBatchRequest, opts ...grpc.CallOption) (*ListPublishersResponse, error)
ListPublishers(ctx context.Context, in *ListPublishersRequest, opts ...grpc.CallOption) (*ListPublishersResponse, error)
ListPublisherMembers(ctx context.Context, in *ListPublisherMembersRequest, opts ...grpc.CallOption) (*ListPublisherMembersResponse, error)
SetPublisherFeatureFlag(ctx context.Context, in *SetPublisherFeatureFlagRequest, opts ...grpc.CallOption) (*wrapperspb.StringValue, error)
HasPublisherFeature(ctx context.Context, in *HasPublisherFeatureRequest, opts ...grpc.CallOption) (*HasPublisherFeatureResponse, error)
IsPublisherMember(ctx context.Context, in *IsPublisherMemberRequest, opts ...grpc.CallOption) (*IsPublisherMemberResponse, error)
}
type publisherServiceClient struct {
cc grpc.ClientConnInterface
}
func NewPublisherServiceClient(cc grpc.ClientConnInterface) PublisherServiceClient {
return &publisherServiceClient{cc}
}
func (c *publisherServiceClient) GetPublisher(ctx context.Context, in *GetPublisherRequest, opts ...grpc.CallOption) (*GetPublisherResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetPublisherResponse)
err := c.cc.Invoke(ctx, PublisherService_GetPublisher_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *publisherServiceClient) GetPublisherBatch(ctx context.Context, in *GetPublisherBatchRequest, opts ...grpc.CallOption) (*ListPublishersResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ListPublishersResponse)
err := c.cc.Invoke(ctx, PublisherService_GetPublisherBatch_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *publisherServiceClient) ListPublishers(ctx context.Context, in *ListPublishersRequest, opts ...grpc.CallOption) (*ListPublishersResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ListPublishersResponse)
err := c.cc.Invoke(ctx, PublisherService_ListPublishers_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *publisherServiceClient) ListPublisherMembers(ctx context.Context, in *ListPublisherMembersRequest, opts ...grpc.CallOption) (*ListPublisherMembersResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ListPublisherMembersResponse)
err := c.cc.Invoke(ctx, PublisherService_ListPublisherMembers_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *publisherServiceClient) SetPublisherFeatureFlag(ctx context.Context, in *SetPublisherFeatureFlagRequest, opts ...grpc.CallOption) (*wrapperspb.StringValue, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(wrapperspb.StringValue)
err := c.cc.Invoke(ctx, PublisherService_SetPublisherFeatureFlag_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *publisherServiceClient) HasPublisherFeature(ctx context.Context, in *HasPublisherFeatureRequest, opts ...grpc.CallOption) (*HasPublisherFeatureResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(HasPublisherFeatureResponse)
err := c.cc.Invoke(ctx, PublisherService_HasPublisherFeature_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *publisherServiceClient) IsPublisherMember(ctx context.Context, in *IsPublisherMemberRequest, opts ...grpc.CallOption) (*IsPublisherMemberResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(IsPublisherMemberResponse)
err := c.cc.Invoke(ctx, PublisherService_IsPublisherMember_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// PublisherServiceServer is the server API for PublisherService service.
// All implementations must embed UnimplementedPublisherServiceServer
// for forward compatibility.
type PublisherServiceServer interface {
GetPublisher(context.Context, *GetPublisherRequest) (*GetPublisherResponse, error)
GetPublisherBatch(context.Context, *GetPublisherBatchRequest) (*ListPublishersResponse, error)
ListPublishers(context.Context, *ListPublishersRequest) (*ListPublishersResponse, error)
ListPublisherMembers(context.Context, *ListPublisherMembersRequest) (*ListPublisherMembersResponse, error)
SetPublisherFeatureFlag(context.Context, *SetPublisherFeatureFlagRequest) (*wrapperspb.StringValue, error)
HasPublisherFeature(context.Context, *HasPublisherFeatureRequest) (*HasPublisherFeatureResponse, error)
IsPublisherMember(context.Context, *IsPublisherMemberRequest) (*IsPublisherMemberResponse, error)
mustEmbedUnimplementedPublisherServiceServer()
}
// UnimplementedPublisherServiceServer 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 UnimplementedPublisherServiceServer struct{}
func (UnimplementedPublisherServiceServer) GetPublisher(context.Context, *GetPublisherRequest) (*GetPublisherResponse, error) {
return nil, status.Error(codes.Unimplemented, "method GetPublisher not implemented")
}
func (UnimplementedPublisherServiceServer) GetPublisherBatch(context.Context, *GetPublisherBatchRequest) (*ListPublishersResponse, error) {
return nil, status.Error(codes.Unimplemented, "method GetPublisherBatch not implemented")
}
func (UnimplementedPublisherServiceServer) ListPublishers(context.Context, *ListPublishersRequest) (*ListPublishersResponse, error) {
return nil, status.Error(codes.Unimplemented, "method ListPublishers not implemented")
}
func (UnimplementedPublisherServiceServer) ListPublisherMembers(context.Context, *ListPublisherMembersRequest) (*ListPublisherMembersResponse, error) {
return nil, status.Error(codes.Unimplemented, "method ListPublisherMembers not implemented")
}
func (UnimplementedPublisherServiceServer) SetPublisherFeatureFlag(context.Context, *SetPublisherFeatureFlagRequest) (*wrapperspb.StringValue, error) {
return nil, status.Error(codes.Unimplemented, "method SetPublisherFeatureFlag not implemented")
}
func (UnimplementedPublisherServiceServer) HasPublisherFeature(context.Context, *HasPublisherFeatureRequest) (*HasPublisherFeatureResponse, error) {
return nil, status.Error(codes.Unimplemented, "method HasPublisherFeature not implemented")
}
func (UnimplementedPublisherServiceServer) IsPublisherMember(context.Context, *IsPublisherMemberRequest) (*IsPublisherMemberResponse, error) {
return nil, status.Error(codes.Unimplemented, "method IsPublisherMember not implemented")
}
func (UnimplementedPublisherServiceServer) mustEmbedUnimplementedPublisherServiceServer() {}
func (UnimplementedPublisherServiceServer) testEmbeddedByValue() {}
// UnsafePublisherServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to PublisherServiceServer will
// result in compilation errors.
type UnsafePublisherServiceServer interface {
mustEmbedUnimplementedPublisherServiceServer()
}
func RegisterPublisherServiceServer(s grpc.ServiceRegistrar, srv PublisherServiceServer) {
// If the following call panics, it indicates UnimplementedPublisherServiceServer 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(&PublisherService_ServiceDesc, srv)
}
func _PublisherService_GetPublisher_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetPublisherRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PublisherServiceServer).GetPublisher(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PublisherService_GetPublisher_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PublisherServiceServer).GetPublisher(ctx, req.(*GetPublisherRequest))
}
return interceptor(ctx, in, info, handler)
}
func _PublisherService_GetPublisherBatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetPublisherBatchRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PublisherServiceServer).GetPublisherBatch(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PublisherService_GetPublisherBatch_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PublisherServiceServer).GetPublisherBatch(ctx, req.(*GetPublisherBatchRequest))
}
return interceptor(ctx, in, info, handler)
}
func _PublisherService_ListPublishers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListPublishersRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PublisherServiceServer).ListPublishers(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PublisherService_ListPublishers_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PublisherServiceServer).ListPublishers(ctx, req.(*ListPublishersRequest))
}
return interceptor(ctx, in, info, handler)
}
func _PublisherService_ListPublisherMembers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListPublisherMembersRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PublisherServiceServer).ListPublisherMembers(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PublisherService_ListPublisherMembers_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PublisherServiceServer).ListPublisherMembers(ctx, req.(*ListPublisherMembersRequest))
}
return interceptor(ctx, in, info, handler)
}
func _PublisherService_SetPublisherFeatureFlag_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SetPublisherFeatureFlagRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PublisherServiceServer).SetPublisherFeatureFlag(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PublisherService_SetPublisherFeatureFlag_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PublisherServiceServer).SetPublisherFeatureFlag(ctx, req.(*SetPublisherFeatureFlagRequest))
}
return interceptor(ctx, in, info, handler)
}
func _PublisherService_HasPublisherFeature_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(HasPublisherFeatureRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PublisherServiceServer).HasPublisherFeature(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PublisherService_HasPublisherFeature_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PublisherServiceServer).HasPublisherFeature(ctx, req.(*HasPublisherFeatureRequest))
}
return interceptor(ctx, in, info, handler)
}
func _PublisherService_IsPublisherMember_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(IsPublisherMemberRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PublisherServiceServer).IsPublisherMember(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PublisherService_IsPublisherMember_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PublisherServiceServer).IsPublisherMember(ctx, req.(*IsPublisherMemberRequest))
}
return interceptor(ctx, in, info, handler)
}
// PublisherService_ServiceDesc is the grpc.ServiceDesc for PublisherService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var PublisherService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "proto.PublisherService",
HandlerType: (*PublisherServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetPublisher",
Handler: _PublisherService_GetPublisher_Handler,
},
{
MethodName: "GetPublisherBatch",
Handler: _PublisherService_GetPublisherBatch_Handler,
},
{
MethodName: "ListPublishers",
Handler: _PublisherService_ListPublishers_Handler,
},
{
MethodName: "ListPublisherMembers",
Handler: _PublisherService_ListPublisherMembers_Handler,
},
{
MethodName: "SetPublisherFeatureFlag",
Handler: _PublisherService_SetPublisherFeatureFlag_Handler,
},
{
MethodName: "HasPublisherFeature",
Handler: _PublisherService_HasPublisherFeature_Handler,
},
{
MethodName: "IsPublisherMember",
Handler: _PublisherService_IsPublisherMember_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "publisher.proto",
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,445 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.6.0
// - protoc v6.33.1
// source: realm.proto
package gen
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
emptypb "google.golang.org/protobuf/types/known/emptypb"
wrapperspb "google.golang.org/protobuf/types/known/wrapperspb"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.64.0 or later.
const _ = grpc.SupportPackageIsVersion9
const (
RealmService_GetRealm_FullMethodName = "/proto.RealmService/GetRealm"
RealmService_GetRealmBatch_FullMethodName = "/proto.RealmService/GetRealmBatch"
RealmService_GetUserRealms_FullMethodName = "/proto.RealmService/GetUserRealms"
RealmService_GetPublicRealms_FullMethodName = "/proto.RealmService/GetPublicRealms"
RealmService_SearchRealms_FullMethodName = "/proto.RealmService/SearchRealms"
RealmService_SendInviteNotify_FullMethodName = "/proto.RealmService/SendInviteNotify"
RealmService_IsMemberWithRole_FullMethodName = "/proto.RealmService/IsMemberWithRole"
RealmService_LoadMemberAccount_FullMethodName = "/proto.RealmService/LoadMemberAccount"
RealmService_LoadMemberAccounts_FullMethodName = "/proto.RealmService/LoadMemberAccounts"
)
// RealmServiceClient is the client API for RealmService 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 RealmServiceClient interface {
// Get realm by id or slug
GetRealm(ctx context.Context, in *GetRealmRequest, opts ...grpc.CallOption) (*Realm, error)
// Get realm batch by ids
GetRealmBatch(ctx context.Context, in *GetRealmBatchRequest, opts ...grpc.CallOption) (*GetRealmBatchResponse, error)
// Get realms for a user
GetUserRealms(ctx context.Context, in *GetUserRealmsRequest, opts ...grpc.CallOption) (*GetUserRealmsResponse, error)
// Get public realms
GetPublicRealms(ctx context.Context, in *GetPublicRealmsRequest, opts ...grpc.CallOption) (*GetPublicRealmsResponse, error)
// Search public realms
SearchRealms(ctx context.Context, in *SearchRealmsRequest, opts ...grpc.CallOption) (*GetPublicRealmsResponse, error)
// Send invitation notification
SendInviteNotify(ctx context.Context, in *SendInviteNotifyRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
// Check if member has required role
IsMemberWithRole(ctx context.Context, in *IsMemberWithRoleRequest, opts ...grpc.CallOption) (*wrapperspb.BoolValue, error)
// Load account for a member
LoadMemberAccount(ctx context.Context, in *LoadMemberAccountRequest, opts ...grpc.CallOption) (*RealmMember, error)
// Load accounts for members
LoadMemberAccounts(ctx context.Context, in *LoadMemberAccountsRequest, opts ...grpc.CallOption) (*LoadMemberAccountsResponse, error)
}
type realmServiceClient struct {
cc grpc.ClientConnInterface
}
func NewRealmServiceClient(cc grpc.ClientConnInterface) RealmServiceClient {
return &realmServiceClient{cc}
}
func (c *realmServiceClient) GetRealm(ctx context.Context, in *GetRealmRequest, opts ...grpc.CallOption) (*Realm, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Realm)
err := c.cc.Invoke(ctx, RealmService_GetRealm_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *realmServiceClient) GetRealmBatch(ctx context.Context, in *GetRealmBatchRequest, opts ...grpc.CallOption) (*GetRealmBatchResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetRealmBatchResponse)
err := c.cc.Invoke(ctx, RealmService_GetRealmBatch_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *realmServiceClient) GetUserRealms(ctx context.Context, in *GetUserRealmsRequest, opts ...grpc.CallOption) (*GetUserRealmsResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetUserRealmsResponse)
err := c.cc.Invoke(ctx, RealmService_GetUserRealms_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *realmServiceClient) GetPublicRealms(ctx context.Context, in *GetPublicRealmsRequest, opts ...grpc.CallOption) (*GetPublicRealmsResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetPublicRealmsResponse)
err := c.cc.Invoke(ctx, RealmService_GetPublicRealms_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *realmServiceClient) SearchRealms(ctx context.Context, in *SearchRealmsRequest, opts ...grpc.CallOption) (*GetPublicRealmsResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetPublicRealmsResponse)
err := c.cc.Invoke(ctx, RealmService_SearchRealms_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *realmServiceClient) SendInviteNotify(ctx context.Context, in *SendInviteNotifyRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, RealmService_SendInviteNotify_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *realmServiceClient) IsMemberWithRole(ctx context.Context, in *IsMemberWithRoleRequest, opts ...grpc.CallOption) (*wrapperspb.BoolValue, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(wrapperspb.BoolValue)
err := c.cc.Invoke(ctx, RealmService_IsMemberWithRole_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *realmServiceClient) LoadMemberAccount(ctx context.Context, in *LoadMemberAccountRequest, opts ...grpc.CallOption) (*RealmMember, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(RealmMember)
err := c.cc.Invoke(ctx, RealmService_LoadMemberAccount_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *realmServiceClient) LoadMemberAccounts(ctx context.Context, in *LoadMemberAccountsRequest, opts ...grpc.CallOption) (*LoadMemberAccountsResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(LoadMemberAccountsResponse)
err := c.cc.Invoke(ctx, RealmService_LoadMemberAccounts_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// RealmServiceServer is the server API for RealmService service.
// All implementations must embed UnimplementedRealmServiceServer
// for forward compatibility.
type RealmServiceServer interface {
// Get realm by id or slug
GetRealm(context.Context, *GetRealmRequest) (*Realm, error)
// Get realm batch by ids
GetRealmBatch(context.Context, *GetRealmBatchRequest) (*GetRealmBatchResponse, error)
// Get realms for a user
GetUserRealms(context.Context, *GetUserRealmsRequest) (*GetUserRealmsResponse, error)
// Get public realms
GetPublicRealms(context.Context, *GetPublicRealmsRequest) (*GetPublicRealmsResponse, error)
// Search public realms
SearchRealms(context.Context, *SearchRealmsRequest) (*GetPublicRealmsResponse, error)
// Send invitation notification
SendInviteNotify(context.Context, *SendInviteNotifyRequest) (*emptypb.Empty, error)
// Check if member has required role
IsMemberWithRole(context.Context, *IsMemberWithRoleRequest) (*wrapperspb.BoolValue, error)
// Load account for a member
LoadMemberAccount(context.Context, *LoadMemberAccountRequest) (*RealmMember, error)
// Load accounts for members
LoadMemberAccounts(context.Context, *LoadMemberAccountsRequest) (*LoadMemberAccountsResponse, error)
mustEmbedUnimplementedRealmServiceServer()
}
// UnimplementedRealmServiceServer 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 UnimplementedRealmServiceServer struct{}
func (UnimplementedRealmServiceServer) GetRealm(context.Context, *GetRealmRequest) (*Realm, error) {
return nil, status.Error(codes.Unimplemented, "method GetRealm not implemented")
}
func (UnimplementedRealmServiceServer) GetRealmBatch(context.Context, *GetRealmBatchRequest) (*GetRealmBatchResponse, error) {
return nil, status.Error(codes.Unimplemented, "method GetRealmBatch not implemented")
}
func (UnimplementedRealmServiceServer) GetUserRealms(context.Context, *GetUserRealmsRequest) (*GetUserRealmsResponse, error) {
return nil, status.Error(codes.Unimplemented, "method GetUserRealms not implemented")
}
func (UnimplementedRealmServiceServer) GetPublicRealms(context.Context, *GetPublicRealmsRequest) (*GetPublicRealmsResponse, error) {
return nil, status.Error(codes.Unimplemented, "method GetPublicRealms not implemented")
}
func (UnimplementedRealmServiceServer) SearchRealms(context.Context, *SearchRealmsRequest) (*GetPublicRealmsResponse, error) {
return nil, status.Error(codes.Unimplemented, "method SearchRealms not implemented")
}
func (UnimplementedRealmServiceServer) SendInviteNotify(context.Context, *SendInviteNotifyRequest) (*emptypb.Empty, error) {
return nil, status.Error(codes.Unimplemented, "method SendInviteNotify not implemented")
}
func (UnimplementedRealmServiceServer) IsMemberWithRole(context.Context, *IsMemberWithRoleRequest) (*wrapperspb.BoolValue, error) {
return nil, status.Error(codes.Unimplemented, "method IsMemberWithRole not implemented")
}
func (UnimplementedRealmServiceServer) LoadMemberAccount(context.Context, *LoadMemberAccountRequest) (*RealmMember, error) {
return nil, status.Error(codes.Unimplemented, "method LoadMemberAccount not implemented")
}
func (UnimplementedRealmServiceServer) LoadMemberAccounts(context.Context, *LoadMemberAccountsRequest) (*LoadMemberAccountsResponse, error) {
return nil, status.Error(codes.Unimplemented, "method LoadMemberAccounts not implemented")
}
func (UnimplementedRealmServiceServer) mustEmbedUnimplementedRealmServiceServer() {}
func (UnimplementedRealmServiceServer) testEmbeddedByValue() {}
// UnsafeRealmServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to RealmServiceServer will
// result in compilation errors.
type UnsafeRealmServiceServer interface {
mustEmbedUnimplementedRealmServiceServer()
}
func RegisterRealmServiceServer(s grpc.ServiceRegistrar, srv RealmServiceServer) {
// If the following call panics, it indicates UnimplementedRealmServiceServer 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(&RealmService_ServiceDesc, srv)
}
func _RealmService_GetRealm_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetRealmRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(RealmServiceServer).GetRealm(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: RealmService_GetRealm_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(RealmServiceServer).GetRealm(ctx, req.(*GetRealmRequest))
}
return interceptor(ctx, in, info, handler)
}
func _RealmService_GetRealmBatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetRealmBatchRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(RealmServiceServer).GetRealmBatch(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: RealmService_GetRealmBatch_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(RealmServiceServer).GetRealmBatch(ctx, req.(*GetRealmBatchRequest))
}
return interceptor(ctx, in, info, handler)
}
func _RealmService_GetUserRealms_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetUserRealmsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(RealmServiceServer).GetUserRealms(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: RealmService_GetUserRealms_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(RealmServiceServer).GetUserRealms(ctx, req.(*GetUserRealmsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _RealmService_GetPublicRealms_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetPublicRealmsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(RealmServiceServer).GetPublicRealms(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: RealmService_GetPublicRealms_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(RealmServiceServer).GetPublicRealms(ctx, req.(*GetPublicRealmsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _RealmService_SearchRealms_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SearchRealmsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(RealmServiceServer).SearchRealms(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: RealmService_SearchRealms_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(RealmServiceServer).SearchRealms(ctx, req.(*SearchRealmsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _RealmService_SendInviteNotify_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SendInviteNotifyRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(RealmServiceServer).SendInviteNotify(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: RealmService_SendInviteNotify_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(RealmServiceServer).SendInviteNotify(ctx, req.(*SendInviteNotifyRequest))
}
return interceptor(ctx, in, info, handler)
}
func _RealmService_IsMemberWithRole_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(IsMemberWithRoleRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(RealmServiceServer).IsMemberWithRole(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: RealmService_IsMemberWithRole_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(RealmServiceServer).IsMemberWithRole(ctx, req.(*IsMemberWithRoleRequest))
}
return interceptor(ctx, in, info, handler)
}
func _RealmService_LoadMemberAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(LoadMemberAccountRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(RealmServiceServer).LoadMemberAccount(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: RealmService_LoadMemberAccount_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(RealmServiceServer).LoadMemberAccount(ctx, req.(*LoadMemberAccountRequest))
}
return interceptor(ctx, in, info, handler)
}
func _RealmService_LoadMemberAccounts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(LoadMemberAccountsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(RealmServiceServer).LoadMemberAccounts(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: RealmService_LoadMemberAccounts_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(RealmServiceServer).LoadMemberAccounts(ctx, req.(*LoadMemberAccountsRequest))
}
return interceptor(ctx, in, info, handler)
}
// RealmService_ServiceDesc is the grpc.ServiceDesc for RealmService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var RealmService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "proto.RealmService",
HandlerType: (*RealmServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetRealm",
Handler: _RealmService_GetRealm_Handler,
},
{
MethodName: "GetRealmBatch",
Handler: _RealmService_GetRealmBatch_Handler,
},
{
MethodName: "GetUserRealms",
Handler: _RealmService_GetUserRealms_Handler,
},
{
MethodName: "GetPublicRealms",
Handler: _RealmService_GetPublicRealms_Handler,
},
{
MethodName: "SearchRealms",
Handler: _RealmService_SearchRealms_Handler,
},
{
MethodName: "SendInviteNotify",
Handler: _RealmService_SendInviteNotify_Handler,
},
{
MethodName: "IsMemberWithRole",
Handler: _RealmService_IsMemberWithRole_Handler,
},
{
MethodName: "LoadMemberAccount",
Handler: _RealmService_LoadMemberAccount_Handler,
},
{
MethodName: "LoadMemberAccounts",
Handler: _RealmService_LoadMemberAccounts_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "realm.proto",
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,588 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.6.0
// - protoc v6.33.1
// source: ring.proto
package gen
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
emptypb "google.golang.org/protobuf/types/known/emptypb"
)
// 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 (
RingService_SendEmail_FullMethodName = "/proto.RingService/SendEmail"
RingService_PushWebSocketPacket_FullMethodName = "/proto.RingService/PushWebSocketPacket"
RingService_PushWebSocketPacketToUsers_FullMethodName = "/proto.RingService/PushWebSocketPacketToUsers"
RingService_PushWebSocketPacketToDevice_FullMethodName = "/proto.RingService/PushWebSocketPacketToDevice"
RingService_PushWebSocketPacketToDevices_FullMethodName = "/proto.RingService/PushWebSocketPacketToDevices"
RingService_SendPushNotificationToUser_FullMethodName = "/proto.RingService/SendPushNotificationToUser"
RingService_SendPushNotificationToUsers_FullMethodName = "/proto.RingService/SendPushNotificationToUsers"
RingService_UnsubscribePushNotifications_FullMethodName = "/proto.RingService/UnsubscribePushNotifications"
RingService_GetWebsocketConnectionStatus_FullMethodName = "/proto.RingService/GetWebsocketConnectionStatus"
RingService_GetWebsocketConnectionStatusBatch_FullMethodName = "/proto.RingService/GetWebsocketConnectionStatusBatch"
)
// RingServiceClient is the client API for RingService 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.
//
// RingService provides methods to send various types of notifications.
type RingServiceClient interface {
// Sends an email.
SendEmail(ctx context.Context, in *SendEmailRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
// Pushes a packet to a user via WebSocket.
PushWebSocketPacket(ctx context.Context, in *PushWebSocketPacketRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
// Pushes a packet to a list of users via WebSocket.
PushWebSocketPacketToUsers(ctx context.Context, in *PushWebSocketPacketToUsersRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
// Pushes a packet to a device via WebSocket.
PushWebSocketPacketToDevice(ctx context.Context, in *PushWebSocketPacketToDeviceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
// Pushes a packet to a list of devices via WebSocket.
PushWebSocketPacketToDevices(ctx context.Context, in *PushWebSocketPacketToDevicesRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
// Sends a push notification to a user.
SendPushNotificationToUser(ctx context.Context, in *SendPushNotificationToUserRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
// Sends a push notification to a list of users.
SendPushNotificationToUsers(ctx context.Context, in *SendPushNotificationToUsersRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
// Unsubscribes a device from push notifications.
UnsubscribePushNotifications(ctx context.Context, in *UnsubscribePushNotificationsRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
// Gets the WebSocket connection status for a device or user.
GetWebsocketConnectionStatus(ctx context.Context, in *GetWebsocketConnectionStatusRequest, opts ...grpc.CallOption) (*GetWebsocketConnectionStatusResponse, error)
GetWebsocketConnectionStatusBatch(ctx context.Context, in *GetWebsocketConnectionStatusBatchRequest, opts ...grpc.CallOption) (*GetWebsocketConnectionStatusBatchResponse, error)
}
type ringServiceClient struct {
cc grpc.ClientConnInterface
}
func NewRingServiceClient(cc grpc.ClientConnInterface) RingServiceClient {
return &ringServiceClient{cc}
}
func (c *ringServiceClient) SendEmail(ctx context.Context, in *SendEmailRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, RingService_SendEmail_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *ringServiceClient) PushWebSocketPacket(ctx context.Context, in *PushWebSocketPacketRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, RingService_PushWebSocketPacket_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *ringServiceClient) PushWebSocketPacketToUsers(ctx context.Context, in *PushWebSocketPacketToUsersRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, RingService_PushWebSocketPacketToUsers_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *ringServiceClient) PushWebSocketPacketToDevice(ctx context.Context, in *PushWebSocketPacketToDeviceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, RingService_PushWebSocketPacketToDevice_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *ringServiceClient) PushWebSocketPacketToDevices(ctx context.Context, in *PushWebSocketPacketToDevicesRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, RingService_PushWebSocketPacketToDevices_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *ringServiceClient) SendPushNotificationToUser(ctx context.Context, in *SendPushNotificationToUserRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, RingService_SendPushNotificationToUser_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *ringServiceClient) SendPushNotificationToUsers(ctx context.Context, in *SendPushNotificationToUsersRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, RingService_SendPushNotificationToUsers_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *ringServiceClient) UnsubscribePushNotifications(ctx context.Context, in *UnsubscribePushNotificationsRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, RingService_UnsubscribePushNotifications_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *ringServiceClient) GetWebsocketConnectionStatus(ctx context.Context, in *GetWebsocketConnectionStatusRequest, opts ...grpc.CallOption) (*GetWebsocketConnectionStatusResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetWebsocketConnectionStatusResponse)
err := c.cc.Invoke(ctx, RingService_GetWebsocketConnectionStatus_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *ringServiceClient) GetWebsocketConnectionStatusBatch(ctx context.Context, in *GetWebsocketConnectionStatusBatchRequest, opts ...grpc.CallOption) (*GetWebsocketConnectionStatusBatchResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetWebsocketConnectionStatusBatchResponse)
err := c.cc.Invoke(ctx, RingService_GetWebsocketConnectionStatusBatch_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// RingServiceServer is the server API for RingService service.
// All implementations must embed UnimplementedRingServiceServer
// for forward compatibility.
//
// RingService provides methods to send various types of notifications.
type RingServiceServer interface {
// Sends an email.
SendEmail(context.Context, *SendEmailRequest) (*emptypb.Empty, error)
// Pushes a packet to a user via WebSocket.
PushWebSocketPacket(context.Context, *PushWebSocketPacketRequest) (*emptypb.Empty, error)
// Pushes a packet to a list of users via WebSocket.
PushWebSocketPacketToUsers(context.Context, *PushWebSocketPacketToUsersRequest) (*emptypb.Empty, error)
// Pushes a packet to a device via WebSocket.
PushWebSocketPacketToDevice(context.Context, *PushWebSocketPacketToDeviceRequest) (*emptypb.Empty, error)
// Pushes a packet to a list of devices via WebSocket.
PushWebSocketPacketToDevices(context.Context, *PushWebSocketPacketToDevicesRequest) (*emptypb.Empty, error)
// Sends a push notification to a user.
SendPushNotificationToUser(context.Context, *SendPushNotificationToUserRequest) (*emptypb.Empty, error)
// Sends a push notification to a list of users.
SendPushNotificationToUsers(context.Context, *SendPushNotificationToUsersRequest) (*emptypb.Empty, error)
// Unsubscribes a device from push notifications.
UnsubscribePushNotifications(context.Context, *UnsubscribePushNotificationsRequest) (*emptypb.Empty, error)
// Gets the WebSocket connection status for a device or user.
GetWebsocketConnectionStatus(context.Context, *GetWebsocketConnectionStatusRequest) (*GetWebsocketConnectionStatusResponse, error)
GetWebsocketConnectionStatusBatch(context.Context, *GetWebsocketConnectionStatusBatchRequest) (*GetWebsocketConnectionStatusBatchResponse, error)
mustEmbedUnimplementedRingServiceServer()
}
// UnimplementedRingServiceServer 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 UnimplementedRingServiceServer struct{}
func (UnimplementedRingServiceServer) SendEmail(context.Context, *SendEmailRequest) (*emptypb.Empty, error) {
return nil, status.Error(codes.Unimplemented, "method SendEmail not implemented")
}
func (UnimplementedRingServiceServer) PushWebSocketPacket(context.Context, *PushWebSocketPacketRequest) (*emptypb.Empty, error) {
return nil, status.Error(codes.Unimplemented, "method PushWebSocketPacket not implemented")
}
func (UnimplementedRingServiceServer) PushWebSocketPacketToUsers(context.Context, *PushWebSocketPacketToUsersRequest) (*emptypb.Empty, error) {
return nil, status.Error(codes.Unimplemented, "method PushWebSocketPacketToUsers not implemented")
}
func (UnimplementedRingServiceServer) PushWebSocketPacketToDevice(context.Context, *PushWebSocketPacketToDeviceRequest) (*emptypb.Empty, error) {
return nil, status.Error(codes.Unimplemented, "method PushWebSocketPacketToDevice not implemented")
}
func (UnimplementedRingServiceServer) PushWebSocketPacketToDevices(context.Context, *PushWebSocketPacketToDevicesRequest) (*emptypb.Empty, error) {
return nil, status.Error(codes.Unimplemented, "method PushWebSocketPacketToDevices not implemented")
}
func (UnimplementedRingServiceServer) SendPushNotificationToUser(context.Context, *SendPushNotificationToUserRequest) (*emptypb.Empty, error) {
return nil, status.Error(codes.Unimplemented, "method SendPushNotificationToUser not implemented")
}
func (UnimplementedRingServiceServer) SendPushNotificationToUsers(context.Context, *SendPushNotificationToUsersRequest) (*emptypb.Empty, error) {
return nil, status.Error(codes.Unimplemented, "method SendPushNotificationToUsers not implemented")
}
func (UnimplementedRingServiceServer) UnsubscribePushNotifications(context.Context, *UnsubscribePushNotificationsRequest) (*emptypb.Empty, error) {
return nil, status.Error(codes.Unimplemented, "method UnsubscribePushNotifications not implemented")
}
func (UnimplementedRingServiceServer) GetWebsocketConnectionStatus(context.Context, *GetWebsocketConnectionStatusRequest) (*GetWebsocketConnectionStatusResponse, error) {
return nil, status.Error(codes.Unimplemented, "method GetWebsocketConnectionStatus not implemented")
}
func (UnimplementedRingServiceServer) GetWebsocketConnectionStatusBatch(context.Context, *GetWebsocketConnectionStatusBatchRequest) (*GetWebsocketConnectionStatusBatchResponse, error) {
return nil, status.Error(codes.Unimplemented, "method GetWebsocketConnectionStatusBatch not implemented")
}
func (UnimplementedRingServiceServer) mustEmbedUnimplementedRingServiceServer() {}
func (UnimplementedRingServiceServer) testEmbeddedByValue() {}
// UnsafeRingServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to RingServiceServer will
// result in compilation errors.
type UnsafeRingServiceServer interface {
mustEmbedUnimplementedRingServiceServer()
}
func RegisterRingServiceServer(s grpc.ServiceRegistrar, srv RingServiceServer) {
// If the following call panics, it indicates UnimplementedRingServiceServer 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(&RingService_ServiceDesc, srv)
}
func _RingService_SendEmail_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SendEmailRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(RingServiceServer).SendEmail(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: RingService_SendEmail_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(RingServiceServer).SendEmail(ctx, req.(*SendEmailRequest))
}
return interceptor(ctx, in, info, handler)
}
func _RingService_PushWebSocketPacket_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(PushWebSocketPacketRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(RingServiceServer).PushWebSocketPacket(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: RingService_PushWebSocketPacket_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(RingServiceServer).PushWebSocketPacket(ctx, req.(*PushWebSocketPacketRequest))
}
return interceptor(ctx, in, info, handler)
}
func _RingService_PushWebSocketPacketToUsers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(PushWebSocketPacketToUsersRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(RingServiceServer).PushWebSocketPacketToUsers(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: RingService_PushWebSocketPacketToUsers_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(RingServiceServer).PushWebSocketPacketToUsers(ctx, req.(*PushWebSocketPacketToUsersRequest))
}
return interceptor(ctx, in, info, handler)
}
func _RingService_PushWebSocketPacketToDevice_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(PushWebSocketPacketToDeviceRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(RingServiceServer).PushWebSocketPacketToDevice(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: RingService_PushWebSocketPacketToDevice_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(RingServiceServer).PushWebSocketPacketToDevice(ctx, req.(*PushWebSocketPacketToDeviceRequest))
}
return interceptor(ctx, in, info, handler)
}
func _RingService_PushWebSocketPacketToDevices_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(PushWebSocketPacketToDevicesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(RingServiceServer).PushWebSocketPacketToDevices(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: RingService_PushWebSocketPacketToDevices_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(RingServiceServer).PushWebSocketPacketToDevices(ctx, req.(*PushWebSocketPacketToDevicesRequest))
}
return interceptor(ctx, in, info, handler)
}
func _RingService_SendPushNotificationToUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SendPushNotificationToUserRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(RingServiceServer).SendPushNotificationToUser(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: RingService_SendPushNotificationToUser_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(RingServiceServer).SendPushNotificationToUser(ctx, req.(*SendPushNotificationToUserRequest))
}
return interceptor(ctx, in, info, handler)
}
func _RingService_SendPushNotificationToUsers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SendPushNotificationToUsersRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(RingServiceServer).SendPushNotificationToUsers(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: RingService_SendPushNotificationToUsers_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(RingServiceServer).SendPushNotificationToUsers(ctx, req.(*SendPushNotificationToUsersRequest))
}
return interceptor(ctx, in, info, handler)
}
func _RingService_UnsubscribePushNotifications_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UnsubscribePushNotificationsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(RingServiceServer).UnsubscribePushNotifications(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: RingService_UnsubscribePushNotifications_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(RingServiceServer).UnsubscribePushNotifications(ctx, req.(*UnsubscribePushNotificationsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _RingService_GetWebsocketConnectionStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetWebsocketConnectionStatusRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(RingServiceServer).GetWebsocketConnectionStatus(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: RingService_GetWebsocketConnectionStatus_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(RingServiceServer).GetWebsocketConnectionStatus(ctx, req.(*GetWebsocketConnectionStatusRequest))
}
return interceptor(ctx, in, info, handler)
}
func _RingService_GetWebsocketConnectionStatusBatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetWebsocketConnectionStatusBatchRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(RingServiceServer).GetWebsocketConnectionStatusBatch(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: RingService_GetWebsocketConnectionStatusBatch_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(RingServiceServer).GetWebsocketConnectionStatusBatch(ctx, req.(*GetWebsocketConnectionStatusBatchRequest))
}
return interceptor(ctx, in, info, handler)
}
// RingService_ServiceDesc is the grpc.ServiceDesc for RingService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var RingService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "proto.RingService",
HandlerType: (*RingServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "SendEmail",
Handler: _RingService_SendEmail_Handler,
},
{
MethodName: "PushWebSocketPacket",
Handler: _RingService_PushWebSocketPacket_Handler,
},
{
MethodName: "PushWebSocketPacketToUsers",
Handler: _RingService_PushWebSocketPacketToUsers_Handler,
},
{
MethodName: "PushWebSocketPacketToDevice",
Handler: _RingService_PushWebSocketPacketToDevice_Handler,
},
{
MethodName: "PushWebSocketPacketToDevices",
Handler: _RingService_PushWebSocketPacketToDevices_Handler,
},
{
MethodName: "SendPushNotificationToUser",
Handler: _RingService_SendPushNotificationToUser_Handler,
},
{
MethodName: "SendPushNotificationToUsers",
Handler: _RingService_SendPushNotificationToUsers_Handler,
},
{
MethodName: "UnsubscribePushNotifications",
Handler: _RingService_UnsubscribePushNotifications_Handler,
},
{
MethodName: "GetWebsocketConnectionStatus",
Handler: _RingService_GetWebsocketConnectionStatus_Handler,
},
{
MethodName: "GetWebsocketConnectionStatusBatch",
Handler: _RingService_GetWebsocketConnectionStatusBatch_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "ring.proto",
}
const (
RingHandlerService_ReceiveWebSocketPacket_FullMethodName = "/proto.RingHandlerService/ReceiveWebSocketPacket"
)
// RingHandlerServiceClient is the client API for RingHandlerService 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 RingHandlerServiceClient interface {
ReceiveWebSocketPacket(ctx context.Context, in *ReceiveWebSocketPacketRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
}
type ringHandlerServiceClient struct {
cc grpc.ClientConnInterface
}
func NewRingHandlerServiceClient(cc grpc.ClientConnInterface) RingHandlerServiceClient {
return &ringHandlerServiceClient{cc}
}
func (c *ringHandlerServiceClient) ReceiveWebSocketPacket(ctx context.Context, in *ReceiveWebSocketPacketRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, RingHandlerService_ReceiveWebSocketPacket_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// RingHandlerServiceServer is the server API for RingHandlerService service.
// All implementations must embed UnimplementedRingHandlerServiceServer
// for forward compatibility.
type RingHandlerServiceServer interface {
ReceiveWebSocketPacket(context.Context, *ReceiveWebSocketPacketRequest) (*emptypb.Empty, error)
mustEmbedUnimplementedRingHandlerServiceServer()
}
// UnimplementedRingHandlerServiceServer 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 UnimplementedRingHandlerServiceServer struct{}
func (UnimplementedRingHandlerServiceServer) ReceiveWebSocketPacket(context.Context, *ReceiveWebSocketPacketRequest) (*emptypb.Empty, error) {
return nil, status.Error(codes.Unimplemented, "method ReceiveWebSocketPacket not implemented")
}
func (UnimplementedRingHandlerServiceServer) mustEmbedUnimplementedRingHandlerServiceServer() {}
func (UnimplementedRingHandlerServiceServer) testEmbeddedByValue() {}
// UnsafeRingHandlerServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to RingHandlerServiceServer will
// result in compilation errors.
type UnsafeRingHandlerServiceServer interface {
mustEmbedUnimplementedRingHandlerServiceServer()
}
func RegisterRingHandlerServiceServer(s grpc.ServiceRegistrar, srv RingHandlerServiceServer) {
// If the following call panics, it indicates UnimplementedRingHandlerServiceServer 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(&RingHandlerService_ServiceDesc, srv)
}
func _RingHandlerService_ReceiveWebSocketPacket_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ReceiveWebSocketPacketRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(RingHandlerServiceServer).ReceiveWebSocketPacket(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: RingHandlerService_ReceiveWebSocketPacket_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(RingHandlerServiceServer).ReceiveWebSocketPacket(ctx, req.(*ReceiveWebSocketPacketRequest))
}
return interceptor(ctx, in, info, handler)
}
// RingHandlerService_ServiceDesc is the grpc.ServiceDesc for RingHandlerService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var RingHandlerService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "proto.RingHandlerService",
HandlerType: (*RingHandlerServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "ReceiveWebSocketPacket",
Handler: _RingHandlerService_ReceiveWebSocketPacket_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "ring.proto",
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,527 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.6.0
// - protoc v6.33.1
// source: wallet.proto
package gen
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 (
WalletService_GetWallet_FullMethodName = "/proto.WalletService/GetWallet"
WalletService_CreateWallet_FullMethodName = "/proto.WalletService/CreateWallet"
WalletService_GetOrCreateWalletPocket_FullMethodName = "/proto.WalletService/GetOrCreateWalletPocket"
)
// WalletServiceClient is the client API for WalletService 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 WalletServiceClient interface {
GetWallet(ctx context.Context, in *GetWalletRequest, opts ...grpc.CallOption) (*Wallet, error)
CreateWallet(ctx context.Context, in *CreateWalletRequest, opts ...grpc.CallOption) (*Wallet, error)
GetOrCreateWalletPocket(ctx context.Context, in *GetOrCreateWalletPocketRequest, opts ...grpc.CallOption) (*WalletPocket, error)
}
type walletServiceClient struct {
cc grpc.ClientConnInterface
}
func NewWalletServiceClient(cc grpc.ClientConnInterface) WalletServiceClient {
return &walletServiceClient{cc}
}
func (c *walletServiceClient) GetWallet(ctx context.Context, in *GetWalletRequest, opts ...grpc.CallOption) (*Wallet, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Wallet)
err := c.cc.Invoke(ctx, WalletService_GetWallet_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *walletServiceClient) CreateWallet(ctx context.Context, in *CreateWalletRequest, opts ...grpc.CallOption) (*Wallet, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Wallet)
err := c.cc.Invoke(ctx, WalletService_CreateWallet_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *walletServiceClient) GetOrCreateWalletPocket(ctx context.Context, in *GetOrCreateWalletPocketRequest, opts ...grpc.CallOption) (*WalletPocket, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(WalletPocket)
err := c.cc.Invoke(ctx, WalletService_GetOrCreateWalletPocket_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// WalletServiceServer is the server API for WalletService service.
// All implementations must embed UnimplementedWalletServiceServer
// for forward compatibility.
type WalletServiceServer interface {
GetWallet(context.Context, *GetWalletRequest) (*Wallet, error)
CreateWallet(context.Context, *CreateWalletRequest) (*Wallet, error)
GetOrCreateWalletPocket(context.Context, *GetOrCreateWalletPocketRequest) (*WalletPocket, error)
mustEmbedUnimplementedWalletServiceServer()
}
// UnimplementedWalletServiceServer 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 UnimplementedWalletServiceServer struct{}
func (UnimplementedWalletServiceServer) GetWallet(context.Context, *GetWalletRequest) (*Wallet, error) {
return nil, status.Error(codes.Unimplemented, "method GetWallet not implemented")
}
func (UnimplementedWalletServiceServer) CreateWallet(context.Context, *CreateWalletRequest) (*Wallet, error) {
return nil, status.Error(codes.Unimplemented, "method CreateWallet not implemented")
}
func (UnimplementedWalletServiceServer) GetOrCreateWalletPocket(context.Context, *GetOrCreateWalletPocketRequest) (*WalletPocket, error) {
return nil, status.Error(codes.Unimplemented, "method GetOrCreateWalletPocket not implemented")
}
func (UnimplementedWalletServiceServer) mustEmbedUnimplementedWalletServiceServer() {}
func (UnimplementedWalletServiceServer) testEmbeddedByValue() {}
// UnsafeWalletServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to WalletServiceServer will
// result in compilation errors.
type UnsafeWalletServiceServer interface {
mustEmbedUnimplementedWalletServiceServer()
}
func RegisterWalletServiceServer(s grpc.ServiceRegistrar, srv WalletServiceServer) {
// If the following call panics, it indicates UnimplementedWalletServiceServer 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(&WalletService_ServiceDesc, srv)
}
func _WalletService_GetWallet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetWalletRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WalletServiceServer).GetWallet(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: WalletService_GetWallet_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WalletServiceServer).GetWallet(ctx, req.(*GetWalletRequest))
}
return interceptor(ctx, in, info, handler)
}
func _WalletService_CreateWallet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateWalletRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WalletServiceServer).CreateWallet(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: WalletService_CreateWallet_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WalletServiceServer).CreateWallet(ctx, req.(*CreateWalletRequest))
}
return interceptor(ctx, in, info, handler)
}
func _WalletService_GetOrCreateWalletPocket_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetOrCreateWalletPocketRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WalletServiceServer).GetOrCreateWalletPocket(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: WalletService_GetOrCreateWalletPocket_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WalletServiceServer).GetOrCreateWalletPocket(ctx, req.(*GetOrCreateWalletPocketRequest))
}
return interceptor(ctx, in, info, handler)
}
// WalletService_ServiceDesc is the grpc.ServiceDesc for WalletService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var WalletService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "proto.WalletService",
HandlerType: (*WalletServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetWallet",
Handler: _WalletService_GetWallet_Handler,
},
{
MethodName: "CreateWallet",
Handler: _WalletService_CreateWallet_Handler,
},
{
MethodName: "GetOrCreateWalletPocket",
Handler: _WalletService_GetOrCreateWalletPocket_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "wallet.proto",
}
const (
PaymentService_CreateOrder_FullMethodName = "/proto.PaymentService/CreateOrder"
PaymentService_CreateTransactionWithAccount_FullMethodName = "/proto.PaymentService/CreateTransactionWithAccount"
PaymentService_CreateTransaction_FullMethodName = "/proto.PaymentService/CreateTransaction"
PaymentService_CancelOrder_FullMethodName = "/proto.PaymentService/CancelOrder"
PaymentService_RefundOrder_FullMethodName = "/proto.PaymentService/RefundOrder"
PaymentService_Transfer_FullMethodName = "/proto.PaymentService/Transfer"
PaymentService_GetWalletFund_FullMethodName = "/proto.PaymentService/GetWalletFund"
)
// PaymentServiceClient is the client API for PaymentService 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 PaymentServiceClient interface {
CreateOrder(ctx context.Context, in *CreateOrderRequest, opts ...grpc.CallOption) (*Order, error)
CreateTransactionWithAccount(ctx context.Context, in *CreateTransactionWithAccountRequest, opts ...grpc.CallOption) (*Transaction, error)
CreateTransaction(ctx context.Context, in *CreateTransactionRequest, opts ...grpc.CallOption) (*Transaction, error)
CancelOrder(ctx context.Context, in *CancelOrderRequest, opts ...grpc.CallOption) (*Order, error)
RefundOrder(ctx context.Context, in *RefundOrderRequest, opts ...grpc.CallOption) (*RefundOrderResponse, error)
Transfer(ctx context.Context, in *TransferRequest, opts ...grpc.CallOption) (*Transaction, error)
GetWalletFund(ctx context.Context, in *GetWalletFundRequest, opts ...grpc.CallOption) (*WalletFund, error)
}
type paymentServiceClient struct {
cc grpc.ClientConnInterface
}
func NewPaymentServiceClient(cc grpc.ClientConnInterface) PaymentServiceClient {
return &paymentServiceClient{cc}
}
func (c *paymentServiceClient) CreateOrder(ctx context.Context, in *CreateOrderRequest, opts ...grpc.CallOption) (*Order, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Order)
err := c.cc.Invoke(ctx, PaymentService_CreateOrder_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *paymentServiceClient) CreateTransactionWithAccount(ctx context.Context, in *CreateTransactionWithAccountRequest, opts ...grpc.CallOption) (*Transaction, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Transaction)
err := c.cc.Invoke(ctx, PaymentService_CreateTransactionWithAccount_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *paymentServiceClient) CreateTransaction(ctx context.Context, in *CreateTransactionRequest, opts ...grpc.CallOption) (*Transaction, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Transaction)
err := c.cc.Invoke(ctx, PaymentService_CreateTransaction_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *paymentServiceClient) CancelOrder(ctx context.Context, in *CancelOrderRequest, opts ...grpc.CallOption) (*Order, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Order)
err := c.cc.Invoke(ctx, PaymentService_CancelOrder_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *paymentServiceClient) RefundOrder(ctx context.Context, in *RefundOrderRequest, opts ...grpc.CallOption) (*RefundOrderResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(RefundOrderResponse)
err := c.cc.Invoke(ctx, PaymentService_RefundOrder_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *paymentServiceClient) Transfer(ctx context.Context, in *TransferRequest, opts ...grpc.CallOption) (*Transaction, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Transaction)
err := c.cc.Invoke(ctx, PaymentService_Transfer_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *paymentServiceClient) GetWalletFund(ctx context.Context, in *GetWalletFundRequest, opts ...grpc.CallOption) (*WalletFund, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(WalletFund)
err := c.cc.Invoke(ctx, PaymentService_GetWalletFund_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// PaymentServiceServer is the server API for PaymentService service.
// All implementations must embed UnimplementedPaymentServiceServer
// for forward compatibility.
type PaymentServiceServer interface {
CreateOrder(context.Context, *CreateOrderRequest) (*Order, error)
CreateTransactionWithAccount(context.Context, *CreateTransactionWithAccountRequest) (*Transaction, error)
CreateTransaction(context.Context, *CreateTransactionRequest) (*Transaction, error)
CancelOrder(context.Context, *CancelOrderRequest) (*Order, error)
RefundOrder(context.Context, *RefundOrderRequest) (*RefundOrderResponse, error)
Transfer(context.Context, *TransferRequest) (*Transaction, error)
GetWalletFund(context.Context, *GetWalletFundRequest) (*WalletFund, error)
mustEmbedUnimplementedPaymentServiceServer()
}
// UnimplementedPaymentServiceServer 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 UnimplementedPaymentServiceServer struct{}
func (UnimplementedPaymentServiceServer) CreateOrder(context.Context, *CreateOrderRequest) (*Order, error) {
return nil, status.Error(codes.Unimplemented, "method CreateOrder not implemented")
}
func (UnimplementedPaymentServiceServer) CreateTransactionWithAccount(context.Context, *CreateTransactionWithAccountRequest) (*Transaction, error) {
return nil, status.Error(codes.Unimplemented, "method CreateTransactionWithAccount not implemented")
}
func (UnimplementedPaymentServiceServer) CreateTransaction(context.Context, *CreateTransactionRequest) (*Transaction, error) {
return nil, status.Error(codes.Unimplemented, "method CreateTransaction not implemented")
}
func (UnimplementedPaymentServiceServer) CancelOrder(context.Context, *CancelOrderRequest) (*Order, error) {
return nil, status.Error(codes.Unimplemented, "method CancelOrder not implemented")
}
func (UnimplementedPaymentServiceServer) RefundOrder(context.Context, *RefundOrderRequest) (*RefundOrderResponse, error) {
return nil, status.Error(codes.Unimplemented, "method RefundOrder not implemented")
}
func (UnimplementedPaymentServiceServer) Transfer(context.Context, *TransferRequest) (*Transaction, error) {
return nil, status.Error(codes.Unimplemented, "method Transfer not implemented")
}
func (UnimplementedPaymentServiceServer) GetWalletFund(context.Context, *GetWalletFundRequest) (*WalletFund, error) {
return nil, status.Error(codes.Unimplemented, "method GetWalletFund not implemented")
}
func (UnimplementedPaymentServiceServer) mustEmbedUnimplementedPaymentServiceServer() {}
func (UnimplementedPaymentServiceServer) testEmbeddedByValue() {}
// UnsafePaymentServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to PaymentServiceServer will
// result in compilation errors.
type UnsafePaymentServiceServer interface {
mustEmbedUnimplementedPaymentServiceServer()
}
func RegisterPaymentServiceServer(s grpc.ServiceRegistrar, srv PaymentServiceServer) {
// If the following call panics, it indicates UnimplementedPaymentServiceServer 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(&PaymentService_ServiceDesc, srv)
}
func _PaymentService_CreateOrder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateOrderRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PaymentServiceServer).CreateOrder(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PaymentService_CreateOrder_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PaymentServiceServer).CreateOrder(ctx, req.(*CreateOrderRequest))
}
return interceptor(ctx, in, info, handler)
}
func _PaymentService_CreateTransactionWithAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateTransactionWithAccountRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PaymentServiceServer).CreateTransactionWithAccount(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PaymentService_CreateTransactionWithAccount_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PaymentServiceServer).CreateTransactionWithAccount(ctx, req.(*CreateTransactionWithAccountRequest))
}
return interceptor(ctx, in, info, handler)
}
func _PaymentService_CreateTransaction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateTransactionRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PaymentServiceServer).CreateTransaction(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PaymentService_CreateTransaction_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PaymentServiceServer).CreateTransaction(ctx, req.(*CreateTransactionRequest))
}
return interceptor(ctx, in, info, handler)
}
func _PaymentService_CancelOrder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CancelOrderRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PaymentServiceServer).CancelOrder(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PaymentService_CancelOrder_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PaymentServiceServer).CancelOrder(ctx, req.(*CancelOrderRequest))
}
return interceptor(ctx, in, info, handler)
}
func _PaymentService_RefundOrder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(RefundOrderRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PaymentServiceServer).RefundOrder(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PaymentService_RefundOrder_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PaymentServiceServer).RefundOrder(ctx, req.(*RefundOrderRequest))
}
return interceptor(ctx, in, info, handler)
}
func _PaymentService_Transfer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(TransferRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PaymentServiceServer).Transfer(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PaymentService_Transfer_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PaymentServiceServer).Transfer(ctx, req.(*TransferRequest))
}
return interceptor(ctx, in, info, handler)
}
func _PaymentService_GetWalletFund_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetWalletFundRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PaymentServiceServer).GetWalletFund(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PaymentService_GetWalletFund_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PaymentServiceServer).GetWalletFund(ctx, req.(*GetWalletFundRequest))
}
return interceptor(ctx, in, info, handler)
}
// PaymentService_ServiceDesc is the grpc.ServiceDesc for PaymentService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var PaymentService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "proto.PaymentService",
HandlerType: (*PaymentServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "CreateOrder",
Handler: _PaymentService_CreateOrder_Handler,
},
{
MethodName: "CreateTransactionWithAccount",
Handler: _PaymentService_CreateTransactionWithAccount_Handler,
},
{
MethodName: "CreateTransaction",
Handler: _PaymentService_CreateTransaction_Handler,
},
{
MethodName: "CancelOrder",
Handler: _PaymentService_CancelOrder_Handler,
},
{
MethodName: "RefundOrder",
Handler: _PaymentService_RefundOrder_Handler,
},
{
MethodName: "Transfer",
Handler: _PaymentService_Transfer_Handler,
},
{
MethodName: "GetWalletFund",
Handler: _PaymentService_GetWalletFund_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "wallet.proto",
}