github.com/hashicorp/vault/sdk@v0.13.0/plugin/pb/backend_grpc.pb.go (about)

     1  // Copyright (c) HashiCorp, Inc.
     2  // SPDX-License-Identifier: MPL-2.0
     3  
     4  // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
     5  // versions:
     6  // - protoc-gen-go-grpc v1.3.0
     7  // - protoc             (unknown)
     8  // source: sdk/plugin/pb/backend.proto
     9  
    10  package pb
    11  
    12  import (
    13  	context "context"
    14  	grpc "google.golang.org/grpc"
    15  	codes "google.golang.org/grpc/codes"
    16  	status "google.golang.org/grpc/status"
    17  )
    18  
    19  // This is a compile-time assertion to ensure that this generated file
    20  // is compatible with the grpc package it is being compiled against.
    21  // Requires gRPC-Go v1.32.0 or later.
    22  const _ = grpc.SupportPackageIsVersion7
    23  
    24  const (
    25  	Backend_HandleRequest_FullMethodName        = "/pb.Backend/HandleRequest"
    26  	Backend_SpecialPaths_FullMethodName         = "/pb.Backend/SpecialPaths"
    27  	Backend_HandleExistenceCheck_FullMethodName = "/pb.Backend/HandleExistenceCheck"
    28  	Backend_Cleanup_FullMethodName              = "/pb.Backend/Cleanup"
    29  	Backend_InvalidateKey_FullMethodName        = "/pb.Backend/InvalidateKey"
    30  	Backend_Setup_FullMethodName                = "/pb.Backend/Setup"
    31  	Backend_Initialize_FullMethodName           = "/pb.Backend/Initialize"
    32  	Backend_Type_FullMethodName                 = "/pb.Backend/Type"
    33  )
    34  
    35  // BackendClient is the client API for Backend service.
    36  //
    37  // 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.
    38  type BackendClient interface {
    39  	// HandleRequest is used to handle a request and generate a response.
    40  	// The plugins must check the operation type and handle appropriately.
    41  	HandleRequest(ctx context.Context, in *HandleRequestArgs, opts ...grpc.CallOption) (*HandleRequestReply, error)
    42  	// SpecialPaths is a list of paths that are special in some way.
    43  	// See PathType for the types of special paths. The key is the type
    44  	// of the special path, and the value is a list of paths for this type.
    45  	// This is not a regular expression but is an exact match. If the path
    46  	// ends in '*' then it is a prefix-based match. The '*' can only appear
    47  	// at the end.
    48  	SpecialPaths(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*SpecialPathsReply, error)
    49  	// HandleExistenceCheck is used to handle a request and generate a response
    50  	// indicating whether the given path exists or not; this is used to
    51  	// understand whether the request must have a Create or Update capability
    52  	// ACL applied. The first bool indicates whether an existence check
    53  	// function was found for the backend; the second indicates whether, if an
    54  	// existence check function was found, the item exists or not.
    55  	HandleExistenceCheck(ctx context.Context, in *HandleExistenceCheckArgs, opts ...grpc.CallOption) (*HandleExistenceCheckReply, error)
    56  	// Cleanup is invoked during an unmount of a backend to allow it to
    57  	// handle any cleanup like connection closing or releasing of file handles.
    58  	// Cleanup is called right before Vault closes the plugin process.
    59  	Cleanup(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error)
    60  	// InvalidateKey may be invoked when an object is modified that belongs
    61  	// to the backend. The backend can use this to clear any caches or reset
    62  	// internal state as needed.
    63  	InvalidateKey(ctx context.Context, in *InvalidateKeyArgs, opts ...grpc.CallOption) (*Empty, error)
    64  	// Setup is used to set up the backend based on the provided backend
    65  	// configuration. The plugin's setup implementation should use the provided
    66  	// broker_id to create a connection back to Vault for use with the Storage
    67  	// and SystemView clients.
    68  	Setup(ctx context.Context, in *SetupArgs, opts ...grpc.CallOption) (*SetupReply, error)
    69  	// Initialize is invoked just after mounting a backend to allow it to
    70  	// handle any initialization tasks that need to be performed.
    71  	Initialize(ctx context.Context, in *InitializeArgs, opts ...grpc.CallOption) (*InitializeReply, error)
    72  	// Type returns the BackendType for the particular backend
    73  	Type(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*TypeReply, error)
    74  }
    75  
    76  type backendClient struct {
    77  	cc grpc.ClientConnInterface
    78  }
    79  
    80  func NewBackendClient(cc grpc.ClientConnInterface) BackendClient {
    81  	return &backendClient{cc}
    82  }
    83  
    84  func (c *backendClient) HandleRequest(ctx context.Context, in *HandleRequestArgs, opts ...grpc.CallOption) (*HandleRequestReply, error) {
    85  	out := new(HandleRequestReply)
    86  	err := c.cc.Invoke(ctx, Backend_HandleRequest_FullMethodName, in, out, opts...)
    87  	if err != nil {
    88  		return nil, err
    89  	}
    90  	return out, nil
    91  }
    92  
    93  func (c *backendClient) SpecialPaths(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*SpecialPathsReply, error) {
    94  	out := new(SpecialPathsReply)
    95  	err := c.cc.Invoke(ctx, Backend_SpecialPaths_FullMethodName, in, out, opts...)
    96  	if err != nil {
    97  		return nil, err
    98  	}
    99  	return out, nil
   100  }
   101  
   102  func (c *backendClient) HandleExistenceCheck(ctx context.Context, in *HandleExistenceCheckArgs, opts ...grpc.CallOption) (*HandleExistenceCheckReply, error) {
   103  	out := new(HandleExistenceCheckReply)
   104  	err := c.cc.Invoke(ctx, Backend_HandleExistenceCheck_FullMethodName, in, out, opts...)
   105  	if err != nil {
   106  		return nil, err
   107  	}
   108  	return out, nil
   109  }
   110  
   111  func (c *backendClient) Cleanup(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) {
   112  	out := new(Empty)
   113  	err := c.cc.Invoke(ctx, Backend_Cleanup_FullMethodName, in, out, opts...)
   114  	if err != nil {
   115  		return nil, err
   116  	}
   117  	return out, nil
   118  }
   119  
   120  func (c *backendClient) InvalidateKey(ctx context.Context, in *InvalidateKeyArgs, opts ...grpc.CallOption) (*Empty, error) {
   121  	out := new(Empty)
   122  	err := c.cc.Invoke(ctx, Backend_InvalidateKey_FullMethodName, in, out, opts...)
   123  	if err != nil {
   124  		return nil, err
   125  	}
   126  	return out, nil
   127  }
   128  
   129  func (c *backendClient) Setup(ctx context.Context, in *SetupArgs, opts ...grpc.CallOption) (*SetupReply, error) {
   130  	out := new(SetupReply)
   131  	err := c.cc.Invoke(ctx, Backend_Setup_FullMethodName, in, out, opts...)
   132  	if err != nil {
   133  		return nil, err
   134  	}
   135  	return out, nil
   136  }
   137  
   138  func (c *backendClient) Initialize(ctx context.Context, in *InitializeArgs, opts ...grpc.CallOption) (*InitializeReply, error) {
   139  	out := new(InitializeReply)
   140  	err := c.cc.Invoke(ctx, Backend_Initialize_FullMethodName, in, out, opts...)
   141  	if err != nil {
   142  		return nil, err
   143  	}
   144  	return out, nil
   145  }
   146  
   147  func (c *backendClient) Type(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*TypeReply, error) {
   148  	out := new(TypeReply)
   149  	err := c.cc.Invoke(ctx, Backend_Type_FullMethodName, in, out, opts...)
   150  	if err != nil {
   151  		return nil, err
   152  	}
   153  	return out, nil
   154  }
   155  
   156  // BackendServer is the server API for Backend service.
   157  // All implementations must embed UnimplementedBackendServer
   158  // for forward compatibility
   159  type BackendServer interface {
   160  	// HandleRequest is used to handle a request and generate a response.
   161  	// The plugins must check the operation type and handle appropriately.
   162  	HandleRequest(context.Context, *HandleRequestArgs) (*HandleRequestReply, error)
   163  	// SpecialPaths is a list of paths that are special in some way.
   164  	// See PathType for the types of special paths. The key is the type
   165  	// of the special path, and the value is a list of paths for this type.
   166  	// This is not a regular expression but is an exact match. If the path
   167  	// ends in '*' then it is a prefix-based match. The '*' can only appear
   168  	// at the end.
   169  	SpecialPaths(context.Context, *Empty) (*SpecialPathsReply, error)
   170  	// HandleExistenceCheck is used to handle a request and generate a response
   171  	// indicating whether the given path exists or not; this is used to
   172  	// understand whether the request must have a Create or Update capability
   173  	// ACL applied. The first bool indicates whether an existence check
   174  	// function was found for the backend; the second indicates whether, if an
   175  	// existence check function was found, the item exists or not.
   176  	HandleExistenceCheck(context.Context, *HandleExistenceCheckArgs) (*HandleExistenceCheckReply, error)
   177  	// Cleanup is invoked during an unmount of a backend to allow it to
   178  	// handle any cleanup like connection closing or releasing of file handles.
   179  	// Cleanup is called right before Vault closes the plugin process.
   180  	Cleanup(context.Context, *Empty) (*Empty, error)
   181  	// InvalidateKey may be invoked when an object is modified that belongs
   182  	// to the backend. The backend can use this to clear any caches or reset
   183  	// internal state as needed.
   184  	InvalidateKey(context.Context, *InvalidateKeyArgs) (*Empty, error)
   185  	// Setup is used to set up the backend based on the provided backend
   186  	// configuration. The plugin's setup implementation should use the provided
   187  	// broker_id to create a connection back to Vault for use with the Storage
   188  	// and SystemView clients.
   189  	Setup(context.Context, *SetupArgs) (*SetupReply, error)
   190  	// Initialize is invoked just after mounting a backend to allow it to
   191  	// handle any initialization tasks that need to be performed.
   192  	Initialize(context.Context, *InitializeArgs) (*InitializeReply, error)
   193  	// Type returns the BackendType for the particular backend
   194  	Type(context.Context, *Empty) (*TypeReply, error)
   195  	mustEmbedUnimplementedBackendServer()
   196  }
   197  
   198  // UnimplementedBackendServer must be embedded to have forward compatible implementations.
   199  type UnimplementedBackendServer struct {
   200  }
   201  
   202  func (UnimplementedBackendServer) HandleRequest(context.Context, *HandleRequestArgs) (*HandleRequestReply, error) {
   203  	return nil, status.Errorf(codes.Unimplemented, "method HandleRequest not implemented")
   204  }
   205  func (UnimplementedBackendServer) SpecialPaths(context.Context, *Empty) (*SpecialPathsReply, error) {
   206  	return nil, status.Errorf(codes.Unimplemented, "method SpecialPaths not implemented")
   207  }
   208  func (UnimplementedBackendServer) HandleExistenceCheck(context.Context, *HandleExistenceCheckArgs) (*HandleExistenceCheckReply, error) {
   209  	return nil, status.Errorf(codes.Unimplemented, "method HandleExistenceCheck not implemented")
   210  }
   211  func (UnimplementedBackendServer) Cleanup(context.Context, *Empty) (*Empty, error) {
   212  	return nil, status.Errorf(codes.Unimplemented, "method Cleanup not implemented")
   213  }
   214  func (UnimplementedBackendServer) InvalidateKey(context.Context, *InvalidateKeyArgs) (*Empty, error) {
   215  	return nil, status.Errorf(codes.Unimplemented, "method InvalidateKey not implemented")
   216  }
   217  func (UnimplementedBackendServer) Setup(context.Context, *SetupArgs) (*SetupReply, error) {
   218  	return nil, status.Errorf(codes.Unimplemented, "method Setup not implemented")
   219  }
   220  func (UnimplementedBackendServer) Initialize(context.Context, *InitializeArgs) (*InitializeReply, error) {
   221  	return nil, status.Errorf(codes.Unimplemented, "method Initialize not implemented")
   222  }
   223  func (UnimplementedBackendServer) Type(context.Context, *Empty) (*TypeReply, error) {
   224  	return nil, status.Errorf(codes.Unimplemented, "method Type not implemented")
   225  }
   226  func (UnimplementedBackendServer) mustEmbedUnimplementedBackendServer() {}
   227  
   228  // UnsafeBackendServer may be embedded to opt out of forward compatibility for this service.
   229  // Use of this interface is not recommended, as added methods to BackendServer will
   230  // result in compilation errors.
   231  type UnsafeBackendServer interface {
   232  	mustEmbedUnimplementedBackendServer()
   233  }
   234  
   235  func RegisterBackendServer(s grpc.ServiceRegistrar, srv BackendServer) {
   236  	s.RegisterService(&Backend_ServiceDesc, srv)
   237  }
   238  
   239  func _Backend_HandleRequest_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   240  	in := new(HandleRequestArgs)
   241  	if err := dec(in); err != nil {
   242  		return nil, err
   243  	}
   244  	if interceptor == nil {
   245  		return srv.(BackendServer).HandleRequest(ctx, in)
   246  	}
   247  	info := &grpc.UnaryServerInfo{
   248  		Server:     srv,
   249  		FullMethod: Backend_HandleRequest_FullMethodName,
   250  	}
   251  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   252  		return srv.(BackendServer).HandleRequest(ctx, req.(*HandleRequestArgs))
   253  	}
   254  	return interceptor(ctx, in, info, handler)
   255  }
   256  
   257  func _Backend_SpecialPaths_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   258  	in := new(Empty)
   259  	if err := dec(in); err != nil {
   260  		return nil, err
   261  	}
   262  	if interceptor == nil {
   263  		return srv.(BackendServer).SpecialPaths(ctx, in)
   264  	}
   265  	info := &grpc.UnaryServerInfo{
   266  		Server:     srv,
   267  		FullMethod: Backend_SpecialPaths_FullMethodName,
   268  	}
   269  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   270  		return srv.(BackendServer).SpecialPaths(ctx, req.(*Empty))
   271  	}
   272  	return interceptor(ctx, in, info, handler)
   273  }
   274  
   275  func _Backend_HandleExistenceCheck_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   276  	in := new(HandleExistenceCheckArgs)
   277  	if err := dec(in); err != nil {
   278  		return nil, err
   279  	}
   280  	if interceptor == nil {
   281  		return srv.(BackendServer).HandleExistenceCheck(ctx, in)
   282  	}
   283  	info := &grpc.UnaryServerInfo{
   284  		Server:     srv,
   285  		FullMethod: Backend_HandleExistenceCheck_FullMethodName,
   286  	}
   287  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   288  		return srv.(BackendServer).HandleExistenceCheck(ctx, req.(*HandleExistenceCheckArgs))
   289  	}
   290  	return interceptor(ctx, in, info, handler)
   291  }
   292  
   293  func _Backend_Cleanup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   294  	in := new(Empty)
   295  	if err := dec(in); err != nil {
   296  		return nil, err
   297  	}
   298  	if interceptor == nil {
   299  		return srv.(BackendServer).Cleanup(ctx, in)
   300  	}
   301  	info := &grpc.UnaryServerInfo{
   302  		Server:     srv,
   303  		FullMethod: Backend_Cleanup_FullMethodName,
   304  	}
   305  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   306  		return srv.(BackendServer).Cleanup(ctx, req.(*Empty))
   307  	}
   308  	return interceptor(ctx, in, info, handler)
   309  }
   310  
   311  func _Backend_InvalidateKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   312  	in := new(InvalidateKeyArgs)
   313  	if err := dec(in); err != nil {
   314  		return nil, err
   315  	}
   316  	if interceptor == nil {
   317  		return srv.(BackendServer).InvalidateKey(ctx, in)
   318  	}
   319  	info := &grpc.UnaryServerInfo{
   320  		Server:     srv,
   321  		FullMethod: Backend_InvalidateKey_FullMethodName,
   322  	}
   323  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   324  		return srv.(BackendServer).InvalidateKey(ctx, req.(*InvalidateKeyArgs))
   325  	}
   326  	return interceptor(ctx, in, info, handler)
   327  }
   328  
   329  func _Backend_Setup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   330  	in := new(SetupArgs)
   331  	if err := dec(in); err != nil {
   332  		return nil, err
   333  	}
   334  	if interceptor == nil {
   335  		return srv.(BackendServer).Setup(ctx, in)
   336  	}
   337  	info := &grpc.UnaryServerInfo{
   338  		Server:     srv,
   339  		FullMethod: Backend_Setup_FullMethodName,
   340  	}
   341  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   342  		return srv.(BackendServer).Setup(ctx, req.(*SetupArgs))
   343  	}
   344  	return interceptor(ctx, in, info, handler)
   345  }
   346  
   347  func _Backend_Initialize_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   348  	in := new(InitializeArgs)
   349  	if err := dec(in); err != nil {
   350  		return nil, err
   351  	}
   352  	if interceptor == nil {
   353  		return srv.(BackendServer).Initialize(ctx, in)
   354  	}
   355  	info := &grpc.UnaryServerInfo{
   356  		Server:     srv,
   357  		FullMethod: Backend_Initialize_FullMethodName,
   358  	}
   359  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   360  		return srv.(BackendServer).Initialize(ctx, req.(*InitializeArgs))
   361  	}
   362  	return interceptor(ctx, in, info, handler)
   363  }
   364  
   365  func _Backend_Type_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   366  	in := new(Empty)
   367  	if err := dec(in); err != nil {
   368  		return nil, err
   369  	}
   370  	if interceptor == nil {
   371  		return srv.(BackendServer).Type(ctx, in)
   372  	}
   373  	info := &grpc.UnaryServerInfo{
   374  		Server:     srv,
   375  		FullMethod: Backend_Type_FullMethodName,
   376  	}
   377  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   378  		return srv.(BackendServer).Type(ctx, req.(*Empty))
   379  	}
   380  	return interceptor(ctx, in, info, handler)
   381  }
   382  
   383  // Backend_ServiceDesc is the grpc.ServiceDesc for Backend service.
   384  // It's only intended for direct use with grpc.RegisterService,
   385  // and not to be introspected or modified (even as a copy)
   386  var Backend_ServiceDesc = grpc.ServiceDesc{
   387  	ServiceName: "pb.Backend",
   388  	HandlerType: (*BackendServer)(nil),
   389  	Methods: []grpc.MethodDesc{
   390  		{
   391  			MethodName: "HandleRequest",
   392  			Handler:    _Backend_HandleRequest_Handler,
   393  		},
   394  		{
   395  			MethodName: "SpecialPaths",
   396  			Handler:    _Backend_SpecialPaths_Handler,
   397  		},
   398  		{
   399  			MethodName: "HandleExistenceCheck",
   400  			Handler:    _Backend_HandleExistenceCheck_Handler,
   401  		},
   402  		{
   403  			MethodName: "Cleanup",
   404  			Handler:    _Backend_Cleanup_Handler,
   405  		},
   406  		{
   407  			MethodName: "InvalidateKey",
   408  			Handler:    _Backend_InvalidateKey_Handler,
   409  		},
   410  		{
   411  			MethodName: "Setup",
   412  			Handler:    _Backend_Setup_Handler,
   413  		},
   414  		{
   415  			MethodName: "Initialize",
   416  			Handler:    _Backend_Initialize_Handler,
   417  		},
   418  		{
   419  			MethodName: "Type",
   420  			Handler:    _Backend_Type_Handler,
   421  		},
   422  	},
   423  	Streams:  []grpc.StreamDesc{},
   424  	Metadata: "sdk/plugin/pb/backend.proto",
   425  }
   426  
   427  const (
   428  	Storage_List_FullMethodName   = "/pb.Storage/List"
   429  	Storage_Get_FullMethodName    = "/pb.Storage/Get"
   430  	Storage_Put_FullMethodName    = "/pb.Storage/Put"
   431  	Storage_Delete_FullMethodName = "/pb.Storage/Delete"
   432  )
   433  
   434  // StorageClient is the client API for Storage service.
   435  //
   436  // 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.
   437  type StorageClient interface {
   438  	List(ctx context.Context, in *StorageListArgs, opts ...grpc.CallOption) (*StorageListReply, error)
   439  	Get(ctx context.Context, in *StorageGetArgs, opts ...grpc.CallOption) (*StorageGetReply, error)
   440  	Put(ctx context.Context, in *StoragePutArgs, opts ...grpc.CallOption) (*StoragePutReply, error)
   441  	Delete(ctx context.Context, in *StorageDeleteArgs, opts ...grpc.CallOption) (*StorageDeleteReply, error)
   442  }
   443  
   444  type storageClient struct {
   445  	cc grpc.ClientConnInterface
   446  }
   447  
   448  func NewStorageClient(cc grpc.ClientConnInterface) StorageClient {
   449  	return &storageClient{cc}
   450  }
   451  
   452  func (c *storageClient) List(ctx context.Context, in *StorageListArgs, opts ...grpc.CallOption) (*StorageListReply, error) {
   453  	out := new(StorageListReply)
   454  	err := c.cc.Invoke(ctx, Storage_List_FullMethodName, in, out, opts...)
   455  	if err != nil {
   456  		return nil, err
   457  	}
   458  	return out, nil
   459  }
   460  
   461  func (c *storageClient) Get(ctx context.Context, in *StorageGetArgs, opts ...grpc.CallOption) (*StorageGetReply, error) {
   462  	out := new(StorageGetReply)
   463  	err := c.cc.Invoke(ctx, Storage_Get_FullMethodName, in, out, opts...)
   464  	if err != nil {
   465  		return nil, err
   466  	}
   467  	return out, nil
   468  }
   469  
   470  func (c *storageClient) Put(ctx context.Context, in *StoragePutArgs, opts ...grpc.CallOption) (*StoragePutReply, error) {
   471  	out := new(StoragePutReply)
   472  	err := c.cc.Invoke(ctx, Storage_Put_FullMethodName, in, out, opts...)
   473  	if err != nil {
   474  		return nil, err
   475  	}
   476  	return out, nil
   477  }
   478  
   479  func (c *storageClient) Delete(ctx context.Context, in *StorageDeleteArgs, opts ...grpc.CallOption) (*StorageDeleteReply, error) {
   480  	out := new(StorageDeleteReply)
   481  	err := c.cc.Invoke(ctx, Storage_Delete_FullMethodName, in, out, opts...)
   482  	if err != nil {
   483  		return nil, err
   484  	}
   485  	return out, nil
   486  }
   487  
   488  // StorageServer is the server API for Storage service.
   489  // All implementations must embed UnimplementedStorageServer
   490  // for forward compatibility
   491  type StorageServer interface {
   492  	List(context.Context, *StorageListArgs) (*StorageListReply, error)
   493  	Get(context.Context, *StorageGetArgs) (*StorageGetReply, error)
   494  	Put(context.Context, *StoragePutArgs) (*StoragePutReply, error)
   495  	Delete(context.Context, *StorageDeleteArgs) (*StorageDeleteReply, error)
   496  	mustEmbedUnimplementedStorageServer()
   497  }
   498  
   499  // UnimplementedStorageServer must be embedded to have forward compatible implementations.
   500  type UnimplementedStorageServer struct {
   501  }
   502  
   503  func (UnimplementedStorageServer) List(context.Context, *StorageListArgs) (*StorageListReply, error) {
   504  	return nil, status.Errorf(codes.Unimplemented, "method List not implemented")
   505  }
   506  func (UnimplementedStorageServer) Get(context.Context, *StorageGetArgs) (*StorageGetReply, error) {
   507  	return nil, status.Errorf(codes.Unimplemented, "method Get not implemented")
   508  }
   509  func (UnimplementedStorageServer) Put(context.Context, *StoragePutArgs) (*StoragePutReply, error) {
   510  	return nil, status.Errorf(codes.Unimplemented, "method Put not implemented")
   511  }
   512  func (UnimplementedStorageServer) Delete(context.Context, *StorageDeleteArgs) (*StorageDeleteReply, error) {
   513  	return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented")
   514  }
   515  func (UnimplementedStorageServer) mustEmbedUnimplementedStorageServer() {}
   516  
   517  // UnsafeStorageServer may be embedded to opt out of forward compatibility for this service.
   518  // Use of this interface is not recommended, as added methods to StorageServer will
   519  // result in compilation errors.
   520  type UnsafeStorageServer interface {
   521  	mustEmbedUnimplementedStorageServer()
   522  }
   523  
   524  func RegisterStorageServer(s grpc.ServiceRegistrar, srv StorageServer) {
   525  	s.RegisterService(&Storage_ServiceDesc, srv)
   526  }
   527  
   528  func _Storage_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   529  	in := new(StorageListArgs)
   530  	if err := dec(in); err != nil {
   531  		return nil, err
   532  	}
   533  	if interceptor == nil {
   534  		return srv.(StorageServer).List(ctx, in)
   535  	}
   536  	info := &grpc.UnaryServerInfo{
   537  		Server:     srv,
   538  		FullMethod: Storage_List_FullMethodName,
   539  	}
   540  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   541  		return srv.(StorageServer).List(ctx, req.(*StorageListArgs))
   542  	}
   543  	return interceptor(ctx, in, info, handler)
   544  }
   545  
   546  func _Storage_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   547  	in := new(StorageGetArgs)
   548  	if err := dec(in); err != nil {
   549  		return nil, err
   550  	}
   551  	if interceptor == nil {
   552  		return srv.(StorageServer).Get(ctx, in)
   553  	}
   554  	info := &grpc.UnaryServerInfo{
   555  		Server:     srv,
   556  		FullMethod: Storage_Get_FullMethodName,
   557  	}
   558  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   559  		return srv.(StorageServer).Get(ctx, req.(*StorageGetArgs))
   560  	}
   561  	return interceptor(ctx, in, info, handler)
   562  }
   563  
   564  func _Storage_Put_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   565  	in := new(StoragePutArgs)
   566  	if err := dec(in); err != nil {
   567  		return nil, err
   568  	}
   569  	if interceptor == nil {
   570  		return srv.(StorageServer).Put(ctx, in)
   571  	}
   572  	info := &grpc.UnaryServerInfo{
   573  		Server:     srv,
   574  		FullMethod: Storage_Put_FullMethodName,
   575  	}
   576  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   577  		return srv.(StorageServer).Put(ctx, req.(*StoragePutArgs))
   578  	}
   579  	return interceptor(ctx, in, info, handler)
   580  }
   581  
   582  func _Storage_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   583  	in := new(StorageDeleteArgs)
   584  	if err := dec(in); err != nil {
   585  		return nil, err
   586  	}
   587  	if interceptor == nil {
   588  		return srv.(StorageServer).Delete(ctx, in)
   589  	}
   590  	info := &grpc.UnaryServerInfo{
   591  		Server:     srv,
   592  		FullMethod: Storage_Delete_FullMethodName,
   593  	}
   594  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   595  		return srv.(StorageServer).Delete(ctx, req.(*StorageDeleteArgs))
   596  	}
   597  	return interceptor(ctx, in, info, handler)
   598  }
   599  
   600  // Storage_ServiceDesc is the grpc.ServiceDesc for Storage service.
   601  // It's only intended for direct use with grpc.RegisterService,
   602  // and not to be introspected or modified (even as a copy)
   603  var Storage_ServiceDesc = grpc.ServiceDesc{
   604  	ServiceName: "pb.Storage",
   605  	HandlerType: (*StorageServer)(nil),
   606  	Methods: []grpc.MethodDesc{
   607  		{
   608  			MethodName: "List",
   609  			Handler:    _Storage_List_Handler,
   610  		},
   611  		{
   612  			MethodName: "Get",
   613  			Handler:    _Storage_Get_Handler,
   614  		},
   615  		{
   616  			MethodName: "Put",
   617  			Handler:    _Storage_Put_Handler,
   618  		},
   619  		{
   620  			MethodName: "Delete",
   621  			Handler:    _Storage_Delete_Handler,
   622  		},
   623  	},
   624  	Streams:  []grpc.StreamDesc{},
   625  	Metadata: "sdk/plugin/pb/backend.proto",
   626  }
   627  
   628  const (
   629  	SystemView_DefaultLeaseTTL_FullMethodName            = "/pb.SystemView/DefaultLeaseTTL"
   630  	SystemView_MaxLeaseTTL_FullMethodName                = "/pb.SystemView/MaxLeaseTTL"
   631  	SystemView_Tainted_FullMethodName                    = "/pb.SystemView/Tainted"
   632  	SystemView_CachingDisabled_FullMethodName            = "/pb.SystemView/CachingDisabled"
   633  	SystemView_ReplicationState_FullMethodName           = "/pb.SystemView/ReplicationState"
   634  	SystemView_ResponseWrapData_FullMethodName           = "/pb.SystemView/ResponseWrapData"
   635  	SystemView_MlockEnabled_FullMethodName               = "/pb.SystemView/MlockEnabled"
   636  	SystemView_LocalMount_FullMethodName                 = "/pb.SystemView/LocalMount"
   637  	SystemView_EntityInfo_FullMethodName                 = "/pb.SystemView/EntityInfo"
   638  	SystemView_PluginEnv_FullMethodName                  = "/pb.SystemView/PluginEnv"
   639  	SystemView_GroupsForEntity_FullMethodName            = "/pb.SystemView/GroupsForEntity"
   640  	SystemView_GeneratePasswordFromPolicy_FullMethodName = "/pb.SystemView/GeneratePasswordFromPolicy"
   641  	SystemView_ClusterInfo_FullMethodName                = "/pb.SystemView/ClusterInfo"
   642  	SystemView_GenerateIdentityToken_FullMethodName      = "/pb.SystemView/GenerateIdentityToken"
   643  )
   644  
   645  // SystemViewClient is the client API for SystemView service.
   646  //
   647  // 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.
   648  type SystemViewClient interface {
   649  	// DefaultLeaseTTL returns the default lease TTL set in Vault configuration
   650  	DefaultLeaseTTL(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*TTLReply, error)
   651  	// MaxLeaseTTL returns the max lease TTL set in Vault configuration; backend
   652  	// authors should take care not to issue credentials that last longer than
   653  	// this value, as Vault will revoke them
   654  	MaxLeaseTTL(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*TTLReply, error)
   655  	// Tainted, returns true if the mount is tainted. A mount is tainted if it is in the
   656  	// process of being unmounted. This should only be used in special
   657  	// circumstances; a primary use-case is as a guard in revocation functions.
   658  	// If revocation of a backend's leases fails it can keep the unmounting
   659  	// process from being successful. If the reason for this failure is not
   660  	// relevant when the mount is tainted (for instance, saving a CRL to disk
   661  	// when the stored CRL will be removed during the unmounting process
   662  	// anyways), we can ignore the errors to allow unmounting to complete.
   663  	Tainted(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*TaintedReply, error)
   664  	// CachingDisabled returns true if caching is disabled. If true, no caches
   665  	// should be used, despite known slowdowns.
   666  	CachingDisabled(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*CachingDisabledReply, error)
   667  	// ReplicationState indicates the state of cluster replication
   668  	ReplicationState(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ReplicationStateReply, error)
   669  	// ResponseWrapData wraps the given data in a cubbyhole and returns the
   670  	// token used to unwrap.
   671  	ResponseWrapData(ctx context.Context, in *ResponseWrapDataArgs, opts ...grpc.CallOption) (*ResponseWrapDataReply, error)
   672  	// MlockEnabled returns the configuration setting for enabling mlock on
   673  	// plugins.
   674  	MlockEnabled(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*MlockEnabledReply, error)
   675  	// LocalMount, when run from a system view attached to a request, indicates
   676  	// whether the request is affecting a local mount or not
   677  	LocalMount(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*LocalMountReply, error)
   678  	// EntityInfo returns the basic entity information for the given entity id
   679  	EntityInfo(ctx context.Context, in *EntityInfoArgs, opts ...grpc.CallOption) (*EntityInfoReply, error)
   680  	// PluginEnv returns Vault environment information used by plugins
   681  	PluginEnv(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*PluginEnvReply, error)
   682  	// GroupsForEntity returns the group membership information for the given
   683  	// entity id
   684  	GroupsForEntity(ctx context.Context, in *EntityInfoArgs, opts ...grpc.CallOption) (*GroupsForEntityReply, error)
   685  	// GeneratePasswordFromPolicy generates a password from an existing password policy
   686  	GeneratePasswordFromPolicy(ctx context.Context, in *GeneratePasswordFromPolicyRequest, opts ...grpc.CallOption) (*GeneratePasswordFromPolicyReply, error)
   687  	// ClusterInfo returns the ClusterID information; may be reused if ClusterName is also exposed.
   688  	ClusterInfo(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ClusterInfoReply, error)
   689  	// GenerateIdentityToken returns an identity token for the requesting plugin.
   690  	GenerateIdentityToken(ctx context.Context, in *GenerateIdentityTokenRequest, opts ...grpc.CallOption) (*GenerateIdentityTokenResponse, error)
   691  }
   692  
   693  type systemViewClient struct {
   694  	cc grpc.ClientConnInterface
   695  }
   696  
   697  func NewSystemViewClient(cc grpc.ClientConnInterface) SystemViewClient {
   698  	return &systemViewClient{cc}
   699  }
   700  
   701  func (c *systemViewClient) DefaultLeaseTTL(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*TTLReply, error) {
   702  	out := new(TTLReply)
   703  	err := c.cc.Invoke(ctx, SystemView_DefaultLeaseTTL_FullMethodName, in, out, opts...)
   704  	if err != nil {
   705  		return nil, err
   706  	}
   707  	return out, nil
   708  }
   709  
   710  func (c *systemViewClient) MaxLeaseTTL(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*TTLReply, error) {
   711  	out := new(TTLReply)
   712  	err := c.cc.Invoke(ctx, SystemView_MaxLeaseTTL_FullMethodName, in, out, opts...)
   713  	if err != nil {
   714  		return nil, err
   715  	}
   716  	return out, nil
   717  }
   718  
   719  func (c *systemViewClient) Tainted(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*TaintedReply, error) {
   720  	out := new(TaintedReply)
   721  	err := c.cc.Invoke(ctx, SystemView_Tainted_FullMethodName, in, out, opts...)
   722  	if err != nil {
   723  		return nil, err
   724  	}
   725  	return out, nil
   726  }
   727  
   728  func (c *systemViewClient) CachingDisabled(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*CachingDisabledReply, error) {
   729  	out := new(CachingDisabledReply)
   730  	err := c.cc.Invoke(ctx, SystemView_CachingDisabled_FullMethodName, in, out, opts...)
   731  	if err != nil {
   732  		return nil, err
   733  	}
   734  	return out, nil
   735  }
   736  
   737  func (c *systemViewClient) ReplicationState(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ReplicationStateReply, error) {
   738  	out := new(ReplicationStateReply)
   739  	err := c.cc.Invoke(ctx, SystemView_ReplicationState_FullMethodName, in, out, opts...)
   740  	if err != nil {
   741  		return nil, err
   742  	}
   743  	return out, nil
   744  }
   745  
   746  func (c *systemViewClient) ResponseWrapData(ctx context.Context, in *ResponseWrapDataArgs, opts ...grpc.CallOption) (*ResponseWrapDataReply, error) {
   747  	out := new(ResponseWrapDataReply)
   748  	err := c.cc.Invoke(ctx, SystemView_ResponseWrapData_FullMethodName, in, out, opts...)
   749  	if err != nil {
   750  		return nil, err
   751  	}
   752  	return out, nil
   753  }
   754  
   755  func (c *systemViewClient) MlockEnabled(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*MlockEnabledReply, error) {
   756  	out := new(MlockEnabledReply)
   757  	err := c.cc.Invoke(ctx, SystemView_MlockEnabled_FullMethodName, in, out, opts...)
   758  	if err != nil {
   759  		return nil, err
   760  	}
   761  	return out, nil
   762  }
   763  
   764  func (c *systemViewClient) LocalMount(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*LocalMountReply, error) {
   765  	out := new(LocalMountReply)
   766  	err := c.cc.Invoke(ctx, SystemView_LocalMount_FullMethodName, in, out, opts...)
   767  	if err != nil {
   768  		return nil, err
   769  	}
   770  	return out, nil
   771  }
   772  
   773  func (c *systemViewClient) EntityInfo(ctx context.Context, in *EntityInfoArgs, opts ...grpc.CallOption) (*EntityInfoReply, error) {
   774  	out := new(EntityInfoReply)
   775  	err := c.cc.Invoke(ctx, SystemView_EntityInfo_FullMethodName, in, out, opts...)
   776  	if err != nil {
   777  		return nil, err
   778  	}
   779  	return out, nil
   780  }
   781  
   782  func (c *systemViewClient) PluginEnv(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*PluginEnvReply, error) {
   783  	out := new(PluginEnvReply)
   784  	err := c.cc.Invoke(ctx, SystemView_PluginEnv_FullMethodName, in, out, opts...)
   785  	if err != nil {
   786  		return nil, err
   787  	}
   788  	return out, nil
   789  }
   790  
   791  func (c *systemViewClient) GroupsForEntity(ctx context.Context, in *EntityInfoArgs, opts ...grpc.CallOption) (*GroupsForEntityReply, error) {
   792  	out := new(GroupsForEntityReply)
   793  	err := c.cc.Invoke(ctx, SystemView_GroupsForEntity_FullMethodName, in, out, opts...)
   794  	if err != nil {
   795  		return nil, err
   796  	}
   797  	return out, nil
   798  }
   799  
   800  func (c *systemViewClient) GeneratePasswordFromPolicy(ctx context.Context, in *GeneratePasswordFromPolicyRequest, opts ...grpc.CallOption) (*GeneratePasswordFromPolicyReply, error) {
   801  	out := new(GeneratePasswordFromPolicyReply)
   802  	err := c.cc.Invoke(ctx, SystemView_GeneratePasswordFromPolicy_FullMethodName, in, out, opts...)
   803  	if err != nil {
   804  		return nil, err
   805  	}
   806  	return out, nil
   807  }
   808  
   809  func (c *systemViewClient) ClusterInfo(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ClusterInfoReply, error) {
   810  	out := new(ClusterInfoReply)
   811  	err := c.cc.Invoke(ctx, SystemView_ClusterInfo_FullMethodName, in, out, opts...)
   812  	if err != nil {
   813  		return nil, err
   814  	}
   815  	return out, nil
   816  }
   817  
   818  func (c *systemViewClient) GenerateIdentityToken(ctx context.Context, in *GenerateIdentityTokenRequest, opts ...grpc.CallOption) (*GenerateIdentityTokenResponse, error) {
   819  	out := new(GenerateIdentityTokenResponse)
   820  	err := c.cc.Invoke(ctx, SystemView_GenerateIdentityToken_FullMethodName, in, out, opts...)
   821  	if err != nil {
   822  		return nil, err
   823  	}
   824  	return out, nil
   825  }
   826  
   827  // SystemViewServer is the server API for SystemView service.
   828  // All implementations must embed UnimplementedSystemViewServer
   829  // for forward compatibility
   830  type SystemViewServer interface {
   831  	// DefaultLeaseTTL returns the default lease TTL set in Vault configuration
   832  	DefaultLeaseTTL(context.Context, *Empty) (*TTLReply, error)
   833  	// MaxLeaseTTL returns the max lease TTL set in Vault configuration; backend
   834  	// authors should take care not to issue credentials that last longer than
   835  	// this value, as Vault will revoke them
   836  	MaxLeaseTTL(context.Context, *Empty) (*TTLReply, error)
   837  	// Tainted, returns true if the mount is tainted. A mount is tainted if it is in the
   838  	// process of being unmounted. This should only be used in special
   839  	// circumstances; a primary use-case is as a guard in revocation functions.
   840  	// If revocation of a backend's leases fails it can keep the unmounting
   841  	// process from being successful. If the reason for this failure is not
   842  	// relevant when the mount is tainted (for instance, saving a CRL to disk
   843  	// when the stored CRL will be removed during the unmounting process
   844  	// anyways), we can ignore the errors to allow unmounting to complete.
   845  	Tainted(context.Context, *Empty) (*TaintedReply, error)
   846  	// CachingDisabled returns true if caching is disabled. If true, no caches
   847  	// should be used, despite known slowdowns.
   848  	CachingDisabled(context.Context, *Empty) (*CachingDisabledReply, error)
   849  	// ReplicationState indicates the state of cluster replication
   850  	ReplicationState(context.Context, *Empty) (*ReplicationStateReply, error)
   851  	// ResponseWrapData wraps the given data in a cubbyhole and returns the
   852  	// token used to unwrap.
   853  	ResponseWrapData(context.Context, *ResponseWrapDataArgs) (*ResponseWrapDataReply, error)
   854  	// MlockEnabled returns the configuration setting for enabling mlock on
   855  	// plugins.
   856  	MlockEnabled(context.Context, *Empty) (*MlockEnabledReply, error)
   857  	// LocalMount, when run from a system view attached to a request, indicates
   858  	// whether the request is affecting a local mount or not
   859  	LocalMount(context.Context, *Empty) (*LocalMountReply, error)
   860  	// EntityInfo returns the basic entity information for the given entity id
   861  	EntityInfo(context.Context, *EntityInfoArgs) (*EntityInfoReply, error)
   862  	// PluginEnv returns Vault environment information used by plugins
   863  	PluginEnv(context.Context, *Empty) (*PluginEnvReply, error)
   864  	// GroupsForEntity returns the group membership information for the given
   865  	// entity id
   866  	GroupsForEntity(context.Context, *EntityInfoArgs) (*GroupsForEntityReply, error)
   867  	// GeneratePasswordFromPolicy generates a password from an existing password policy
   868  	GeneratePasswordFromPolicy(context.Context, *GeneratePasswordFromPolicyRequest) (*GeneratePasswordFromPolicyReply, error)
   869  	// ClusterInfo returns the ClusterID information; may be reused if ClusterName is also exposed.
   870  	ClusterInfo(context.Context, *Empty) (*ClusterInfoReply, error)
   871  	// GenerateIdentityToken returns an identity token for the requesting plugin.
   872  	GenerateIdentityToken(context.Context, *GenerateIdentityTokenRequest) (*GenerateIdentityTokenResponse, error)
   873  	mustEmbedUnimplementedSystemViewServer()
   874  }
   875  
   876  // UnimplementedSystemViewServer must be embedded to have forward compatible implementations.
   877  type UnimplementedSystemViewServer struct {
   878  }
   879  
   880  func (UnimplementedSystemViewServer) DefaultLeaseTTL(context.Context, *Empty) (*TTLReply, error) {
   881  	return nil, status.Errorf(codes.Unimplemented, "method DefaultLeaseTTL not implemented")
   882  }
   883  func (UnimplementedSystemViewServer) MaxLeaseTTL(context.Context, *Empty) (*TTLReply, error) {
   884  	return nil, status.Errorf(codes.Unimplemented, "method MaxLeaseTTL not implemented")
   885  }
   886  func (UnimplementedSystemViewServer) Tainted(context.Context, *Empty) (*TaintedReply, error) {
   887  	return nil, status.Errorf(codes.Unimplemented, "method Tainted not implemented")
   888  }
   889  func (UnimplementedSystemViewServer) CachingDisabled(context.Context, *Empty) (*CachingDisabledReply, error) {
   890  	return nil, status.Errorf(codes.Unimplemented, "method CachingDisabled not implemented")
   891  }
   892  func (UnimplementedSystemViewServer) ReplicationState(context.Context, *Empty) (*ReplicationStateReply, error) {
   893  	return nil, status.Errorf(codes.Unimplemented, "method ReplicationState not implemented")
   894  }
   895  func (UnimplementedSystemViewServer) ResponseWrapData(context.Context, *ResponseWrapDataArgs) (*ResponseWrapDataReply, error) {
   896  	return nil, status.Errorf(codes.Unimplemented, "method ResponseWrapData not implemented")
   897  }
   898  func (UnimplementedSystemViewServer) MlockEnabled(context.Context, *Empty) (*MlockEnabledReply, error) {
   899  	return nil, status.Errorf(codes.Unimplemented, "method MlockEnabled not implemented")
   900  }
   901  func (UnimplementedSystemViewServer) LocalMount(context.Context, *Empty) (*LocalMountReply, error) {
   902  	return nil, status.Errorf(codes.Unimplemented, "method LocalMount not implemented")
   903  }
   904  func (UnimplementedSystemViewServer) EntityInfo(context.Context, *EntityInfoArgs) (*EntityInfoReply, error) {
   905  	return nil, status.Errorf(codes.Unimplemented, "method EntityInfo not implemented")
   906  }
   907  func (UnimplementedSystemViewServer) PluginEnv(context.Context, *Empty) (*PluginEnvReply, error) {
   908  	return nil, status.Errorf(codes.Unimplemented, "method PluginEnv not implemented")
   909  }
   910  func (UnimplementedSystemViewServer) GroupsForEntity(context.Context, *EntityInfoArgs) (*GroupsForEntityReply, error) {
   911  	return nil, status.Errorf(codes.Unimplemented, "method GroupsForEntity not implemented")
   912  }
   913  func (UnimplementedSystemViewServer) GeneratePasswordFromPolicy(context.Context, *GeneratePasswordFromPolicyRequest) (*GeneratePasswordFromPolicyReply, error) {
   914  	return nil, status.Errorf(codes.Unimplemented, "method GeneratePasswordFromPolicy not implemented")
   915  }
   916  func (UnimplementedSystemViewServer) ClusterInfo(context.Context, *Empty) (*ClusterInfoReply, error) {
   917  	return nil, status.Errorf(codes.Unimplemented, "method ClusterInfo not implemented")
   918  }
   919  func (UnimplementedSystemViewServer) GenerateIdentityToken(context.Context, *GenerateIdentityTokenRequest) (*GenerateIdentityTokenResponse, error) {
   920  	return nil, status.Errorf(codes.Unimplemented, "method GenerateIdentityToken not implemented")
   921  }
   922  func (UnimplementedSystemViewServer) mustEmbedUnimplementedSystemViewServer() {}
   923  
   924  // UnsafeSystemViewServer may be embedded to opt out of forward compatibility for this service.
   925  // Use of this interface is not recommended, as added methods to SystemViewServer will
   926  // result in compilation errors.
   927  type UnsafeSystemViewServer interface {
   928  	mustEmbedUnimplementedSystemViewServer()
   929  }
   930  
   931  func RegisterSystemViewServer(s grpc.ServiceRegistrar, srv SystemViewServer) {
   932  	s.RegisterService(&SystemView_ServiceDesc, srv)
   933  }
   934  
   935  func _SystemView_DefaultLeaseTTL_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   936  	in := new(Empty)
   937  	if err := dec(in); err != nil {
   938  		return nil, err
   939  	}
   940  	if interceptor == nil {
   941  		return srv.(SystemViewServer).DefaultLeaseTTL(ctx, in)
   942  	}
   943  	info := &grpc.UnaryServerInfo{
   944  		Server:     srv,
   945  		FullMethod: SystemView_DefaultLeaseTTL_FullMethodName,
   946  	}
   947  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   948  		return srv.(SystemViewServer).DefaultLeaseTTL(ctx, req.(*Empty))
   949  	}
   950  	return interceptor(ctx, in, info, handler)
   951  }
   952  
   953  func _SystemView_MaxLeaseTTL_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   954  	in := new(Empty)
   955  	if err := dec(in); err != nil {
   956  		return nil, err
   957  	}
   958  	if interceptor == nil {
   959  		return srv.(SystemViewServer).MaxLeaseTTL(ctx, in)
   960  	}
   961  	info := &grpc.UnaryServerInfo{
   962  		Server:     srv,
   963  		FullMethod: SystemView_MaxLeaseTTL_FullMethodName,
   964  	}
   965  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   966  		return srv.(SystemViewServer).MaxLeaseTTL(ctx, req.(*Empty))
   967  	}
   968  	return interceptor(ctx, in, info, handler)
   969  }
   970  
   971  func _SystemView_Tainted_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   972  	in := new(Empty)
   973  	if err := dec(in); err != nil {
   974  		return nil, err
   975  	}
   976  	if interceptor == nil {
   977  		return srv.(SystemViewServer).Tainted(ctx, in)
   978  	}
   979  	info := &grpc.UnaryServerInfo{
   980  		Server:     srv,
   981  		FullMethod: SystemView_Tainted_FullMethodName,
   982  	}
   983  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   984  		return srv.(SystemViewServer).Tainted(ctx, req.(*Empty))
   985  	}
   986  	return interceptor(ctx, in, info, handler)
   987  }
   988  
   989  func _SystemView_CachingDisabled_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   990  	in := new(Empty)
   991  	if err := dec(in); err != nil {
   992  		return nil, err
   993  	}
   994  	if interceptor == nil {
   995  		return srv.(SystemViewServer).CachingDisabled(ctx, in)
   996  	}
   997  	info := &grpc.UnaryServerInfo{
   998  		Server:     srv,
   999  		FullMethod: SystemView_CachingDisabled_FullMethodName,
  1000  	}
  1001  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  1002  		return srv.(SystemViewServer).CachingDisabled(ctx, req.(*Empty))
  1003  	}
  1004  	return interceptor(ctx, in, info, handler)
  1005  }
  1006  
  1007  func _SystemView_ReplicationState_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  1008  	in := new(Empty)
  1009  	if err := dec(in); err != nil {
  1010  		return nil, err
  1011  	}
  1012  	if interceptor == nil {
  1013  		return srv.(SystemViewServer).ReplicationState(ctx, in)
  1014  	}
  1015  	info := &grpc.UnaryServerInfo{
  1016  		Server:     srv,
  1017  		FullMethod: SystemView_ReplicationState_FullMethodName,
  1018  	}
  1019  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  1020  		return srv.(SystemViewServer).ReplicationState(ctx, req.(*Empty))
  1021  	}
  1022  	return interceptor(ctx, in, info, handler)
  1023  }
  1024  
  1025  func _SystemView_ResponseWrapData_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  1026  	in := new(ResponseWrapDataArgs)
  1027  	if err := dec(in); err != nil {
  1028  		return nil, err
  1029  	}
  1030  	if interceptor == nil {
  1031  		return srv.(SystemViewServer).ResponseWrapData(ctx, in)
  1032  	}
  1033  	info := &grpc.UnaryServerInfo{
  1034  		Server:     srv,
  1035  		FullMethod: SystemView_ResponseWrapData_FullMethodName,
  1036  	}
  1037  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  1038  		return srv.(SystemViewServer).ResponseWrapData(ctx, req.(*ResponseWrapDataArgs))
  1039  	}
  1040  	return interceptor(ctx, in, info, handler)
  1041  }
  1042  
  1043  func _SystemView_MlockEnabled_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  1044  	in := new(Empty)
  1045  	if err := dec(in); err != nil {
  1046  		return nil, err
  1047  	}
  1048  	if interceptor == nil {
  1049  		return srv.(SystemViewServer).MlockEnabled(ctx, in)
  1050  	}
  1051  	info := &grpc.UnaryServerInfo{
  1052  		Server:     srv,
  1053  		FullMethod: SystemView_MlockEnabled_FullMethodName,
  1054  	}
  1055  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  1056  		return srv.(SystemViewServer).MlockEnabled(ctx, req.(*Empty))
  1057  	}
  1058  	return interceptor(ctx, in, info, handler)
  1059  }
  1060  
  1061  func _SystemView_LocalMount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  1062  	in := new(Empty)
  1063  	if err := dec(in); err != nil {
  1064  		return nil, err
  1065  	}
  1066  	if interceptor == nil {
  1067  		return srv.(SystemViewServer).LocalMount(ctx, in)
  1068  	}
  1069  	info := &grpc.UnaryServerInfo{
  1070  		Server:     srv,
  1071  		FullMethod: SystemView_LocalMount_FullMethodName,
  1072  	}
  1073  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  1074  		return srv.(SystemViewServer).LocalMount(ctx, req.(*Empty))
  1075  	}
  1076  	return interceptor(ctx, in, info, handler)
  1077  }
  1078  
  1079  func _SystemView_EntityInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  1080  	in := new(EntityInfoArgs)
  1081  	if err := dec(in); err != nil {
  1082  		return nil, err
  1083  	}
  1084  	if interceptor == nil {
  1085  		return srv.(SystemViewServer).EntityInfo(ctx, in)
  1086  	}
  1087  	info := &grpc.UnaryServerInfo{
  1088  		Server:     srv,
  1089  		FullMethod: SystemView_EntityInfo_FullMethodName,
  1090  	}
  1091  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  1092  		return srv.(SystemViewServer).EntityInfo(ctx, req.(*EntityInfoArgs))
  1093  	}
  1094  	return interceptor(ctx, in, info, handler)
  1095  }
  1096  
  1097  func _SystemView_PluginEnv_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  1098  	in := new(Empty)
  1099  	if err := dec(in); err != nil {
  1100  		return nil, err
  1101  	}
  1102  	if interceptor == nil {
  1103  		return srv.(SystemViewServer).PluginEnv(ctx, in)
  1104  	}
  1105  	info := &grpc.UnaryServerInfo{
  1106  		Server:     srv,
  1107  		FullMethod: SystemView_PluginEnv_FullMethodName,
  1108  	}
  1109  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  1110  		return srv.(SystemViewServer).PluginEnv(ctx, req.(*Empty))
  1111  	}
  1112  	return interceptor(ctx, in, info, handler)
  1113  }
  1114  
  1115  func _SystemView_GroupsForEntity_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  1116  	in := new(EntityInfoArgs)
  1117  	if err := dec(in); err != nil {
  1118  		return nil, err
  1119  	}
  1120  	if interceptor == nil {
  1121  		return srv.(SystemViewServer).GroupsForEntity(ctx, in)
  1122  	}
  1123  	info := &grpc.UnaryServerInfo{
  1124  		Server:     srv,
  1125  		FullMethod: SystemView_GroupsForEntity_FullMethodName,
  1126  	}
  1127  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  1128  		return srv.(SystemViewServer).GroupsForEntity(ctx, req.(*EntityInfoArgs))
  1129  	}
  1130  	return interceptor(ctx, in, info, handler)
  1131  }
  1132  
  1133  func _SystemView_GeneratePasswordFromPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  1134  	in := new(GeneratePasswordFromPolicyRequest)
  1135  	if err := dec(in); err != nil {
  1136  		return nil, err
  1137  	}
  1138  	if interceptor == nil {
  1139  		return srv.(SystemViewServer).GeneratePasswordFromPolicy(ctx, in)
  1140  	}
  1141  	info := &grpc.UnaryServerInfo{
  1142  		Server:     srv,
  1143  		FullMethod: SystemView_GeneratePasswordFromPolicy_FullMethodName,
  1144  	}
  1145  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  1146  		return srv.(SystemViewServer).GeneratePasswordFromPolicy(ctx, req.(*GeneratePasswordFromPolicyRequest))
  1147  	}
  1148  	return interceptor(ctx, in, info, handler)
  1149  }
  1150  
  1151  func _SystemView_ClusterInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  1152  	in := new(Empty)
  1153  	if err := dec(in); err != nil {
  1154  		return nil, err
  1155  	}
  1156  	if interceptor == nil {
  1157  		return srv.(SystemViewServer).ClusterInfo(ctx, in)
  1158  	}
  1159  	info := &grpc.UnaryServerInfo{
  1160  		Server:     srv,
  1161  		FullMethod: SystemView_ClusterInfo_FullMethodName,
  1162  	}
  1163  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  1164  		return srv.(SystemViewServer).ClusterInfo(ctx, req.(*Empty))
  1165  	}
  1166  	return interceptor(ctx, in, info, handler)
  1167  }
  1168  
  1169  func _SystemView_GenerateIdentityToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  1170  	in := new(GenerateIdentityTokenRequest)
  1171  	if err := dec(in); err != nil {
  1172  		return nil, err
  1173  	}
  1174  	if interceptor == nil {
  1175  		return srv.(SystemViewServer).GenerateIdentityToken(ctx, in)
  1176  	}
  1177  	info := &grpc.UnaryServerInfo{
  1178  		Server:     srv,
  1179  		FullMethod: SystemView_GenerateIdentityToken_FullMethodName,
  1180  	}
  1181  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  1182  		return srv.(SystemViewServer).GenerateIdentityToken(ctx, req.(*GenerateIdentityTokenRequest))
  1183  	}
  1184  	return interceptor(ctx, in, info, handler)
  1185  }
  1186  
  1187  // SystemView_ServiceDesc is the grpc.ServiceDesc for SystemView service.
  1188  // It's only intended for direct use with grpc.RegisterService,
  1189  // and not to be introspected or modified (even as a copy)
  1190  var SystemView_ServiceDesc = grpc.ServiceDesc{
  1191  	ServiceName: "pb.SystemView",
  1192  	HandlerType: (*SystemViewServer)(nil),
  1193  	Methods: []grpc.MethodDesc{
  1194  		{
  1195  			MethodName: "DefaultLeaseTTL",
  1196  			Handler:    _SystemView_DefaultLeaseTTL_Handler,
  1197  		},
  1198  		{
  1199  			MethodName: "MaxLeaseTTL",
  1200  			Handler:    _SystemView_MaxLeaseTTL_Handler,
  1201  		},
  1202  		{
  1203  			MethodName: "Tainted",
  1204  			Handler:    _SystemView_Tainted_Handler,
  1205  		},
  1206  		{
  1207  			MethodName: "CachingDisabled",
  1208  			Handler:    _SystemView_CachingDisabled_Handler,
  1209  		},
  1210  		{
  1211  			MethodName: "ReplicationState",
  1212  			Handler:    _SystemView_ReplicationState_Handler,
  1213  		},
  1214  		{
  1215  			MethodName: "ResponseWrapData",
  1216  			Handler:    _SystemView_ResponseWrapData_Handler,
  1217  		},
  1218  		{
  1219  			MethodName: "MlockEnabled",
  1220  			Handler:    _SystemView_MlockEnabled_Handler,
  1221  		},
  1222  		{
  1223  			MethodName: "LocalMount",
  1224  			Handler:    _SystemView_LocalMount_Handler,
  1225  		},
  1226  		{
  1227  			MethodName: "EntityInfo",
  1228  			Handler:    _SystemView_EntityInfo_Handler,
  1229  		},
  1230  		{
  1231  			MethodName: "PluginEnv",
  1232  			Handler:    _SystemView_PluginEnv_Handler,
  1233  		},
  1234  		{
  1235  			MethodName: "GroupsForEntity",
  1236  			Handler:    _SystemView_GroupsForEntity_Handler,
  1237  		},
  1238  		{
  1239  			MethodName: "GeneratePasswordFromPolicy",
  1240  			Handler:    _SystemView_GeneratePasswordFromPolicy_Handler,
  1241  		},
  1242  		{
  1243  			MethodName: "ClusterInfo",
  1244  			Handler:    _SystemView_ClusterInfo_Handler,
  1245  		},
  1246  		{
  1247  			MethodName: "GenerateIdentityToken",
  1248  			Handler:    _SystemView_GenerateIdentityToken_Handler,
  1249  		},
  1250  	},
  1251  	Streams:  []grpc.StreamDesc{},
  1252  	Metadata: "sdk/plugin/pb/backend.proto",
  1253  }
  1254  
  1255  const (
  1256  	Events_SendEvent_FullMethodName = "/pb.Events/SendEvent"
  1257  )
  1258  
  1259  // EventsClient is the client API for Events service.
  1260  //
  1261  // 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.
  1262  type EventsClient interface {
  1263  	SendEvent(ctx context.Context, in *SendEventRequest, opts ...grpc.CallOption) (*Empty, error)
  1264  }
  1265  
  1266  type eventsClient struct {
  1267  	cc grpc.ClientConnInterface
  1268  }
  1269  
  1270  func NewEventsClient(cc grpc.ClientConnInterface) EventsClient {
  1271  	return &eventsClient{cc}
  1272  }
  1273  
  1274  func (c *eventsClient) SendEvent(ctx context.Context, in *SendEventRequest, opts ...grpc.CallOption) (*Empty, error) {
  1275  	out := new(Empty)
  1276  	err := c.cc.Invoke(ctx, Events_SendEvent_FullMethodName, in, out, opts...)
  1277  	if err != nil {
  1278  		return nil, err
  1279  	}
  1280  	return out, nil
  1281  }
  1282  
  1283  // EventsServer is the server API for Events service.
  1284  // All implementations must embed UnimplementedEventsServer
  1285  // for forward compatibility
  1286  type EventsServer interface {
  1287  	SendEvent(context.Context, *SendEventRequest) (*Empty, error)
  1288  	mustEmbedUnimplementedEventsServer()
  1289  }
  1290  
  1291  // UnimplementedEventsServer must be embedded to have forward compatible implementations.
  1292  type UnimplementedEventsServer struct {
  1293  }
  1294  
  1295  func (UnimplementedEventsServer) SendEvent(context.Context, *SendEventRequest) (*Empty, error) {
  1296  	return nil, status.Errorf(codes.Unimplemented, "method SendEvent not implemented")
  1297  }
  1298  func (UnimplementedEventsServer) mustEmbedUnimplementedEventsServer() {}
  1299  
  1300  // UnsafeEventsServer may be embedded to opt out of forward compatibility for this service.
  1301  // Use of this interface is not recommended, as added methods to EventsServer will
  1302  // result in compilation errors.
  1303  type UnsafeEventsServer interface {
  1304  	mustEmbedUnimplementedEventsServer()
  1305  }
  1306  
  1307  func RegisterEventsServer(s grpc.ServiceRegistrar, srv EventsServer) {
  1308  	s.RegisterService(&Events_ServiceDesc, srv)
  1309  }
  1310  
  1311  func _Events_SendEvent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  1312  	in := new(SendEventRequest)
  1313  	if err := dec(in); err != nil {
  1314  		return nil, err
  1315  	}
  1316  	if interceptor == nil {
  1317  		return srv.(EventsServer).SendEvent(ctx, in)
  1318  	}
  1319  	info := &grpc.UnaryServerInfo{
  1320  		Server:     srv,
  1321  		FullMethod: Events_SendEvent_FullMethodName,
  1322  	}
  1323  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  1324  		return srv.(EventsServer).SendEvent(ctx, req.(*SendEventRequest))
  1325  	}
  1326  	return interceptor(ctx, in, info, handler)
  1327  }
  1328  
  1329  // Events_ServiceDesc is the grpc.ServiceDesc for Events service.
  1330  // It's only intended for direct use with grpc.RegisterService,
  1331  // and not to be introspected or modified (even as a copy)
  1332  var Events_ServiceDesc = grpc.ServiceDesc{
  1333  	ServiceName: "pb.Events",
  1334  	HandlerType: (*EventsServer)(nil),
  1335  	Methods: []grpc.MethodDesc{
  1336  		{
  1337  			MethodName: "SendEvent",
  1338  			Handler:    _Events_SendEvent_Handler,
  1339  		},
  1340  	},
  1341  	Streams:  []grpc.StreamDesc{},
  1342  	Metadata: "sdk/plugin/pb/backend.proto",
  1343  }