443 lines
16 KiB
Go
443 lines
16 KiB
Go
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|
// versions:
|
|
// - protoc-gen-go-grpc v1.3.0
|
|
// - protoc v4.24.4
|
|
// source: service_df.proto
|
|
|
|
package pb
|
|
|
|
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.32.0 or later.
|
|
const _ = grpc.SupportPackageIsVersion7
|
|
|
|
const (
|
|
Df_Login_FullMethodName = "/pb.df/Login"
|
|
Df_RefreshToken_FullMethodName = "/pb.df/RefreshToken"
|
|
Df_BlockSession_FullMethodName = "/pb.df/BlockSession"
|
|
Df_GetAccount_FullMethodName = "/pb.df/GetAccount"
|
|
Df_ListSessions_FullMethodName = "/pb.df/ListSessions"
|
|
Df_ListAccounts_FullMethodName = "/pb.df/ListAccounts"
|
|
Df_CreateAccount_FullMethodName = "/pb.df/CreateAccount"
|
|
Df_UpdateAccount_FullMethodName = "/pb.df/UpdateAccount"
|
|
Df_UpdateAccountPrivacy_FullMethodName = "/pb.df/UpdateAccountPrivacy"
|
|
Df_CreatePerson_FullMethodName = "/pb.df/CreatePerson"
|
|
)
|
|
|
|
// DfClient is the client API for Df 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 DfClient interface {
|
|
Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginResponse, error)
|
|
RefreshToken(ctx context.Context, in *RefreshTokenRequest, opts ...grpc.CallOption) (*RefreshTokenResponse, error)
|
|
BlockSession(ctx context.Context, in *BlockSessionRequest, opts ...grpc.CallOption) (*BlockSessionResponse, error)
|
|
GetAccount(ctx context.Context, in *GetAccountRequest, opts ...grpc.CallOption) (*GetAccountResponse, error)
|
|
ListSessions(ctx context.Context, in *ListSessionsRequest, opts ...grpc.CallOption) (*ListSessionsResponse, error)
|
|
ListAccounts(ctx context.Context, in *ListAccountsRequest, opts ...grpc.CallOption) (*ListAccountsResponse, error)
|
|
CreateAccount(ctx context.Context, in *CreateAccountRequest, opts ...grpc.CallOption) (*CreateAccountResponse, error)
|
|
UpdateAccount(ctx context.Context, in *UpdateAccountRequest, opts ...grpc.CallOption) (*UpdateAccountResponse, error)
|
|
UpdateAccountPrivacy(ctx context.Context, in *UpdateAccountPrivacyRequest, opts ...grpc.CallOption) (*UpdateAccountPrivacyResponse, error)
|
|
CreatePerson(ctx context.Context, in *CreatePersonRequest, opts ...grpc.CallOption) (*CreatePersonResponse, error)
|
|
}
|
|
|
|
type dfClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewDfClient(cc grpc.ClientConnInterface) DfClient {
|
|
return &dfClient{cc}
|
|
}
|
|
|
|
func (c *dfClient) Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginResponse, error) {
|
|
out := new(LoginResponse)
|
|
err := c.cc.Invoke(ctx, Df_Login_FullMethodName, in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *dfClient) RefreshToken(ctx context.Context, in *RefreshTokenRequest, opts ...grpc.CallOption) (*RefreshTokenResponse, error) {
|
|
out := new(RefreshTokenResponse)
|
|
err := c.cc.Invoke(ctx, Df_RefreshToken_FullMethodName, in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *dfClient) BlockSession(ctx context.Context, in *BlockSessionRequest, opts ...grpc.CallOption) (*BlockSessionResponse, error) {
|
|
out := new(BlockSessionResponse)
|
|
err := c.cc.Invoke(ctx, Df_BlockSession_FullMethodName, in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *dfClient) GetAccount(ctx context.Context, in *GetAccountRequest, opts ...grpc.CallOption) (*GetAccountResponse, error) {
|
|
out := new(GetAccountResponse)
|
|
err := c.cc.Invoke(ctx, Df_GetAccount_FullMethodName, in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *dfClient) ListSessions(ctx context.Context, in *ListSessionsRequest, opts ...grpc.CallOption) (*ListSessionsResponse, error) {
|
|
out := new(ListSessionsResponse)
|
|
err := c.cc.Invoke(ctx, Df_ListSessions_FullMethodName, in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *dfClient) ListAccounts(ctx context.Context, in *ListAccountsRequest, opts ...grpc.CallOption) (*ListAccountsResponse, error) {
|
|
out := new(ListAccountsResponse)
|
|
err := c.cc.Invoke(ctx, Df_ListAccounts_FullMethodName, in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *dfClient) CreateAccount(ctx context.Context, in *CreateAccountRequest, opts ...grpc.CallOption) (*CreateAccountResponse, error) {
|
|
out := new(CreateAccountResponse)
|
|
err := c.cc.Invoke(ctx, Df_CreateAccount_FullMethodName, in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *dfClient) UpdateAccount(ctx context.Context, in *UpdateAccountRequest, opts ...grpc.CallOption) (*UpdateAccountResponse, error) {
|
|
out := new(UpdateAccountResponse)
|
|
err := c.cc.Invoke(ctx, Df_UpdateAccount_FullMethodName, in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *dfClient) UpdateAccountPrivacy(ctx context.Context, in *UpdateAccountPrivacyRequest, opts ...grpc.CallOption) (*UpdateAccountPrivacyResponse, error) {
|
|
out := new(UpdateAccountPrivacyResponse)
|
|
err := c.cc.Invoke(ctx, Df_UpdateAccountPrivacy_FullMethodName, in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *dfClient) CreatePerson(ctx context.Context, in *CreatePersonRequest, opts ...grpc.CallOption) (*CreatePersonResponse, error) {
|
|
out := new(CreatePersonResponse)
|
|
err := c.cc.Invoke(ctx, Df_CreatePerson_FullMethodName, in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// DfServer is the server API for Df service.
|
|
// All implementations must embed UnimplementedDfServer
|
|
// for forward compatibility
|
|
type DfServer interface {
|
|
Login(context.Context, *LoginRequest) (*LoginResponse, error)
|
|
RefreshToken(context.Context, *RefreshTokenRequest) (*RefreshTokenResponse, error)
|
|
BlockSession(context.Context, *BlockSessionRequest) (*BlockSessionResponse, error)
|
|
GetAccount(context.Context, *GetAccountRequest) (*GetAccountResponse, error)
|
|
ListSessions(context.Context, *ListSessionsRequest) (*ListSessionsResponse, error)
|
|
ListAccounts(context.Context, *ListAccountsRequest) (*ListAccountsResponse, error)
|
|
CreateAccount(context.Context, *CreateAccountRequest) (*CreateAccountResponse, error)
|
|
UpdateAccount(context.Context, *UpdateAccountRequest) (*UpdateAccountResponse, error)
|
|
UpdateAccountPrivacy(context.Context, *UpdateAccountPrivacyRequest) (*UpdateAccountPrivacyResponse, error)
|
|
CreatePerson(context.Context, *CreatePersonRequest) (*CreatePersonResponse, error)
|
|
mustEmbedUnimplementedDfServer()
|
|
}
|
|
|
|
// UnimplementedDfServer must be embedded to have forward compatible implementations.
|
|
type UnimplementedDfServer struct {
|
|
}
|
|
|
|
func (UnimplementedDfServer) Login(context.Context, *LoginRequest) (*LoginResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method Login not implemented")
|
|
}
|
|
func (UnimplementedDfServer) RefreshToken(context.Context, *RefreshTokenRequest) (*RefreshTokenResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method RefreshToken not implemented")
|
|
}
|
|
func (UnimplementedDfServer) BlockSession(context.Context, *BlockSessionRequest) (*BlockSessionResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method BlockSession not implemented")
|
|
}
|
|
func (UnimplementedDfServer) GetAccount(context.Context, *GetAccountRequest) (*GetAccountResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetAccount not implemented")
|
|
}
|
|
func (UnimplementedDfServer) ListSessions(context.Context, *ListSessionsRequest) (*ListSessionsResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method ListSessions not implemented")
|
|
}
|
|
func (UnimplementedDfServer) ListAccounts(context.Context, *ListAccountsRequest) (*ListAccountsResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method ListAccounts not implemented")
|
|
}
|
|
func (UnimplementedDfServer) CreateAccount(context.Context, *CreateAccountRequest) (*CreateAccountResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method CreateAccount not implemented")
|
|
}
|
|
func (UnimplementedDfServer) UpdateAccount(context.Context, *UpdateAccountRequest) (*UpdateAccountResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method UpdateAccount not implemented")
|
|
}
|
|
func (UnimplementedDfServer) UpdateAccountPrivacy(context.Context, *UpdateAccountPrivacyRequest) (*UpdateAccountPrivacyResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method UpdateAccountPrivacy not implemented")
|
|
}
|
|
func (UnimplementedDfServer) CreatePerson(context.Context, *CreatePersonRequest) (*CreatePersonResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method CreatePerson not implemented")
|
|
}
|
|
func (UnimplementedDfServer) mustEmbedUnimplementedDfServer() {}
|
|
|
|
// UnsafeDfServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to DfServer will
|
|
// result in compilation errors.
|
|
type UnsafeDfServer interface {
|
|
mustEmbedUnimplementedDfServer()
|
|
}
|
|
|
|
func RegisterDfServer(s grpc.ServiceRegistrar, srv DfServer) {
|
|
s.RegisterService(&Df_ServiceDesc, srv)
|
|
}
|
|
|
|
func _Df_Login_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(LoginRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(DfServer).Login(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Df_Login_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(DfServer).Login(ctx, req.(*LoginRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Df_RefreshToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(RefreshTokenRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(DfServer).RefreshToken(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Df_RefreshToken_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(DfServer).RefreshToken(ctx, req.(*RefreshTokenRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Df_BlockSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(BlockSessionRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(DfServer).BlockSession(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Df_BlockSession_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(DfServer).BlockSession(ctx, req.(*BlockSessionRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Df_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.(DfServer).GetAccount(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Df_GetAccount_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(DfServer).GetAccount(ctx, req.(*GetAccountRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Df_ListSessions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ListSessionsRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(DfServer).ListSessions(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Df_ListSessions_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(DfServer).ListSessions(ctx, req.(*ListSessionsRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Df_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.(DfServer).ListAccounts(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Df_ListAccounts_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(DfServer).ListAccounts(ctx, req.(*ListAccountsRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Df_CreateAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(CreateAccountRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(DfServer).CreateAccount(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Df_CreateAccount_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(DfServer).CreateAccount(ctx, req.(*CreateAccountRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Df_UpdateAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(UpdateAccountRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(DfServer).UpdateAccount(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Df_UpdateAccount_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(DfServer).UpdateAccount(ctx, req.(*UpdateAccountRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Df_UpdateAccountPrivacy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(UpdateAccountPrivacyRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(DfServer).UpdateAccountPrivacy(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Df_UpdateAccountPrivacy_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(DfServer).UpdateAccountPrivacy(ctx, req.(*UpdateAccountPrivacyRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Df_CreatePerson_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(CreatePersonRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(DfServer).CreatePerson(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Df_CreatePerson_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(DfServer).CreatePerson(ctx, req.(*CreatePersonRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
// Df_ServiceDesc is the grpc.ServiceDesc for Df service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var Df_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "pb.df",
|
|
HandlerType: (*DfServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "Login",
|
|
Handler: _Df_Login_Handler,
|
|
},
|
|
{
|
|
MethodName: "RefreshToken",
|
|
Handler: _Df_RefreshToken_Handler,
|
|
},
|
|
{
|
|
MethodName: "BlockSession",
|
|
Handler: _Df_BlockSession_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetAccount",
|
|
Handler: _Df_GetAccount_Handler,
|
|
},
|
|
{
|
|
MethodName: "ListSessions",
|
|
Handler: _Df_ListSessions_Handler,
|
|
},
|
|
{
|
|
MethodName: "ListAccounts",
|
|
Handler: _Df_ListAccounts_Handler,
|
|
},
|
|
{
|
|
MethodName: "CreateAccount",
|
|
Handler: _Df_CreateAccount_Handler,
|
|
},
|
|
{
|
|
MethodName: "UpdateAccount",
|
|
Handler: _Df_UpdateAccount_Handler,
|
|
},
|
|
{
|
|
MethodName: "UpdateAccountPrivacy",
|
|
Handler: _Df_UpdateAccountPrivacy_Handler,
|
|
},
|
|
{
|
|
MethodName: "CreatePerson",
|
|
Handler: _Df_CreatePerson_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "service_df.proto",
|
|
}
|