Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterIPFilterServer(s grpc.ServiceRegistrar, srv IPFilterServer)
- type CheckIPRequest
- func (*CheckIPRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CheckIPRequest) GetIp() string
- func (x *CheckIPRequest) GetProtocol() string
- func (*CheckIPRequest) ProtoMessage()
- func (x *CheckIPRequest) ProtoReflect() protoreflect.Message
- func (x *CheckIPRequest) Reset()
- func (x *CheckIPRequest) String() string
- type IPFilterClient
- type IPFilterServer
- type UnimplementedIPFilterServer
- type UnsafeIPFilterServer
Constants ¶
const ( IPFilter_CheckIP_FullMethodName = "/proto.IPFilter/CheckIP" IPFilter_Reload_FullMethodName = "/proto.IPFilter/Reload" )
Variables ¶
var File_proto_ipfilter_proto protoreflect.FileDescriptor
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) CheckIP(context.Context, *CheckIPRequest) (*emptypb.Empty, error)
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.