// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.5.1 // - protoc v6.31.0 // source: dr_resource_idl.proto package dr_resource_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 ( Basic_SoftwareInfo_FullMethodName = "/dr.resource.Basic/SoftwareInfo" ) // BasicClient is the client API for Basic 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 BasicClient interface { SoftwareInfo(ctx context.Context, in *EmptyRequest, opts ...grpc.CallOption) (*SoftwareInfoReply, error) } type basicClient struct { cc grpc.ClientConnInterface } func NewBasicClient(cc grpc.ClientConnInterface) BasicClient { return &basicClient{cc} } func (c *basicClient) SoftwareInfo(ctx context.Context, in *EmptyRequest, opts ...grpc.CallOption) (*SoftwareInfoReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(SoftwareInfoReply) err := c.cc.Invoke(ctx, Basic_SoftwareInfo_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } // BasicServer is the server API for Basic service. // All implementations must embed UnimplementedBasicServer // for forward compatibility. type BasicServer interface { SoftwareInfo(context.Context, *EmptyRequest) (*SoftwareInfoReply, error) mustEmbedUnimplementedBasicServer() } // UnimplementedBasicServer must 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 UnimplementedBasicServer struct{} func (UnimplementedBasicServer) SoftwareInfo(context.Context, *EmptyRequest) (*SoftwareInfoReply, error) { return nil, status.Errorf(codes.Unimplemented, "method SoftwareInfo not implemented") } func (UnimplementedBasicServer) mustEmbedUnimplementedBasicServer() {} func (UnimplementedBasicServer) testEmbeddedByValue() {} // UnsafeBasicServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to BasicServer will // result in compilation errors. type UnsafeBasicServer interface { mustEmbedUnimplementedBasicServer() } func RegisterBasicServer(s grpc.ServiceRegistrar, srv BasicServer) { // If the following call pancis, it indicates UnimplementedBasicServer 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(&Basic_ServiceDesc, srv) } func _Basic_SoftwareInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(EmptyRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(BasicServer).SoftwareInfo(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Basic_SoftwareInfo_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(BasicServer).SoftwareInfo(ctx, req.(*EmptyRequest)) } return interceptor(ctx, in, info, handler) } // Basic_ServiceDesc is the grpc.ServiceDesc for Basic service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var Basic_ServiceDesc = grpc.ServiceDesc{ ServiceName: "dr.resource.Basic", HandlerType: (*BasicServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SoftwareInfo", Handler: _Basic_SoftwareInfo_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "dr_resource_idl.proto", } const ( Config_ConfigOptionList_FullMethodName = "/dr.resource.Config/ConfigOptionList" Config_ConfigList_FullMethodName = "/dr.resource.Config/ConfigList" Config_UpdateConfigItems_FullMethodName = "/dr.resource.Config/UpdateConfigItems" ) // ConfigClient is the client API for Config 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 ConfigClient interface { ConfigOptionList(ctx context.Context, in *ConfigOptionListRequest, opts ...grpc.CallOption) (*ConfigOptionListReply, error) ConfigList(ctx context.Context, in *ConfigListRequest, opts ...grpc.CallOption) (*ConfigListResponse, error) UpdateConfigItems(ctx context.Context, in *ConfigItemRequest, opts ...grpc.CallOption) (*ConfigListResponse, error) } type configClient struct { cc grpc.ClientConnInterface } func NewConfigClient(cc grpc.ClientConnInterface) ConfigClient { return &configClient{cc} } func (c *configClient) ConfigOptionList(ctx context.Context, in *ConfigOptionListRequest, opts ...grpc.CallOption) (*ConfigOptionListReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ConfigOptionListReply) err := c.cc.Invoke(ctx, Config_ConfigOptionList_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *configClient) ConfigList(ctx context.Context, in *ConfigListRequest, opts ...grpc.CallOption) (*ConfigListResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ConfigListResponse) err := c.cc.Invoke(ctx, Config_ConfigList_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *configClient) UpdateConfigItems(ctx context.Context, in *ConfigItemRequest, opts ...grpc.CallOption) (*ConfigListResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ConfigListResponse) err := c.cc.Invoke(ctx, Config_UpdateConfigItems_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } // ConfigServer is the server API for Config service. // All implementations must embed UnimplementedConfigServer // for forward compatibility. type ConfigServer interface { ConfigOptionList(context.Context, *ConfigOptionListRequest) (*ConfigOptionListReply, error) ConfigList(context.Context, *ConfigListRequest) (*ConfigListResponse, error) UpdateConfigItems(context.Context, *ConfigItemRequest) (*ConfigListResponse, error) mustEmbedUnimplementedConfigServer() } // UnimplementedConfigServer must 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 UnimplementedConfigServer struct{} func (UnimplementedConfigServer) ConfigOptionList(context.Context, *ConfigOptionListRequest) (*ConfigOptionListReply, error) { return nil, status.Errorf(codes.Unimplemented, "method ConfigOptionList not implemented") } func (UnimplementedConfigServer) ConfigList(context.Context, *ConfigListRequest) (*ConfigListResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ConfigList not implemented") } func (UnimplementedConfigServer) UpdateConfigItems(context.Context, *ConfigItemRequest) (*ConfigListResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateConfigItems not implemented") } func (UnimplementedConfigServer) mustEmbedUnimplementedConfigServer() {} func (UnimplementedConfigServer) testEmbeddedByValue() {} // UnsafeConfigServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to ConfigServer will // result in compilation errors. type UnsafeConfigServer interface { mustEmbedUnimplementedConfigServer() } func RegisterConfigServer(s grpc.ServiceRegistrar, srv ConfigServer) { // If the following call pancis, it indicates UnimplementedConfigServer 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(&Config_ServiceDesc, srv) } func _Config_ConfigOptionList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ConfigOptionListRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ConfigServer).ConfigOptionList(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Config_ConfigOptionList_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ConfigServer).ConfigOptionList(ctx, req.(*ConfigOptionListRequest)) } return interceptor(ctx, in, info, handler) } func _Config_ConfigList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ConfigListRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ConfigServer).ConfigList(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Config_ConfigList_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ConfigServer).ConfigList(ctx, req.(*ConfigListRequest)) } return interceptor(ctx, in, info, handler) } func _Config_UpdateConfigItems_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ConfigItemRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ConfigServer).UpdateConfigItems(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Config_UpdateConfigItems_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ConfigServer).UpdateConfigItems(ctx, req.(*ConfigItemRequest)) } return interceptor(ctx, in, info, handler) } // Config_ServiceDesc is the grpc.ServiceDesc for Config service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var Config_ServiceDesc = grpc.ServiceDesc{ ServiceName: "dr.resource.Config", HandlerType: (*ConfigServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "ConfigOptionList", Handler: _Config_ConfigOptionList_Handler, }, { MethodName: "ConfigList", Handler: _Config_ConfigList_Handler, }, { MethodName: "UpdateConfigItems", Handler: _Config_UpdateConfigItems_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "dr_resource_idl.proto", }