272 lines
13 KiB
Go
272 lines
13 KiB
Go
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|
// versions:
|
|
// - protoc-gen-go-grpc v1.5.1
|
|
// - protoc v3.21.12
|
|
// source: service_httpdns_rule.proto
|
|
|
|
package pb
|
|
|
|
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.64.0 or later.
|
|
const _ = grpc.SupportPackageIsVersion9
|
|
|
|
const (
|
|
HTTPDNSRuleService_CreateHTTPDNSCustomRule_FullMethodName = "/pb.HTTPDNSRuleService/createHTTPDNSCustomRule"
|
|
HTTPDNSRuleService_UpdateHTTPDNSCustomRule_FullMethodName = "/pb.HTTPDNSRuleService/updateHTTPDNSCustomRule"
|
|
HTTPDNSRuleService_DeleteHTTPDNSCustomRule_FullMethodName = "/pb.HTTPDNSRuleService/deleteHTTPDNSCustomRule"
|
|
HTTPDNSRuleService_UpdateHTTPDNSCustomRuleStatus_FullMethodName = "/pb.HTTPDNSRuleService/updateHTTPDNSCustomRuleStatus"
|
|
HTTPDNSRuleService_ListHTTPDNSCustomRulesWithDomainId_FullMethodName = "/pb.HTTPDNSRuleService/listHTTPDNSCustomRulesWithDomainId"
|
|
)
|
|
|
|
// HTTPDNSRuleServiceClient is the client API for HTTPDNSRuleService 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 HTTPDNSRuleServiceClient interface {
|
|
CreateHTTPDNSCustomRule(ctx context.Context, in *CreateHTTPDNSCustomRuleRequest, opts ...grpc.CallOption) (*CreateHTTPDNSCustomRuleResponse, error)
|
|
UpdateHTTPDNSCustomRule(ctx context.Context, in *UpdateHTTPDNSCustomRuleRequest, opts ...grpc.CallOption) (*RPCSuccess, error)
|
|
DeleteHTTPDNSCustomRule(ctx context.Context, in *DeleteHTTPDNSCustomRuleRequest, opts ...grpc.CallOption) (*RPCSuccess, error)
|
|
UpdateHTTPDNSCustomRuleStatus(ctx context.Context, in *UpdateHTTPDNSCustomRuleStatusRequest, opts ...grpc.CallOption) (*RPCSuccess, error)
|
|
ListHTTPDNSCustomRulesWithDomainId(ctx context.Context, in *ListHTTPDNSCustomRulesWithDomainIdRequest, opts ...grpc.CallOption) (*ListHTTPDNSCustomRulesWithDomainIdResponse, error)
|
|
}
|
|
|
|
type hTTPDNSRuleServiceClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewHTTPDNSRuleServiceClient(cc grpc.ClientConnInterface) HTTPDNSRuleServiceClient {
|
|
return &hTTPDNSRuleServiceClient{cc}
|
|
}
|
|
|
|
func (c *hTTPDNSRuleServiceClient) CreateHTTPDNSCustomRule(ctx context.Context, in *CreateHTTPDNSCustomRuleRequest, opts ...grpc.CallOption) (*CreateHTTPDNSCustomRuleResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(CreateHTTPDNSCustomRuleResponse)
|
|
err := c.cc.Invoke(ctx, HTTPDNSRuleService_CreateHTTPDNSCustomRule_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *hTTPDNSRuleServiceClient) UpdateHTTPDNSCustomRule(ctx context.Context, in *UpdateHTTPDNSCustomRuleRequest, opts ...grpc.CallOption) (*RPCSuccess, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(RPCSuccess)
|
|
err := c.cc.Invoke(ctx, HTTPDNSRuleService_UpdateHTTPDNSCustomRule_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *hTTPDNSRuleServiceClient) DeleteHTTPDNSCustomRule(ctx context.Context, in *DeleteHTTPDNSCustomRuleRequest, opts ...grpc.CallOption) (*RPCSuccess, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(RPCSuccess)
|
|
err := c.cc.Invoke(ctx, HTTPDNSRuleService_DeleteHTTPDNSCustomRule_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *hTTPDNSRuleServiceClient) UpdateHTTPDNSCustomRuleStatus(ctx context.Context, in *UpdateHTTPDNSCustomRuleStatusRequest, opts ...grpc.CallOption) (*RPCSuccess, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(RPCSuccess)
|
|
err := c.cc.Invoke(ctx, HTTPDNSRuleService_UpdateHTTPDNSCustomRuleStatus_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *hTTPDNSRuleServiceClient) ListHTTPDNSCustomRulesWithDomainId(ctx context.Context, in *ListHTTPDNSCustomRulesWithDomainIdRequest, opts ...grpc.CallOption) (*ListHTTPDNSCustomRulesWithDomainIdResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(ListHTTPDNSCustomRulesWithDomainIdResponse)
|
|
err := c.cc.Invoke(ctx, HTTPDNSRuleService_ListHTTPDNSCustomRulesWithDomainId_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// HTTPDNSRuleServiceServer is the server API for HTTPDNSRuleService service.
|
|
// All implementations should embed UnimplementedHTTPDNSRuleServiceServer
|
|
// for forward compatibility.
|
|
type HTTPDNSRuleServiceServer interface {
|
|
CreateHTTPDNSCustomRule(context.Context, *CreateHTTPDNSCustomRuleRequest) (*CreateHTTPDNSCustomRuleResponse, error)
|
|
UpdateHTTPDNSCustomRule(context.Context, *UpdateHTTPDNSCustomRuleRequest) (*RPCSuccess, error)
|
|
DeleteHTTPDNSCustomRule(context.Context, *DeleteHTTPDNSCustomRuleRequest) (*RPCSuccess, error)
|
|
UpdateHTTPDNSCustomRuleStatus(context.Context, *UpdateHTTPDNSCustomRuleStatusRequest) (*RPCSuccess, error)
|
|
ListHTTPDNSCustomRulesWithDomainId(context.Context, *ListHTTPDNSCustomRulesWithDomainIdRequest) (*ListHTTPDNSCustomRulesWithDomainIdResponse, error)
|
|
}
|
|
|
|
// UnimplementedHTTPDNSRuleServiceServer should be embedded to have
|
|
// forward compatible implementations.
|
|
//
|
|
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
|
// pointer dereference when methods are called.
|
|
type UnimplementedHTTPDNSRuleServiceServer struct{}
|
|
|
|
func (UnimplementedHTTPDNSRuleServiceServer) CreateHTTPDNSCustomRule(context.Context, *CreateHTTPDNSCustomRuleRequest) (*CreateHTTPDNSCustomRuleResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method CreateHTTPDNSCustomRule not implemented")
|
|
}
|
|
func (UnimplementedHTTPDNSRuleServiceServer) UpdateHTTPDNSCustomRule(context.Context, *UpdateHTTPDNSCustomRuleRequest) (*RPCSuccess, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method UpdateHTTPDNSCustomRule not implemented")
|
|
}
|
|
func (UnimplementedHTTPDNSRuleServiceServer) DeleteHTTPDNSCustomRule(context.Context, *DeleteHTTPDNSCustomRuleRequest) (*RPCSuccess, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method DeleteHTTPDNSCustomRule not implemented")
|
|
}
|
|
func (UnimplementedHTTPDNSRuleServiceServer) UpdateHTTPDNSCustomRuleStatus(context.Context, *UpdateHTTPDNSCustomRuleStatusRequest) (*RPCSuccess, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method UpdateHTTPDNSCustomRuleStatus not implemented")
|
|
}
|
|
func (UnimplementedHTTPDNSRuleServiceServer) ListHTTPDNSCustomRulesWithDomainId(context.Context, *ListHTTPDNSCustomRulesWithDomainIdRequest) (*ListHTTPDNSCustomRulesWithDomainIdResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method ListHTTPDNSCustomRulesWithDomainId not implemented")
|
|
}
|
|
func (UnimplementedHTTPDNSRuleServiceServer) testEmbeddedByValue() {}
|
|
|
|
// UnsafeHTTPDNSRuleServiceServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to HTTPDNSRuleServiceServer will
|
|
// result in compilation errors.
|
|
type UnsafeHTTPDNSRuleServiceServer interface {
|
|
mustEmbedUnimplementedHTTPDNSRuleServiceServer()
|
|
}
|
|
|
|
func RegisterHTTPDNSRuleServiceServer(s grpc.ServiceRegistrar, srv HTTPDNSRuleServiceServer) {
|
|
// If the following call pancis, it indicates UnimplementedHTTPDNSRuleServiceServer was
|
|
// embedded by pointer and is nil. This will cause panics if an
|
|
// unimplemented method is ever invoked, so we test this at initialization
|
|
// time to prevent it from happening at runtime later due to I/O.
|
|
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
|
t.testEmbeddedByValue()
|
|
}
|
|
s.RegisterService(&HTTPDNSRuleService_ServiceDesc, srv)
|
|
}
|
|
|
|
func _HTTPDNSRuleService_CreateHTTPDNSCustomRule_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(CreateHTTPDNSCustomRuleRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(HTTPDNSRuleServiceServer).CreateHTTPDNSCustomRule(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: HTTPDNSRuleService_CreateHTTPDNSCustomRule_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(HTTPDNSRuleServiceServer).CreateHTTPDNSCustomRule(ctx, req.(*CreateHTTPDNSCustomRuleRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _HTTPDNSRuleService_UpdateHTTPDNSCustomRule_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(UpdateHTTPDNSCustomRuleRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(HTTPDNSRuleServiceServer).UpdateHTTPDNSCustomRule(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: HTTPDNSRuleService_UpdateHTTPDNSCustomRule_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(HTTPDNSRuleServiceServer).UpdateHTTPDNSCustomRule(ctx, req.(*UpdateHTTPDNSCustomRuleRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _HTTPDNSRuleService_DeleteHTTPDNSCustomRule_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(DeleteHTTPDNSCustomRuleRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(HTTPDNSRuleServiceServer).DeleteHTTPDNSCustomRule(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: HTTPDNSRuleService_DeleteHTTPDNSCustomRule_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(HTTPDNSRuleServiceServer).DeleteHTTPDNSCustomRule(ctx, req.(*DeleteHTTPDNSCustomRuleRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _HTTPDNSRuleService_UpdateHTTPDNSCustomRuleStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(UpdateHTTPDNSCustomRuleStatusRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(HTTPDNSRuleServiceServer).UpdateHTTPDNSCustomRuleStatus(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: HTTPDNSRuleService_UpdateHTTPDNSCustomRuleStatus_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(HTTPDNSRuleServiceServer).UpdateHTTPDNSCustomRuleStatus(ctx, req.(*UpdateHTTPDNSCustomRuleStatusRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _HTTPDNSRuleService_ListHTTPDNSCustomRulesWithDomainId_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ListHTTPDNSCustomRulesWithDomainIdRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(HTTPDNSRuleServiceServer).ListHTTPDNSCustomRulesWithDomainId(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: HTTPDNSRuleService_ListHTTPDNSCustomRulesWithDomainId_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(HTTPDNSRuleServiceServer).ListHTTPDNSCustomRulesWithDomainId(ctx, req.(*ListHTTPDNSCustomRulesWithDomainIdRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
// HTTPDNSRuleService_ServiceDesc is the grpc.ServiceDesc for HTTPDNSRuleService service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var HTTPDNSRuleService_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "pb.HTTPDNSRuleService",
|
|
HandlerType: (*HTTPDNSRuleServiceServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "createHTTPDNSCustomRule",
|
|
Handler: _HTTPDNSRuleService_CreateHTTPDNSCustomRule_Handler,
|
|
},
|
|
{
|
|
MethodName: "updateHTTPDNSCustomRule",
|
|
Handler: _HTTPDNSRuleService_UpdateHTTPDNSCustomRule_Handler,
|
|
},
|
|
{
|
|
MethodName: "deleteHTTPDNSCustomRule",
|
|
Handler: _HTTPDNSRuleService_DeleteHTTPDNSCustomRule_Handler,
|
|
},
|
|
{
|
|
MethodName: "updateHTTPDNSCustomRuleStatus",
|
|
Handler: _HTTPDNSRuleService_UpdateHTTPDNSCustomRuleStatus_Handler,
|
|
},
|
|
{
|
|
MethodName: "listHTTPDNSCustomRulesWithDomainId",
|
|
Handler: _HTTPDNSRuleService_ListHTTPDNSCustomRulesWithDomainId_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "service_httpdns_rule.proto",
|
|
}
|