grpc

package
v1.1.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 20, 2023 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File__2ban_proto protoreflect.FileDescriptor
View Source
var IP2Ban_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "IP2ban",
	HandlerType: (*IP2BanServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "IP",
			Handler:    _IP2Ban_IP_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "2ban.proto",
}

IP2Ban_ServiceDesc is the grpc.ServiceDesc for IP2Ban service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterIP2BanServer

func RegisterIP2BanServer(s grpc.ServiceRegistrar, srv IP2BanServer)

func Start

func Start(runAsDaemon bool)

Types

type IP2BanClient

type IP2BanClient interface {
	IP(ctx context.Context, in *IPStringRequest, opts ...grpc.CallOption) (*OKReply, error)
}

IP2BanClient is the client API for IP2Ban 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.

func NewIP2BanClient

func NewIP2BanClient(cc grpc.ClientConnInterface) IP2BanClient

type IP2BanServer

type IP2BanServer interface {
	IP(context.Context, *IPStringRequest) (*OKReply, error)
	// contains filtered or unexported methods
}

IP2BanServer is the server API for IP2Ban service. All implementations must embed UnimplementedIP2BanServer for forward compatibility

type IPStringRequest

type IPStringRequest struct {
	Ip string `protobuf:"bytes,1,opt,name=ip,proto3" json:"ip,omitempty"`
	// contains filtered or unexported fields
}

func (*IPStringRequest) Descriptor deprecated

func (*IPStringRequest) Descriptor() ([]byte, []int)

Deprecated: Use IPStringRequest.ProtoReflect.Descriptor instead.

func (*IPStringRequest) GetIp

func (x *IPStringRequest) GetIp() string

func (*IPStringRequest) ProtoMessage

func (*IPStringRequest) ProtoMessage()

func (*IPStringRequest) ProtoReflect

func (x *IPStringRequest) ProtoReflect() protoreflect.Message

func (*IPStringRequest) Reset

func (x *IPStringRequest) Reset()

func (*IPStringRequest) String

func (x *IPStringRequest) String() string

type OKReply

type OKReply struct {
	Ok bool `protobuf:"varint,1,opt,name=ok,proto3" json:"ok,omitempty"`
	// contains filtered or unexported fields
}

func (*OKReply) Descriptor deprecated

func (*OKReply) Descriptor() ([]byte, []int)

Deprecated: Use OKReply.ProtoReflect.Descriptor instead.

func (*OKReply) GetOk

func (x *OKReply) GetOk() bool

func (*OKReply) ProtoMessage

func (*OKReply) ProtoMessage()

func (*OKReply) ProtoReflect

func (x *OKReply) ProtoReflect() protoreflect.Message

func (*OKReply) Reset

func (x *OKReply) Reset()

func (*OKReply) String

func (x *OKReply) String() string

type Server

type Server struct {
	UnimplementedIP2BanServer
}

func (*Server) IP

func (s *Server) IP(ctx context.Context, in *IPStringRequest) (*OKReply, error)

nolint

type UnimplementedIP2BanServer

type UnimplementedIP2BanServer struct {
}

UnimplementedIP2BanServer must be embedded to have forward compatible implementations.

func (UnimplementedIP2BanServer) IP

type UnsafeIP2BanServer

type UnsafeIP2BanServer interface {
	// contains filtered or unexported methods
}

UnsafeIP2BanServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to IP2BanServer will result in compilation errors.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL