2023-11-01 16:21:17 -04:00
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: BUSL-1.1
2022-04-01 13:38:58 -04:00
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
2023-11-01 16:21:17 -04:00
// versions:
2025-05-23 09:42:26 -07:00
// - protoc-gen-go-grpc v1.5.1
2023-11-01 16:21:17 -04:00
// - protoc (unknown)
// source: testing/attribute/v1/attribute.proto
2022-04-01 13:38:58 -04:00
package attribute
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.
2025-05-23 09:42:26 -07:00
// Requires gRPC-Go v1.64.0 or later.
const _ = grpc . SupportPackageIsVersion9
2022-04-01 13:38:58 -04:00
2023-11-01 16:21:17 -04:00
const (
TestResourceService_TestListResource_FullMethodName = "/testing.attribute.v1.TestResourceService/TestListResource"
TestResourceService_TestCreateResource_FullMethodName = "/testing.attribute.v1.TestResourceService/TestCreateResource"
TestResourceService_TestUpdateResource_FullMethodName = "/testing.attribute.v1.TestResourceService/TestUpdateResource"
TestResourceService_TestGetResource_FullMethodName = "/testing.attribute.v1.TestResourceService/TestGetResource"
)
2022-04-01 13:38:58 -04:00
// TestResourceServiceClient is the client API for TestResourceService 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 TestResourceServiceClient interface {
TestListResource ( ctx context . Context , in * TestListResourceRequest , opts ... grpc . CallOption ) ( * TestListResourceResponse , error )
TestCreateResource ( ctx context . Context , in * TestCreateResourceRequest , opts ... grpc . CallOption ) ( * TestCreateResourceResponse , error )
TestUpdateResource ( ctx context . Context , in * TestUpdateResourceRequest , opts ... grpc . CallOption ) ( * TestUpdateResourceResponse , error )
TestGetResource ( ctx context . Context , in * TestGetResourceRequest , opts ... grpc . CallOption ) ( * TestGetResourceResponse , error )
}
type testResourceServiceClient struct {
cc grpc . ClientConnInterface
}
func NewTestResourceServiceClient ( cc grpc . ClientConnInterface ) TestResourceServiceClient {
return & testResourceServiceClient { cc }
}
func ( c * testResourceServiceClient ) TestListResource ( ctx context . Context , in * TestListResourceRequest , opts ... grpc . CallOption ) ( * TestListResourceResponse , error ) {
2025-05-23 09:42:26 -07:00
cOpts := append ([] grpc . CallOption { grpc . StaticMethod ()}, opts ... )
2022-04-01 13:38:58 -04:00
out := new ( TestListResourceResponse )
2025-05-23 09:42:26 -07:00
err := c . cc . Invoke ( ctx , TestResourceService_TestListResource_FullMethodName , in , out , cOpts ... )
2022-04-01 13:38:58 -04:00
if err != nil {
return nil , err
}
return out , nil
}
func ( c * testResourceServiceClient ) TestCreateResource ( ctx context . Context , in * TestCreateResourceRequest , opts ... grpc . CallOption ) ( * TestCreateResourceResponse , error ) {
2025-05-23 09:42:26 -07:00
cOpts := append ([] grpc . CallOption { grpc . StaticMethod ()}, opts ... )
2022-04-01 13:38:58 -04:00
out := new ( TestCreateResourceResponse )
2025-05-23 09:42:26 -07:00
err := c . cc . Invoke ( ctx , TestResourceService_TestCreateResource_FullMethodName , in , out , cOpts ... )
2022-04-01 13:38:58 -04:00
if err != nil {
return nil , err
}
return out , nil
}
func ( c * testResourceServiceClient ) TestUpdateResource ( ctx context . Context , in * TestUpdateResourceRequest , opts ... grpc . CallOption ) ( * TestUpdateResourceResponse , error ) {
2025-05-23 09:42:26 -07:00
cOpts := append ([] grpc . CallOption { grpc . StaticMethod ()}, opts ... )
2022-04-01 13:38:58 -04:00
out := new ( TestUpdateResourceResponse )
2025-05-23 09:42:26 -07:00
err := c . cc . Invoke ( ctx , TestResourceService_TestUpdateResource_FullMethodName , in , out , cOpts ... )
2022-04-01 13:38:58 -04:00
if err != nil {
return nil , err
}
return out , nil
}
func ( c * testResourceServiceClient ) TestGetResource ( ctx context . Context , in * TestGetResourceRequest , opts ... grpc . CallOption ) ( * TestGetResourceResponse , error ) {
2025-05-23 09:42:26 -07:00
cOpts := append ([] grpc . CallOption { grpc . StaticMethod ()}, opts ... )
2022-04-01 13:38:58 -04:00
out := new ( TestGetResourceResponse )
2025-05-23 09:42:26 -07:00
err := c . cc . Invoke ( ctx , TestResourceService_TestGetResource_FullMethodName , in , out , cOpts ... )
2022-04-01 13:38:58 -04:00
if err != nil {
return nil , err
}
return out , nil
}
// TestResourceServiceServer is the server API for TestResourceService service.
// All implementations must embed UnimplementedTestResourceServiceServer
2025-05-23 09:42:26 -07:00
// for forward compatibility.
2022-04-01 13:38:58 -04:00
type TestResourceServiceServer interface {
TestListResource ( context . Context , * TestListResourceRequest ) ( * TestListResourceResponse , error )
TestCreateResource ( context . Context , * TestCreateResourceRequest ) ( * TestCreateResourceResponse , error )
TestUpdateResource ( context . Context , * TestUpdateResourceRequest ) ( * TestUpdateResourceResponse , error )
TestGetResource ( context . Context , * TestGetResourceRequest ) ( * TestGetResourceResponse , error )
mustEmbedUnimplementedTestResourceServiceServer ()
}
2025-05-23 09:42:26 -07:00
// UnimplementedTestResourceServiceServer 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 UnimplementedTestResourceServiceServer struct {}
2022-04-01 13:38:58 -04:00
func ( UnimplementedTestResourceServiceServer ) TestListResource ( context . Context , * TestListResourceRequest ) ( * TestListResourceResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method TestListResource not implemented" )
}
func ( UnimplementedTestResourceServiceServer ) TestCreateResource ( context . Context , * TestCreateResourceRequest ) ( * TestCreateResourceResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method TestCreateResource not implemented" )
}
func ( UnimplementedTestResourceServiceServer ) TestUpdateResource ( context . Context , * TestUpdateResourceRequest ) ( * TestUpdateResourceResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method TestUpdateResource not implemented" )
}
func ( UnimplementedTestResourceServiceServer ) TestGetResource ( context . Context , * TestGetResourceRequest ) ( * TestGetResourceResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method TestGetResource not implemented" )
}
func ( UnimplementedTestResourceServiceServer ) mustEmbedUnimplementedTestResourceServiceServer () {}
2025-05-23 09:42:26 -07:00
func ( UnimplementedTestResourceServiceServer ) testEmbeddedByValue () {}
2022-04-01 13:38:58 -04:00
// UnsafeTestResourceServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to TestResourceServiceServer will
// result in compilation errors.
type UnsafeTestResourceServiceServer interface {
mustEmbedUnimplementedTestResourceServiceServer ()
}
func RegisterTestResourceServiceServer ( s grpc . ServiceRegistrar , srv TestResourceServiceServer ) {
2025-05-23 09:42:26 -07:00
// If the following call pancis, it indicates UnimplementedTestResourceServiceServer 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 ()
}
2022-04-01 13:38:58 -04:00
s . RegisterService ( & TestResourceService_ServiceDesc , srv )
}
func _TestResourceService_TestListResource_Handler ( srv interface {}, ctx context . Context , dec func ( interface {}) error , interceptor grpc . UnaryServerInterceptor ) ( interface {}, error ) {
in := new ( TestListResourceRequest )
if err := dec ( in ); err != nil {
return nil , err
}
if interceptor == nil {
return srv .( TestResourceServiceServer ). TestListResource ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
2023-11-01 16:21:17 -04:00
FullMethod : TestResourceService_TestListResource_FullMethodName ,
2022-04-01 13:38:58 -04:00
}
handler := func ( ctx context . Context , req interface {}) ( interface {}, error ) {
return srv .( TestResourceServiceServer ). TestListResource ( ctx , req .( * TestListResourceRequest ))
}
return interceptor ( ctx , in , info , handler )
}
func _TestResourceService_TestCreateResource_Handler ( srv interface {}, ctx context . Context , dec func ( interface {}) error , interceptor grpc . UnaryServerInterceptor ) ( interface {}, error ) {
in := new ( TestCreateResourceRequest )
if err := dec ( in ); err != nil {
return nil , err
}
if interceptor == nil {
return srv .( TestResourceServiceServer ). TestCreateResource ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
2023-11-01 16:21:17 -04:00
FullMethod : TestResourceService_TestCreateResource_FullMethodName ,
2022-04-01 13:38:58 -04:00
}
handler := func ( ctx context . Context , req interface {}) ( interface {}, error ) {
return srv .( TestResourceServiceServer ). TestCreateResource ( ctx , req .( * TestCreateResourceRequest ))
}
return interceptor ( ctx , in , info , handler )
}
func _TestResourceService_TestUpdateResource_Handler ( srv interface {}, ctx context . Context , dec func ( interface {}) error , interceptor grpc . UnaryServerInterceptor ) ( interface {}, error ) {
in := new ( TestUpdateResourceRequest )
if err := dec ( in ); err != nil {
return nil , err
}
if interceptor == nil {
return srv .( TestResourceServiceServer ). TestUpdateResource ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
2023-11-01 16:21:17 -04:00
FullMethod : TestResourceService_TestUpdateResource_FullMethodName ,
2022-04-01 13:38:58 -04:00
}
handler := func ( ctx context . Context , req interface {}) ( interface {}, error ) {
return srv .( TestResourceServiceServer ). TestUpdateResource ( ctx , req .( * TestUpdateResourceRequest ))
}
return interceptor ( ctx , in , info , handler )
}
func _TestResourceService_TestGetResource_Handler ( srv interface {}, ctx context . Context , dec func ( interface {}) error , interceptor grpc . UnaryServerInterceptor ) ( interface {}, error ) {
in := new ( TestGetResourceRequest )
if err := dec ( in ); err != nil {
return nil , err
}
if interceptor == nil {
return srv .( TestResourceServiceServer ). TestGetResource ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
2023-11-01 16:21:17 -04:00
FullMethod : TestResourceService_TestGetResource_FullMethodName ,
2022-04-01 13:38:58 -04:00
}
handler := func ( ctx context . Context , req interface {}) ( interface {}, error ) {
return srv .( TestResourceServiceServer ). TestGetResource ( ctx , req .( * TestGetResourceRequest ))
}
return interceptor ( ctx , in , info , handler )
}
// TestResourceService_ServiceDesc is the grpc.ServiceDesc for TestResourceService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var TestResourceService_ServiceDesc = grpc . ServiceDesc {
ServiceName : "testing.attribute.v1.TestResourceService" ,
HandlerType : ( * TestResourceServiceServer )( nil ),
Methods : [] grpc . MethodDesc {
{
MethodName : "TestListResource" ,
Handler : _TestResourceService_TestListResource_Handler ,
},
{
MethodName : "TestCreateResource" ,
Handler : _TestResourceService_TestCreateResource_Handler ,
},
{
MethodName : "TestUpdateResource" ,
Handler : _TestResourceService_TestUpdateResource_Handler ,
},
{
MethodName : "TestGetResource" ,
Handler : _TestResourceService_TestGetResource_Handler ,
},
},
Streams : [] grpc . StreamDesc {},
Metadata : "testing/attribute/v1/attribute.proto" ,
}