mirror of https://github.com/hashicorp/boundary
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
196 lines
8.1 KiB
196 lines
8.1 KiB
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|
|
|
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.
|
|
// Requires gRPC-Go v1.32.0 or later.
|
|
const _ = grpc.SupportPackageIsVersion7
|
|
|
|
// 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 {
|
|
// GetSession returns a stored Session if present. The provided request
|
|
// must include the Session ID for the Session being retrieved. If
|
|
// any that ID is missing, malformed or reference a non existing
|
|
// resource an error is returned.
|
|
GetSession(ctx context.Context, in *GetSessionRequest, opts ...grpc.CallOption) (*GetSessionResponse, error)
|
|
// ListSessions returns a list of stored Sessions which exist inside the scope
|
|
// referenced inside the request. The request must include the scope ID for
|
|
// the Sessions being retrieved. If the scope ID is missing, malformed, or
|
|
// reference a non existing scope, an error is returned.
|
|
ListSessions(ctx context.Context, in *ListSessionsRequest, opts ...grpc.CallOption) (*ListSessionsResponse, error)
|
|
// CancelSession cancels an existing Session in boundary. An error
|
|
// is returned if the request attempts to cancel a Session that does
|
|
// not exist.
|
|
CancelSession(ctx context.Context, in *CancelSessionRequest, opts ...grpc.CallOption) (*CancelSessionResponse, error)
|
|
}
|
|
|
|
type sessionServiceClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewSessionServiceClient(cc grpc.ClientConnInterface) SessionServiceClient {
|
|
return &sessionServiceClient{cc}
|
|
}
|
|
|
|
func (c *sessionServiceClient) GetSession(ctx context.Context, in *GetSessionRequest, opts ...grpc.CallOption) (*GetSessionResponse, error) {
|
|
out := new(GetSessionResponse)
|
|
err := c.cc.Invoke(ctx, "/controller.api.services.v1.SessionService/GetSession", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *sessionServiceClient) ListSessions(ctx context.Context, in *ListSessionsRequest, opts ...grpc.CallOption) (*ListSessionsResponse, error) {
|
|
out := new(ListSessionsResponse)
|
|
err := c.cc.Invoke(ctx, "/controller.api.services.v1.SessionService/ListSessions", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *sessionServiceClient) CancelSession(ctx context.Context, in *CancelSessionRequest, opts ...grpc.CallOption) (*CancelSessionResponse, error) {
|
|
out := new(CancelSessionResponse)
|
|
err := c.cc.Invoke(ctx, "/controller.api.services.v1.SessionService/CancelSession", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// SessionServiceServer is the server API for SessionService service.
|
|
// All implementations must embed UnimplementedSessionServiceServer
|
|
// for forward compatibility
|
|
type SessionServiceServer interface {
|
|
// GetSession returns a stored Session if present. The provided request
|
|
// must include the Session ID for the Session being retrieved. If
|
|
// any that ID is missing, malformed or reference a non existing
|
|
// resource an error is returned.
|
|
GetSession(context.Context, *GetSessionRequest) (*GetSessionResponse, error)
|
|
// ListSessions returns a list of stored Sessions which exist inside the scope
|
|
// referenced inside the request. The request must include the scope ID for
|
|
// the Sessions being retrieved. If the scope ID is missing, malformed, or
|
|
// reference a non existing scope, an error is returned.
|
|
ListSessions(context.Context, *ListSessionsRequest) (*ListSessionsResponse, error)
|
|
// CancelSession cancels an existing Session in boundary. An error
|
|
// is returned if the request attempts to cancel a Session that does
|
|
// not exist.
|
|
CancelSession(context.Context, *CancelSessionRequest) (*CancelSessionResponse, error)
|
|
mustEmbedUnimplementedSessionServiceServer()
|
|
}
|
|
|
|
// UnimplementedSessionServiceServer must be embedded to have forward compatible implementations.
|
|
type UnimplementedSessionServiceServer struct {
|
|
}
|
|
|
|
func (UnimplementedSessionServiceServer) GetSession(context.Context, *GetSessionRequest) (*GetSessionResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetSession not implemented")
|
|
}
|
|
func (UnimplementedSessionServiceServer) ListSessions(context.Context, *ListSessionsRequest) (*ListSessionsResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method ListSessions not implemented")
|
|
}
|
|
func (UnimplementedSessionServiceServer) CancelSession(context.Context, *CancelSessionRequest) (*CancelSessionResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method CancelSession not implemented")
|
|
}
|
|
func (UnimplementedSessionServiceServer) mustEmbedUnimplementedSessionServiceServer() {}
|
|
|
|
// 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) {
|
|
s.RegisterService(&SessionService_ServiceDesc, srv)
|
|
}
|
|
|
|
func _SessionService_GetSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetSessionRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(SessionServiceServer).GetSession(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/controller.api.services.v1.SessionService/GetSession",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(SessionServiceServer).GetSession(ctx, req.(*GetSessionRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _SessionService_ListSessions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ListSessionsRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(SessionServiceServer).ListSessions(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/controller.api.services.v1.SessionService/ListSessions",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(SessionServiceServer).ListSessions(ctx, req.(*ListSessionsRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
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,
|
|
FullMethod: "/controller.api.services.v1.SessionService/CancelSession",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(SessionServiceServer).CancelSession(ctx, req.(*CancelSessionRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
// 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{
|
|
ServiceName: "controller.api.services.v1.SessionService",
|
|
HandlerType: (*SessionServiceServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "GetSession",
|
|
Handler: _SessionService_GetSession_Handler,
|
|
},
|
|
{
|
|
MethodName: "ListSessions",
|
|
Handler: _SessionService_ListSessions_Handler,
|
|
},
|
|
{
|
|
MethodName: "CancelSession",
|
|
Handler: _SessionService_CancelSession_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "controller/api/services/v1/session_service.proto",
|
|
}
|