mirror of
https://github.com/lightninglabs/lightning-terminal.git
synced 2026-08-13 12:33:36 +02:00
165 lines
6.8 KiB
Go
165 lines
6.8 KiB
Go
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|
|
|
package litrpc
|
|
|
|
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
|
|
|
|
// FirewallClient is the client API for Firewall 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 FirewallClient interface {
|
|
// litcli: `actions`
|
|
// ListActions will return a list of actions that have been performed on the
|
|
// node. The actions that will be persisted depends on the value of the
|
|
// `--firewall.request-logger.level` config option. The default value of the
|
|
// option is the "interceptor" mode which will persist only the actions (with
|
|
// all request parameters) made with macaroons with caveats that force them
|
|
// to be checked by an rpc middleware interceptor. If the "all" mode is used
|
|
// then all actions will be persisted but only full request parameters will
|
|
// only be stored if the actions are interceptor actions, otherwise only the
|
|
// URI and timestamp of the actions will be stored. The "full" mode will
|
|
// persist all request data for all actions.
|
|
ListActions(ctx context.Context, in *ListActionsRequest, opts ...grpc.CallOption) (*ListActionsResponse, error)
|
|
// litcli: `privacy`
|
|
// PrivacyMapConversion can be used map real values to their pseudo
|
|
// counterpart and vice versa.
|
|
PrivacyMapConversion(ctx context.Context, in *PrivacyMapConversionRequest, opts ...grpc.CallOption) (*PrivacyMapConversionResponse, error)
|
|
}
|
|
|
|
type firewallClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewFirewallClient(cc grpc.ClientConnInterface) FirewallClient {
|
|
return &firewallClient{cc}
|
|
}
|
|
|
|
func (c *firewallClient) ListActions(ctx context.Context, in *ListActionsRequest, opts ...grpc.CallOption) (*ListActionsResponse, error) {
|
|
out := new(ListActionsResponse)
|
|
err := c.cc.Invoke(ctx, "/litrpc.Firewall/ListActions", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *firewallClient) PrivacyMapConversion(ctx context.Context, in *PrivacyMapConversionRequest, opts ...grpc.CallOption) (*PrivacyMapConversionResponse, error) {
|
|
out := new(PrivacyMapConversionResponse)
|
|
err := c.cc.Invoke(ctx, "/litrpc.Firewall/PrivacyMapConversion", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// FirewallServer is the server API for Firewall service.
|
|
// All implementations must embed UnimplementedFirewallServer
|
|
// for forward compatibility
|
|
type FirewallServer interface {
|
|
// litcli: `actions`
|
|
// ListActions will return a list of actions that have been performed on the
|
|
// node. The actions that will be persisted depends on the value of the
|
|
// `--firewall.request-logger.level` config option. The default value of the
|
|
// option is the "interceptor" mode which will persist only the actions (with
|
|
// all request parameters) made with macaroons with caveats that force them
|
|
// to be checked by an rpc middleware interceptor. If the "all" mode is used
|
|
// then all actions will be persisted but only full request parameters will
|
|
// only be stored if the actions are interceptor actions, otherwise only the
|
|
// URI and timestamp of the actions will be stored. The "full" mode will
|
|
// persist all request data for all actions.
|
|
ListActions(context.Context, *ListActionsRequest) (*ListActionsResponse, error)
|
|
// litcli: `privacy`
|
|
// PrivacyMapConversion can be used map real values to their pseudo
|
|
// counterpart and vice versa.
|
|
PrivacyMapConversion(context.Context, *PrivacyMapConversionRequest) (*PrivacyMapConversionResponse, error)
|
|
mustEmbedUnimplementedFirewallServer()
|
|
}
|
|
|
|
// UnimplementedFirewallServer must be embedded to have forward compatible implementations.
|
|
type UnimplementedFirewallServer struct {
|
|
}
|
|
|
|
func (UnimplementedFirewallServer) ListActions(context.Context, *ListActionsRequest) (*ListActionsResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method ListActions not implemented")
|
|
}
|
|
func (UnimplementedFirewallServer) PrivacyMapConversion(context.Context, *PrivacyMapConversionRequest) (*PrivacyMapConversionResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method PrivacyMapConversion not implemented")
|
|
}
|
|
func (UnimplementedFirewallServer) mustEmbedUnimplementedFirewallServer() {}
|
|
|
|
// UnsafeFirewallServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to FirewallServer will
|
|
// result in compilation errors.
|
|
type UnsafeFirewallServer interface {
|
|
mustEmbedUnimplementedFirewallServer()
|
|
}
|
|
|
|
func RegisterFirewallServer(s grpc.ServiceRegistrar, srv FirewallServer) {
|
|
s.RegisterService(&Firewall_ServiceDesc, srv)
|
|
}
|
|
|
|
func _Firewall_ListActions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ListActionsRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(FirewallServer).ListActions(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/litrpc.Firewall/ListActions",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(FirewallServer).ListActions(ctx, req.(*ListActionsRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Firewall_PrivacyMapConversion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(PrivacyMapConversionRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(FirewallServer).PrivacyMapConversion(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/litrpc.Firewall/PrivacyMapConversion",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(FirewallServer).PrivacyMapConversion(ctx, req.(*PrivacyMapConversionRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
// Firewall_ServiceDesc is the grpc.ServiceDesc for Firewall service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var Firewall_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "litrpc.Firewall",
|
|
HandlerType: (*FirewallServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "ListActions",
|
|
Handler: _Firewall_ListActions_Handler,
|
|
},
|
|
{
|
|
MethodName: "PrivacyMapConversion",
|
|
Handler: _Firewall_PrivacyMapConversion_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "firewall.proto",
|
|
}
|