2023-11-01 16:21:17 -04:00
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: BUSL-1.1
2020-10-09 13:18:53 -04:00
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
2023-11-01 16:21:17 -04:00
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc (unknown)
// source: controller/servers/services/v1/session_service.proto
2020-10-09 13:18:53 -04:00
package services
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.
2021-02-22 12:46:00 -05:00
// Requires gRPC-Go v1.32.0 or later.
2020-11-11 14:41:05 -05:00
const _ = grpc . SupportPackageIsVersion7
2020-10-09 13:18:53 -04:00
2023-11-01 16:21:17 -04:00
const (
SessionService_LookupSession_FullMethodName = "/controller.servers.services.v1.SessionService/LookupSession"
SessionService_ActivateSession_FullMethodName = "/controller.servers.services.v1.SessionService/ActivateSession"
SessionService_CancelSession_FullMethodName = "/controller.servers.services.v1.SessionService/CancelSession"
SessionService_AuthorizeConnection_FullMethodName = "/controller.servers.services.v1.SessionService/AuthorizeConnection"
SessionService_ConnectConnection_FullMethodName = "/controller.servers.services.v1.SessionService/ConnectConnection"
SessionService_CloseConnection_FullMethodName = "/controller.servers.services.v1.SessionService/CloseConnection"
)
2020-10-09 13:18:53 -04:00
// SessionServiceClient is the client API for SessionService 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 SessionServiceClient interface {
2021-12-17 11:26:42 -08:00
// LookupSession allows a worker to retrieve session information from the
2020-10-09 13:18:53 -04:00
// controller.
LookupSession ( ctx context . Context , in * LookupSessionRequest , opts ... grpc . CallOption ) ( * LookupSessionResponse , error )
// ActivateSession allows a worker to activate a session on a controller.
ActivateSession ( ctx context . Context , in * ActivateSessionRequest , opts ... grpc . CallOption ) ( * ActivateSessionResponse , error )
2020-12-16 17:14:47 -05:00
// CancelSession allows a worker to request that the controller cancel a session.
CancelSession ( ctx context . Context , in * CancelSessionRequest , opts ... grpc . CallOption ) ( * CancelSessionResponse , error )
2021-08-18 15:30:55 +02:00
// AuthorizeConnection allows a worker to authorize a connection on a controller.
2020-10-09 13:18:53 -04:00
AuthorizeConnection ( ctx context . Context , in * AuthorizeConnectionRequest , opts ... grpc . CallOption ) ( * AuthorizeConnectionResponse , error )
// ConnectConnection updates a connection to set it to connected
ConnectConnection ( ctx context . Context , in * ConnectConnectionRequest , opts ... grpc . CallOption ) ( * ConnectConnectionResponse , error )
// CloseConnections updates a connection to set it to closed
CloseConnection ( ctx context . Context , in * CloseConnectionRequest , opts ... grpc . CallOption ) ( * CloseConnectionResponse , error )
}
type sessionServiceClient struct {
cc grpc . ClientConnInterface
}
func NewSessionServiceClient ( cc grpc . ClientConnInterface ) SessionServiceClient {
return & sessionServiceClient { cc }
}
func ( c * sessionServiceClient ) LookupSession ( ctx context . Context , in * LookupSessionRequest , opts ... grpc . CallOption ) ( * LookupSessionResponse , error ) {
out := new ( LookupSessionResponse )
2023-11-01 16:21:17 -04:00
err := c . cc . Invoke ( ctx , SessionService_LookupSession_FullMethodName , in , out , opts ... )
2020-10-09 13:18:53 -04:00
if err != nil {
return nil , err
}
return out , nil
}
func ( c * sessionServiceClient ) ActivateSession ( ctx context . Context , in * ActivateSessionRequest , opts ... grpc . CallOption ) ( * ActivateSessionResponse , error ) {
out := new ( ActivateSessionResponse )
2023-11-01 16:21:17 -04:00
err := c . cc . Invoke ( ctx , SessionService_ActivateSession_FullMethodName , in , out , opts ... )
2020-10-09 13:18:53 -04:00
if err != nil {
return nil , err
}
return out , nil
}
2020-12-16 17:14:47 -05:00
func ( c * sessionServiceClient ) CancelSession ( ctx context . Context , in * CancelSessionRequest , opts ... grpc . CallOption ) ( * CancelSessionResponse , error ) {
out := new ( CancelSessionResponse )
2023-11-01 16:21:17 -04:00
err := c . cc . Invoke ( ctx , SessionService_CancelSession_FullMethodName , in , out , opts ... )
2020-12-16 17:14:47 -05:00
if err != nil {
return nil , err
}
return out , nil
}
2020-10-09 13:18:53 -04:00
func ( c * sessionServiceClient ) AuthorizeConnection ( ctx context . Context , in * AuthorizeConnectionRequest , opts ... grpc . CallOption ) ( * AuthorizeConnectionResponse , error ) {
out := new ( AuthorizeConnectionResponse )
2023-11-01 16:21:17 -04:00
err := c . cc . Invoke ( ctx , SessionService_AuthorizeConnection_FullMethodName , in , out , opts ... )
2020-10-09 13:18:53 -04:00
if err != nil {
return nil , err
}
return out , nil
}
func ( c * sessionServiceClient ) ConnectConnection ( ctx context . Context , in * ConnectConnectionRequest , opts ... grpc . CallOption ) ( * ConnectConnectionResponse , error ) {
out := new ( ConnectConnectionResponse )
2023-11-01 16:21:17 -04:00
err := c . cc . Invoke ( ctx , SessionService_ConnectConnection_FullMethodName , in , out , opts ... )
2020-10-09 13:18:53 -04:00
if err != nil {
return nil , err
}
return out , nil
}
func ( c * sessionServiceClient ) CloseConnection ( ctx context . Context , in * CloseConnectionRequest , opts ... grpc . CallOption ) ( * CloseConnectionResponse , error ) {
out := new ( CloseConnectionResponse )
2023-11-01 16:21:17 -04:00
err := c . cc . Invoke ( ctx , SessionService_CloseConnection_FullMethodName , in , out , opts ... )
2020-10-09 13:18:53 -04:00
if err != nil {
return nil , err
}
return out , nil
}
// SessionServiceServer is the server API for SessionService service.
2020-11-11 14:41:05 -05:00
// All implementations must embed UnimplementedSessionServiceServer
// for forward compatibility
2020-10-09 13:18:53 -04:00
type SessionServiceServer interface {
2021-12-17 11:26:42 -08:00
// LookupSession allows a worker to retrieve session information from the
2020-10-09 13:18:53 -04:00
// controller.
LookupSession ( context . Context , * LookupSessionRequest ) ( * LookupSessionResponse , error )
// ActivateSession allows a worker to activate a session on a controller.
ActivateSession ( context . Context , * ActivateSessionRequest ) ( * ActivateSessionResponse , error )
2020-12-16 17:14:47 -05:00
// CancelSession allows a worker to request that the controller cancel a session.
CancelSession ( context . Context , * CancelSessionRequest ) ( * CancelSessionResponse , error )
2021-08-18 15:30:55 +02:00
// AuthorizeConnection allows a worker to authorize a connection on a controller.
2020-10-09 13:18:53 -04:00
AuthorizeConnection ( context . Context , * AuthorizeConnectionRequest ) ( * AuthorizeConnectionResponse , error )
// ConnectConnection updates a connection to set it to connected
ConnectConnection ( context . Context , * ConnectConnectionRequest ) ( * ConnectConnectionResponse , error )
// CloseConnections updates a connection to set it to closed
CloseConnection ( context . Context , * CloseConnectionRequest ) ( * CloseConnectionResponse , error )
2020-11-11 14:41:05 -05:00
mustEmbedUnimplementedSessionServiceServer ()
2020-10-09 13:18:53 -04:00
}
2020-11-11 14:41:05 -05:00
// UnimplementedSessionServiceServer must be embedded to have forward compatible implementations.
2021-01-08 10:32:02 -05:00
type UnimplementedSessionServiceServer struct {
}
2020-10-09 13:18:53 -04:00
2020-11-11 14:41:05 -05:00
func ( UnimplementedSessionServiceServer ) LookupSession ( context . Context , * LookupSessionRequest ) ( * LookupSessionResponse , error ) {
2020-10-09 13:18:53 -04:00
return nil , status . Errorf ( codes . Unimplemented , "method LookupSession not implemented" )
}
2020-11-11 14:41:05 -05:00
func ( UnimplementedSessionServiceServer ) ActivateSession ( context . Context , * ActivateSessionRequest ) ( * ActivateSessionResponse , error ) {
2020-10-09 13:18:53 -04:00
return nil , status . Errorf ( codes . Unimplemented , "method ActivateSession not implemented" )
}
2020-12-16 17:14:47 -05:00
func ( UnimplementedSessionServiceServer ) CancelSession ( context . Context , * CancelSessionRequest ) ( * CancelSessionResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method CancelSession not implemented" )
}
2020-11-11 14:41:05 -05:00
func ( UnimplementedSessionServiceServer ) AuthorizeConnection ( context . Context , * AuthorizeConnectionRequest ) ( * AuthorizeConnectionResponse , error ) {
2020-10-09 13:18:53 -04:00
return nil , status . Errorf ( codes . Unimplemented , "method AuthorizeConnection not implemented" )
}
2020-11-11 14:41:05 -05:00
func ( UnimplementedSessionServiceServer ) ConnectConnection ( context . Context , * ConnectConnectionRequest ) ( * ConnectConnectionResponse , error ) {
2020-10-09 13:18:53 -04:00
return nil , status . Errorf ( codes . Unimplemented , "method ConnectConnection not implemented" )
}
2020-11-11 14:41:05 -05:00
func ( UnimplementedSessionServiceServer ) CloseConnection ( context . Context , * CloseConnectionRequest ) ( * CloseConnectionResponse , error ) {
2020-10-09 13:18:53 -04:00
return nil , status . Errorf ( codes . Unimplemented , "method CloseConnection not implemented" )
}
2020-11-11 14:41:05 -05:00
func ( UnimplementedSessionServiceServer ) mustEmbedUnimplementedSessionServiceServer () {}
2020-10-09 13:18:53 -04:00
2020-11-11 14:41:05 -05:00
// UnsafeSessionServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to SessionServiceServer will
// result in compilation errors.
type UnsafeSessionServiceServer interface {
mustEmbedUnimplementedSessionServiceServer ()
}
func RegisterSessionServiceServer ( s grpc . ServiceRegistrar , srv SessionServiceServer ) {
2021-02-22 12:46:00 -05:00
s . RegisterService ( & SessionService_ServiceDesc , srv )
2020-10-09 13:18:53 -04:00
}
func _SessionService_LookupSession_Handler ( srv interface {}, ctx context . Context , dec func ( interface {}) error , interceptor grpc . UnaryServerInterceptor ) ( interface {}, error ) {
in := new ( LookupSessionRequest )
if err := dec ( in ); err != nil {
return nil , err
}
if interceptor == nil {
return srv .( SessionServiceServer ). LookupSession ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
2023-11-01 16:21:17 -04:00
FullMethod : SessionService_LookupSession_FullMethodName ,
2020-10-09 13:18:53 -04:00
}
handler := func ( ctx context . Context , req interface {}) ( interface {}, error ) {
return srv .( SessionServiceServer ). LookupSession ( ctx , req .( * LookupSessionRequest ))
}
return interceptor ( ctx , in , info , handler )
}
func _SessionService_ActivateSession_Handler ( srv interface {}, ctx context . Context , dec func ( interface {}) error , interceptor grpc . UnaryServerInterceptor ) ( interface {}, error ) {
in := new ( ActivateSessionRequest )
if err := dec ( in ); err != nil {
return nil , err
}
if interceptor == nil {
return srv .( SessionServiceServer ). ActivateSession ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
2023-11-01 16:21:17 -04:00
FullMethod : SessionService_ActivateSession_FullMethodName ,
2020-10-09 13:18:53 -04:00
}
handler := func ( ctx context . Context , req interface {}) ( interface {}, error ) {
return srv .( SessionServiceServer ). ActivateSession ( ctx , req .( * ActivateSessionRequest ))
}
return interceptor ( ctx , in , info , handler )
}
2020-12-16 17:14:47 -05:00
func _SessionService_CancelSession_Handler ( srv interface {}, ctx context . Context , dec func ( interface {}) error , interceptor grpc . UnaryServerInterceptor ) ( interface {}, error ) {
in := new ( CancelSessionRequest )
if err := dec ( in ); err != nil {
return nil , err
}
if interceptor == nil {
return srv .( SessionServiceServer ). CancelSession ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
2023-11-01 16:21:17 -04:00
FullMethod : SessionService_CancelSession_FullMethodName ,
2020-12-16 17:14:47 -05:00
}
handler := func ( ctx context . Context , req interface {}) ( interface {}, error ) {
return srv .( SessionServiceServer ). CancelSession ( ctx , req .( * CancelSessionRequest ))
}
return interceptor ( ctx , in , info , handler )
}
2020-10-09 13:18:53 -04:00
func _SessionService_AuthorizeConnection_Handler ( srv interface {}, ctx context . Context , dec func ( interface {}) error , interceptor grpc . UnaryServerInterceptor ) ( interface {}, error ) {
in := new ( AuthorizeConnectionRequest )
if err := dec ( in ); err != nil {
return nil , err
}
if interceptor == nil {
return srv .( SessionServiceServer ). AuthorizeConnection ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
2023-11-01 16:21:17 -04:00
FullMethod : SessionService_AuthorizeConnection_FullMethodName ,
2020-10-09 13:18:53 -04:00
}
handler := func ( ctx context . Context , req interface {}) ( interface {}, error ) {
return srv .( SessionServiceServer ). AuthorizeConnection ( ctx , req .( * AuthorizeConnectionRequest ))
}
return interceptor ( ctx , in , info , handler )
}
func _SessionService_ConnectConnection_Handler ( srv interface {}, ctx context . Context , dec func ( interface {}) error , interceptor grpc . UnaryServerInterceptor ) ( interface {}, error ) {
in := new ( ConnectConnectionRequest )
if err := dec ( in ); err != nil {
return nil , err
}
if interceptor == nil {
return srv .( SessionServiceServer ). ConnectConnection ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
2023-11-01 16:21:17 -04:00
FullMethod : SessionService_ConnectConnection_FullMethodName ,
2020-10-09 13:18:53 -04:00
}
handler := func ( ctx context . Context , req interface {}) ( interface {}, error ) {
return srv .( SessionServiceServer ). ConnectConnection ( ctx , req .( * ConnectConnectionRequest ))
}
return interceptor ( ctx , in , info , handler )
}
func _SessionService_CloseConnection_Handler ( srv interface {}, ctx context . Context , dec func ( interface {}) error , interceptor grpc . UnaryServerInterceptor ) ( interface {}, error ) {
in := new ( CloseConnectionRequest )
if err := dec ( in ); err != nil {
return nil , err
}
if interceptor == nil {
return srv .( SessionServiceServer ). CloseConnection ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
2023-11-01 16:21:17 -04:00
FullMethod : SessionService_CloseConnection_FullMethodName ,
2020-10-09 13:18:53 -04:00
}
handler := func ( ctx context . Context , req interface {}) ( interface {}, error ) {
return srv .( SessionServiceServer ). CloseConnection ( ctx , req .( * CloseConnectionRequest ))
}
return interceptor ( ctx , in , info , handler )
}
2021-02-22 12:46:00 -05:00
// SessionService_ServiceDesc is the grpc.ServiceDesc for SessionService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var SessionService_ServiceDesc = grpc . ServiceDesc {
2020-10-09 13:18:53 -04:00
ServiceName : "controller.servers.services.v1.SessionService" ,
HandlerType : ( * SessionServiceServer )( nil ),
Methods : [] grpc . MethodDesc {
{
MethodName : "LookupSession" ,
Handler : _SessionService_LookupSession_Handler ,
},
{
MethodName : "ActivateSession" ,
Handler : _SessionService_ActivateSession_Handler ,
},
2020-12-16 17:14:47 -05:00
{
MethodName : "CancelSession" ,
Handler : _SessionService_CancelSession_Handler ,
},
2020-10-09 13:18:53 -04:00
{
MethodName : "AuthorizeConnection" ,
Handler : _SessionService_AuthorizeConnection_Handler ,
},
{
MethodName : "ConnectConnection" ,
Handler : _SessionService_ConnectConnection_Handler ,
},
{
MethodName : "CloseConnection" ,
Handler : _SessionService_CloseConnection_Handler ,
},
},
Streams : [] grpc . StreamDesc {},
Metadata : "controller/servers/services/v1/session_service.proto" ,
}