2022-05-23 14:37:52 +00:00
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc (unknown)
// source: proto/pbpeering/peering.proto
package pbpeering
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.32.0 or later.
const _ = grpc . SupportPackageIsVersion7
// PeeringServiceClient is the client API for PeeringService 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 PeeringServiceClient interface {
GenerateToken ( ctx context . Context , in * GenerateTokenRequest , opts ... grpc . CallOption ) ( * GenerateTokenResponse , error )
2022-06-10 16:10:46 +00:00
Establish ( ctx context . Context , in * EstablishRequest , opts ... grpc . CallOption ) ( * EstablishResponse , error )
2022-05-23 14:37:52 +00:00
PeeringRead ( ctx context . Context , in * PeeringReadRequest , opts ... grpc . CallOption ) ( * PeeringReadResponse , error )
PeeringList ( ctx context . Context , in * PeeringListRequest , opts ... grpc . CallOption ) ( * PeeringListResponse , error )
PeeringDelete ( ctx context . Context , in * PeeringDeleteRequest , opts ... grpc . CallOption ) ( * PeeringDeleteResponse , error )
// TODO(peering): As of writing, this method is only used in tests to set up Peerings in the state store.
// Consider removing if we can find another way to populate state store in peering_endpoint_test.go
PeeringWrite ( ctx context . Context , in * PeeringWriteRequest , opts ... grpc . CallOption ) ( * PeeringWriteResponse , error )
// TODO(peering): Rename this to PeeredServiceRoots? or something like that?
TrustBundleListByService ( ctx context . Context , in * TrustBundleListByServiceRequest , opts ... grpc . CallOption ) ( * TrustBundleListByServiceResponse , error )
2022-05-31 15:54:40 +00:00
TrustBundleRead ( ctx context . Context , in * TrustBundleReadRequest , opts ... grpc . CallOption ) ( * TrustBundleReadResponse , error )
2022-05-23 14:37:52 +00:00
}
type peeringServiceClient struct {
cc grpc . ClientConnInterface
}
func NewPeeringServiceClient ( cc grpc . ClientConnInterface ) PeeringServiceClient {
return & peeringServiceClient { cc }
}
func ( c * peeringServiceClient ) GenerateToken ( ctx context . Context , in * GenerateTokenRequest , opts ... grpc . CallOption ) ( * GenerateTokenResponse , error ) {
out := new ( GenerateTokenResponse )
2022-07-13 16:03:27 +00:00
err := c . cc . Invoke ( ctx , "/hashicorp.consul.internal.peering.PeeringService/GenerateToken" , in , out , opts ... )
2022-05-23 14:37:52 +00:00
if err != nil {
return nil , err
}
return out , nil
}
2022-06-10 16:10:46 +00:00
func ( c * peeringServiceClient ) Establish ( ctx context . Context , in * EstablishRequest , opts ... grpc . CallOption ) ( * EstablishResponse , error ) {
out := new ( EstablishResponse )
2022-07-13 16:03:27 +00:00
err := c . cc . Invoke ( ctx , "/hashicorp.consul.internal.peering.PeeringService/Establish" , in , out , opts ... )
2022-05-23 14:37:52 +00:00
if err != nil {
return nil , err
}
return out , nil
}
func ( c * peeringServiceClient ) PeeringRead ( ctx context . Context , in * PeeringReadRequest , opts ... grpc . CallOption ) ( * PeeringReadResponse , error ) {
out := new ( PeeringReadResponse )
2022-07-13 16:03:27 +00:00
err := c . cc . Invoke ( ctx , "/hashicorp.consul.internal.peering.PeeringService/PeeringRead" , in , out , opts ... )
2022-05-23 14:37:52 +00:00
if err != nil {
return nil , err
}
return out , nil
}
func ( c * peeringServiceClient ) PeeringList ( ctx context . Context , in * PeeringListRequest , opts ... grpc . CallOption ) ( * PeeringListResponse , error ) {
out := new ( PeeringListResponse )
2022-07-13 16:03:27 +00:00
err := c . cc . Invoke ( ctx , "/hashicorp.consul.internal.peering.PeeringService/PeeringList" , in , out , opts ... )
2022-05-23 14:37:52 +00:00
if err != nil {
return nil , err
}
return out , nil
}
func ( c * peeringServiceClient ) PeeringDelete ( ctx context . Context , in * PeeringDeleteRequest , opts ... grpc . CallOption ) ( * PeeringDeleteResponse , error ) {
out := new ( PeeringDeleteResponse )
2022-07-13 16:03:27 +00:00
err := c . cc . Invoke ( ctx , "/hashicorp.consul.internal.peering.PeeringService/PeeringDelete" , in , out , opts ... )
2022-05-23 14:37:52 +00:00
if err != nil {
return nil , err
}
return out , nil
}
func ( c * peeringServiceClient ) PeeringWrite ( ctx context . Context , in * PeeringWriteRequest , opts ... grpc . CallOption ) ( * PeeringWriteResponse , error ) {
out := new ( PeeringWriteResponse )
2022-07-13 16:03:27 +00:00
err := c . cc . Invoke ( ctx , "/hashicorp.consul.internal.peering.PeeringService/PeeringWrite" , in , out , opts ... )
2022-05-23 14:37:52 +00:00
if err != nil {
return nil , err
}
return out , nil
}
func ( c * peeringServiceClient ) TrustBundleListByService ( ctx context . Context , in * TrustBundleListByServiceRequest , opts ... grpc . CallOption ) ( * TrustBundleListByServiceResponse , error ) {
out := new ( TrustBundleListByServiceResponse )
2022-07-13 16:03:27 +00:00
err := c . cc . Invoke ( ctx , "/hashicorp.consul.internal.peering.PeeringService/TrustBundleListByService" , in , out , opts ... )
2022-05-23 14:37:52 +00:00
if err != nil {
return nil , err
}
return out , nil
}
2022-05-31 15:54:40 +00:00
func ( c * peeringServiceClient ) TrustBundleRead ( ctx context . Context , in * TrustBundleReadRequest , opts ... grpc . CallOption ) ( * TrustBundleReadResponse , error ) {
out := new ( TrustBundleReadResponse )
2022-07-13 16:03:27 +00:00
err := c . cc . Invoke ( ctx , "/hashicorp.consul.internal.peering.PeeringService/TrustBundleRead" , in , out , opts ... )
2022-05-31 15:54:40 +00:00
if err != nil {
return nil , err
}
return out , nil
}
2022-05-23 14:37:52 +00:00
// PeeringServiceServer is the server API for PeeringService service.
// All implementations should embed UnimplementedPeeringServiceServer
// for forward compatibility
type PeeringServiceServer interface {
GenerateToken ( context . Context , * GenerateTokenRequest ) ( * GenerateTokenResponse , error )
2022-06-10 16:10:46 +00:00
Establish ( context . Context , * EstablishRequest ) ( * EstablishResponse , error )
2022-05-23 14:37:52 +00:00
PeeringRead ( context . Context , * PeeringReadRequest ) ( * PeeringReadResponse , error )
PeeringList ( context . Context , * PeeringListRequest ) ( * PeeringListResponse , error )
PeeringDelete ( context . Context , * PeeringDeleteRequest ) ( * PeeringDeleteResponse , error )
// TODO(peering): As of writing, this method is only used in tests to set up Peerings in the state store.
// Consider removing if we can find another way to populate state store in peering_endpoint_test.go
PeeringWrite ( context . Context , * PeeringWriteRequest ) ( * PeeringWriteResponse , error )
// TODO(peering): Rename this to PeeredServiceRoots? or something like that?
TrustBundleListByService ( context . Context , * TrustBundleListByServiceRequest ) ( * TrustBundleListByServiceResponse , error )
2022-05-31 15:54:40 +00:00
TrustBundleRead ( context . Context , * TrustBundleReadRequest ) ( * TrustBundleReadResponse , error )
2022-05-23 14:37:52 +00:00
}
// UnimplementedPeeringServiceServer should be embedded to have forward compatible implementations.
type UnimplementedPeeringServiceServer struct {
}
func ( UnimplementedPeeringServiceServer ) GenerateToken ( context . Context , * GenerateTokenRequest ) ( * GenerateTokenResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method GenerateToken not implemented" )
}
2022-06-10 16:10:46 +00:00
func ( UnimplementedPeeringServiceServer ) Establish ( context . Context , * EstablishRequest ) ( * EstablishResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method Establish not implemented" )
2022-05-23 14:37:52 +00:00
}
func ( UnimplementedPeeringServiceServer ) PeeringRead ( context . Context , * PeeringReadRequest ) ( * PeeringReadResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method PeeringRead not implemented" )
}
func ( UnimplementedPeeringServiceServer ) PeeringList ( context . Context , * PeeringListRequest ) ( * PeeringListResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method PeeringList not implemented" )
}
func ( UnimplementedPeeringServiceServer ) PeeringDelete ( context . Context , * PeeringDeleteRequest ) ( * PeeringDeleteResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method PeeringDelete not implemented" )
}
func ( UnimplementedPeeringServiceServer ) PeeringWrite ( context . Context , * PeeringWriteRequest ) ( * PeeringWriteResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method PeeringWrite not implemented" )
}
func ( UnimplementedPeeringServiceServer ) TrustBundleListByService ( context . Context , * TrustBundleListByServiceRequest ) ( * TrustBundleListByServiceResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method TrustBundleListByService not implemented" )
}
2022-05-31 15:54:40 +00:00
func ( UnimplementedPeeringServiceServer ) TrustBundleRead ( context . Context , * TrustBundleReadRequest ) ( * TrustBundleReadResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method TrustBundleRead not implemented" )
}
2022-05-23 14:37:52 +00:00
// UnsafePeeringServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to PeeringServiceServer will
// result in compilation errors.
type UnsafePeeringServiceServer interface {
mustEmbedUnimplementedPeeringServiceServer ( )
}
func RegisterPeeringServiceServer ( s grpc . ServiceRegistrar , srv PeeringServiceServer ) {
s . RegisterService ( & PeeringService_ServiceDesc , srv )
}
func _PeeringService_GenerateToken_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( GenerateTokenRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( PeeringServiceServer ) . GenerateToken ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
2022-07-13 16:03:27 +00:00
FullMethod : "/hashicorp.consul.internal.peering.PeeringService/GenerateToken" ,
2022-05-23 14:37:52 +00:00
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( PeeringServiceServer ) . GenerateToken ( ctx , req . ( * GenerateTokenRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
2022-06-10 16:10:46 +00:00
func _PeeringService_Establish_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( EstablishRequest )
2022-05-23 14:37:52 +00:00
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
2022-06-10 16:10:46 +00:00
return srv . ( PeeringServiceServer ) . Establish ( ctx , in )
2022-05-23 14:37:52 +00:00
}
info := & grpc . UnaryServerInfo {
Server : srv ,
2022-07-13 16:03:27 +00:00
FullMethod : "/hashicorp.consul.internal.peering.PeeringService/Establish" ,
2022-05-23 14:37:52 +00:00
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
2022-06-10 16:10:46 +00:00
return srv . ( PeeringServiceServer ) . Establish ( ctx , req . ( * EstablishRequest ) )
2022-05-23 14:37:52 +00:00
}
return interceptor ( ctx , in , info , handler )
}
func _PeeringService_PeeringRead_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( PeeringReadRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( PeeringServiceServer ) . PeeringRead ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
2022-07-13 16:03:27 +00:00
FullMethod : "/hashicorp.consul.internal.peering.PeeringService/PeeringRead" ,
2022-05-23 14:37:52 +00:00
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( PeeringServiceServer ) . PeeringRead ( ctx , req . ( * PeeringReadRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
func _PeeringService_PeeringList_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( PeeringListRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( PeeringServiceServer ) . PeeringList ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
2022-07-13 16:03:27 +00:00
FullMethod : "/hashicorp.consul.internal.peering.PeeringService/PeeringList" ,
2022-05-23 14:37:52 +00:00
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( PeeringServiceServer ) . PeeringList ( ctx , req . ( * PeeringListRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
func _PeeringService_PeeringDelete_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( PeeringDeleteRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( PeeringServiceServer ) . PeeringDelete ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
2022-07-13 16:03:27 +00:00
FullMethod : "/hashicorp.consul.internal.peering.PeeringService/PeeringDelete" ,
2022-05-23 14:37:52 +00:00
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( PeeringServiceServer ) . PeeringDelete ( ctx , req . ( * PeeringDeleteRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
func _PeeringService_PeeringWrite_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( PeeringWriteRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( PeeringServiceServer ) . PeeringWrite ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
2022-07-13 16:03:27 +00:00
FullMethod : "/hashicorp.consul.internal.peering.PeeringService/PeeringWrite" ,
2022-05-23 14:37:52 +00:00
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( PeeringServiceServer ) . PeeringWrite ( ctx , req . ( * PeeringWriteRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
func _PeeringService_TrustBundleListByService_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( TrustBundleListByServiceRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( PeeringServiceServer ) . TrustBundleListByService ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
2022-07-13 16:03:27 +00:00
FullMethod : "/hashicorp.consul.internal.peering.PeeringService/TrustBundleListByService" ,
2022-05-23 14:37:52 +00:00
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( PeeringServiceServer ) . TrustBundleListByService ( ctx , req . ( * TrustBundleListByServiceRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
2022-05-31 15:54:40 +00:00
func _PeeringService_TrustBundleRead_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( TrustBundleReadRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( PeeringServiceServer ) . TrustBundleRead ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
2022-07-13 16:03:27 +00:00
FullMethod : "/hashicorp.consul.internal.peering.PeeringService/TrustBundleRead" ,
2022-05-31 15:54:40 +00:00
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( PeeringServiceServer ) . TrustBundleRead ( ctx , req . ( * TrustBundleReadRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
2022-05-23 14:37:52 +00:00
// PeeringService_ServiceDesc is the grpc.ServiceDesc for PeeringService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var PeeringService_ServiceDesc = grpc . ServiceDesc {
2022-07-13 16:03:27 +00:00
ServiceName : "hashicorp.consul.internal.peering.PeeringService" ,
2022-05-23 14:37:52 +00:00
HandlerType : ( * PeeringServiceServer ) ( nil ) ,
Methods : [ ] grpc . MethodDesc {
{
MethodName : "GenerateToken" ,
Handler : _PeeringService_GenerateToken_Handler ,
} ,
{
2022-06-10 16:10:46 +00:00
MethodName : "Establish" ,
Handler : _PeeringService_Establish_Handler ,
2022-05-23 14:37:52 +00:00
} ,
{
MethodName : "PeeringRead" ,
Handler : _PeeringService_PeeringRead_Handler ,
} ,
{
MethodName : "PeeringList" ,
Handler : _PeeringService_PeeringList_Handler ,
} ,
{
MethodName : "PeeringDelete" ,
Handler : _PeeringService_PeeringDelete_Handler ,
} ,
{
MethodName : "PeeringWrite" ,
Handler : _PeeringService_PeeringWrite_Handler ,
} ,
{
MethodName : "TrustBundleListByService" ,
Handler : _PeeringService_TrustBundleListByService_Handler ,
} ,
2022-05-31 15:54:40 +00:00
{
MethodName : "TrustBundleRead" ,
Handler : _PeeringService_TrustBundleRead_Handler ,
} ,
2022-05-23 14:37:52 +00:00
} ,
2022-07-08 17:01:13 +00:00
Streams : [ ] grpc . StreamDesc { } ,
2022-05-23 14:37:52 +00:00
Metadata : "proto/pbpeering/peering.proto" ,
}