mirror of
https://github.com/lightninglabs/lightning-terminal.git
synced 2026-08-13 12:33:36 +02:00
245 lines
9.3 KiB
Go
245 lines
9.3 KiB
Go
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|
|
|
package autopilotserverrpc
|
|
|
|
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
|
|
|
|
// AutopilotClient is the client API for Autopilot 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 AutopilotClient interface {
|
|
Terms(ctx context.Context, in *TermsRequest, opts ...grpc.CallOption) (*TermsResponse, error)
|
|
ListFeatures(ctx context.Context, in *ListFeaturesRequest, opts ...grpc.CallOption) (*ListFeaturesResponse, error)
|
|
RegisterSession(ctx context.Context, in *RegisterSessionRequest, opts ...grpc.CallOption) (*RegisterSessionResponse, error)
|
|
ActivateSession(ctx context.Context, in *ActivateSessionRequest, opts ...grpc.CallOption) (*ActivateSessionResponse, error)
|
|
RevokeSession(ctx context.Context, in *RevokeSessionRequest, opts ...grpc.CallOption) (*RevokeSessionResponse, error)
|
|
}
|
|
|
|
type autopilotClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewAutopilotClient(cc grpc.ClientConnInterface) AutopilotClient {
|
|
return &autopilotClient{cc}
|
|
}
|
|
|
|
func (c *autopilotClient) Terms(ctx context.Context, in *TermsRequest, opts ...grpc.CallOption) (*TermsResponse, error) {
|
|
out := new(TermsResponse)
|
|
err := c.cc.Invoke(ctx, "/autopilotserverrpc.Autopilot/Terms", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *autopilotClient) ListFeatures(ctx context.Context, in *ListFeaturesRequest, opts ...grpc.CallOption) (*ListFeaturesResponse, error) {
|
|
out := new(ListFeaturesResponse)
|
|
err := c.cc.Invoke(ctx, "/autopilotserverrpc.Autopilot/ListFeatures", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *autopilotClient) RegisterSession(ctx context.Context, in *RegisterSessionRequest, opts ...grpc.CallOption) (*RegisterSessionResponse, error) {
|
|
out := new(RegisterSessionResponse)
|
|
err := c.cc.Invoke(ctx, "/autopilotserverrpc.Autopilot/RegisterSession", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *autopilotClient) ActivateSession(ctx context.Context, in *ActivateSessionRequest, opts ...grpc.CallOption) (*ActivateSessionResponse, error) {
|
|
out := new(ActivateSessionResponse)
|
|
err := c.cc.Invoke(ctx, "/autopilotserverrpc.Autopilot/ActivateSession", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *autopilotClient) RevokeSession(ctx context.Context, in *RevokeSessionRequest, opts ...grpc.CallOption) (*RevokeSessionResponse, error) {
|
|
out := new(RevokeSessionResponse)
|
|
err := c.cc.Invoke(ctx, "/autopilotserverrpc.Autopilot/RevokeSession", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// AutopilotServer is the server API for Autopilot service.
|
|
// All implementations must embed UnimplementedAutopilotServer
|
|
// for forward compatibility
|
|
type AutopilotServer interface {
|
|
Terms(context.Context, *TermsRequest) (*TermsResponse, error)
|
|
ListFeatures(context.Context, *ListFeaturesRequest) (*ListFeaturesResponse, error)
|
|
RegisterSession(context.Context, *RegisterSessionRequest) (*RegisterSessionResponse, error)
|
|
ActivateSession(context.Context, *ActivateSessionRequest) (*ActivateSessionResponse, error)
|
|
RevokeSession(context.Context, *RevokeSessionRequest) (*RevokeSessionResponse, error)
|
|
mustEmbedUnimplementedAutopilotServer()
|
|
}
|
|
|
|
// UnimplementedAutopilotServer must be embedded to have forward compatible implementations.
|
|
type UnimplementedAutopilotServer struct {
|
|
}
|
|
|
|
func (UnimplementedAutopilotServer) Terms(context.Context, *TermsRequest) (*TermsResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method Terms not implemented")
|
|
}
|
|
func (UnimplementedAutopilotServer) ListFeatures(context.Context, *ListFeaturesRequest) (*ListFeaturesResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method ListFeatures not implemented")
|
|
}
|
|
func (UnimplementedAutopilotServer) RegisterSession(context.Context, *RegisterSessionRequest) (*RegisterSessionResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method RegisterSession not implemented")
|
|
}
|
|
func (UnimplementedAutopilotServer) ActivateSession(context.Context, *ActivateSessionRequest) (*ActivateSessionResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method ActivateSession not implemented")
|
|
}
|
|
func (UnimplementedAutopilotServer) RevokeSession(context.Context, *RevokeSessionRequest) (*RevokeSessionResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method RevokeSession not implemented")
|
|
}
|
|
func (UnimplementedAutopilotServer) mustEmbedUnimplementedAutopilotServer() {}
|
|
|
|
// UnsafeAutopilotServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to AutopilotServer will
|
|
// result in compilation errors.
|
|
type UnsafeAutopilotServer interface {
|
|
mustEmbedUnimplementedAutopilotServer()
|
|
}
|
|
|
|
func RegisterAutopilotServer(s grpc.ServiceRegistrar, srv AutopilotServer) {
|
|
s.RegisterService(&Autopilot_ServiceDesc, srv)
|
|
}
|
|
|
|
func _Autopilot_Terms_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(TermsRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(AutopilotServer).Terms(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/autopilotserverrpc.Autopilot/Terms",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(AutopilotServer).Terms(ctx, req.(*TermsRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Autopilot_ListFeatures_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ListFeaturesRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(AutopilotServer).ListFeatures(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/autopilotserverrpc.Autopilot/ListFeatures",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(AutopilotServer).ListFeatures(ctx, req.(*ListFeaturesRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Autopilot_RegisterSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(RegisterSessionRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(AutopilotServer).RegisterSession(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/autopilotserverrpc.Autopilot/RegisterSession",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(AutopilotServer).RegisterSession(ctx, req.(*RegisterSessionRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Autopilot_ActivateSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ActivateSessionRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(AutopilotServer).ActivateSession(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/autopilotserverrpc.Autopilot/ActivateSession",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(AutopilotServer).ActivateSession(ctx, req.(*ActivateSessionRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Autopilot_RevokeSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(RevokeSessionRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(AutopilotServer).RevokeSession(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/autopilotserverrpc.Autopilot/RevokeSession",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(AutopilotServer).RevokeSession(ctx, req.(*RevokeSessionRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
// Autopilot_ServiceDesc is the grpc.ServiceDesc for Autopilot service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var Autopilot_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "autopilotserverrpc.Autopilot",
|
|
HandlerType: (*AutopilotServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "Terms",
|
|
Handler: _Autopilot_Terms_Handler,
|
|
},
|
|
{
|
|
MethodName: "ListFeatures",
|
|
Handler: _Autopilot_ListFeatures_Handler,
|
|
},
|
|
{
|
|
MethodName: "RegisterSession",
|
|
Handler: _Autopilot_RegisterSession_Handler,
|
|
},
|
|
{
|
|
MethodName: "ActivateSession",
|
|
Handler: _Autopilot_ActivateSession_Handler,
|
|
},
|
|
{
|
|
MethodName: "RevokeSession",
|
|
Handler: _Autopilot_RevokeSession_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "autopilotserver.proto",
|
|
}
|