proto

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IPFilter_CheckIP_FullMethodName = "/proto.IPFilter/CheckIP"
	IPFilter_Reload_FullMethodName  = "/proto.IPFilter/Reload"
)

Variables

View Source
var File_proto_ipfilter_proto protoreflect.FileDescriptor
View Source
var IPFilter_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "proto.IPFilter",
	HandlerType: (*IPFilterServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CheckIP",
			Handler:    _IPFilter_CheckIP_Handler,
		},
		{
			MethodName: "Reload",
			Handler:    _IPFilter_Reload_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "proto/ipfilter.proto",
}

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

Functions

func RegisterIPFilterServer

func RegisterIPFilterServer(s grpc.ServiceRegistrar, srv IPFilterServer)

Types

type CheckIPRequest

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

func (*CheckIPRequest) Descriptor deprecated

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

Deprecated: Use CheckIPRequest.ProtoReflect.Descriptor instead.

func (*CheckIPRequest) GetIp

func (x *CheckIPRequest) GetIp() string

func (*CheckIPRequest) GetProtocol added in v0.1.3

func (x *CheckIPRequest) GetProtocol() string

func (*CheckIPRequest) ProtoMessage

func (*CheckIPRequest) ProtoMessage()

func (*CheckIPRequest) ProtoReflect

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

func (*CheckIPRequest) Reset

func (x *CheckIPRequest) Reset()

func (*CheckIPRequest) String

func (x *CheckIPRequest) String() string

type IPFilterClient

type IPFilterClient interface {
	CheckIP(ctx context.Context, in *CheckIPRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	Reload(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

IPFilterClient is the client API for IPFilter 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 NewIPFilterClient

func NewIPFilterClient(cc grpc.ClientConnInterface) IPFilterClient

type IPFilterServer

type IPFilterServer interface {
	CheckIP(context.Context, *CheckIPRequest) (*emptypb.Empty, error)
	Reload(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
}

IPFilterServer is the server API for IPFilter service. All implementations should embed UnimplementedIPFilterServer for forward compatibility

type UnimplementedIPFilterServer

type UnimplementedIPFilterServer struct {
}

UnimplementedIPFilterServer should be embedded to have forward compatible implementations.

func (UnimplementedIPFilterServer) CheckIP

func (UnimplementedIPFilterServer) Reload

type UnsafeIPFilterServer added in v0.1.3

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

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

Jump to

Keyboard shortcuts

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