Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.6.2
// - protoc (unknown)
// source: v1/instance_service.proto
package v1
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
emptypb "google.golang.org/protobuf/types/known/emptypb"
)
// 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.64.0 or later.
const _ = grpc.SupportPackageIsVersion9
const (
InstanceService_GetInstance_FullMethodName = "/bytebase.v1.InstanceService/GetInstance"
InstanceService_ListInstances_FullMethodName = "/bytebase.v1.InstanceService/ListInstances"
InstanceService_CreateInstance_FullMethodName = "/bytebase.v1.InstanceService/CreateInstance"
InstanceService_PrepareSampleProjectInstance_FullMethodName = "/bytebase.v1.InstanceService/PrepareSampleProjectInstance"
InstanceService_UpdateInstance_FullMethodName = "/bytebase.v1.InstanceService/UpdateInstance"
InstanceService_DeleteInstance_FullMethodName = "/bytebase.v1.InstanceService/DeleteInstance"
InstanceService_UndeleteInstance_FullMethodName = "/bytebase.v1.InstanceService/UndeleteInstance"
InstanceService_SyncInstance_FullMethodName = "/bytebase.v1.InstanceService/SyncInstance"
InstanceService_ListInstanceDatabase_FullMethodName = "/bytebase.v1.InstanceService/ListInstanceDatabase"
InstanceService_BatchSyncInstances_FullMethodName = "/bytebase.v1.InstanceService/BatchSyncInstances"
InstanceService_BatchUpdateInstances_FullMethodName = "/bytebase.v1.InstanceService/BatchUpdateInstances"
InstanceService_AddDataSource_FullMethodName = "/bytebase.v1.InstanceService/AddDataSource"
InstanceService_RemoveDataSource_FullMethodName = "/bytebase.v1.InstanceService/RemoveDataSource"
InstanceService_UpdateDataSource_FullMethodName = "/bytebase.v1.InstanceService/UpdateDataSource"
)
// InstanceServiceClient is the client API for InstanceService 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.
//
// InstanceService manages database instances and their connections.
type InstanceServiceClient interface {
// Gets a database instance by name.
// Permissions required: bb.instances.get
GetInstance(ctx context.Context, in *GetInstanceRequest, opts ...grpc.CallOption) (*Instance, error)
// Lists database instances, optionally within a project.
// Permissions required: bb.instances.list
ListInstances(ctx context.Context, in *ListInstancesRequest, opts ...grpc.CallOption) (*ListInstancesResponse, error)
// Creates a new database instance.
// Permissions required: bb.instances.create
CreateInstance(ctx context.Context, in *CreateInstanceRequest, opts ...grpc.CallOption) (*Instance, error)
// Prepares a Sample Project Instance for a project.
// Permissions required: bb.instances.create
PrepareSampleProjectInstance(ctx context.Context, in *PrepareSampleProjectInstanceRequest, opts ...grpc.CallOption) (*Instance, error)
// Updates a database instance.
// Permissions required: bb.instances.update
UpdateInstance(ctx context.Context, in *UpdateInstanceRequest, opts ...grpc.CallOption) (*Instance, error)
// Deletes or soft-deletes a database instance.
// Soft-delete requests fail with FAILED_PRECONDITION while any task run
// targeting the instance is pending, available, or running.
// Permissions required: bb.instances.delete
DeleteInstance(ctx context.Context, in *DeleteInstanceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
// Restores a soft-deleted database instance.
// Restore requests fail with FAILED_PRECONDITION while any task run targeting
// the instance is pending, available, or running.
// Permissions required: bb.instances.undelete
UndeleteInstance(ctx context.Context, in *UndeleteInstanceRequest, opts ...grpc.CallOption) (*Instance, error)
// Syncs database schemas and metadata from an instance.
// Permissions required: bb.instances.sync
SyncInstance(ctx context.Context, in *SyncInstanceRequest, opts ...grpc.CallOption) (*SyncInstanceResponse, error)
// Lists all databases within an instance without creating them.
// Permissions required: bb.instances.get
ListInstanceDatabase(ctx context.Context, in *ListInstanceDatabaseRequest, opts ...grpc.CallOption) (*ListInstanceDatabaseResponse, error)
// Syncs multiple instances in a single request.
// Permissions required: bb.instances.sync
BatchSyncInstances(ctx context.Context, in *BatchSyncInstancesRequest, opts ...grpc.CallOption) (*BatchSyncInstancesResponse, error)
// Updates multiple instances in a single request.
// Permissions required: bb.instances.update
BatchUpdateInstances(ctx context.Context, in *BatchUpdateInstancesRequest, opts ...grpc.CallOption) (*BatchUpdateInstancesResponse, error)
// Adds a read-only data source to an instance.
// Permissions required: bb.instances.update
AddDataSource(ctx context.Context, in *AddDataSourceRequest, opts ...grpc.CallOption) (*Instance, error)
// Removes a read-only data source from an instance.
// Permissions required: bb.instances.update
RemoveDataSource(ctx context.Context, in *RemoveDataSourceRequest, opts ...grpc.CallOption) (*Instance, error)
// Updates a data source configuration.
// Permissions required: bb.instances.update
UpdateDataSource(ctx context.Context, in *UpdateDataSourceRequest, opts ...grpc.CallOption) (*Instance, error)
}
type instanceServiceClient struct {
cc grpc.ClientConnInterface
}
func NewInstanceServiceClient(cc grpc.ClientConnInterface) InstanceServiceClient {
return &instanceServiceClient{cc}
}
func (c *instanceServiceClient) GetInstance(ctx context.Context, in *GetInstanceRequest, opts ...grpc.CallOption) (*Instance, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Instance)
err := c.cc.Invoke(ctx, InstanceService_GetInstance_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *instanceServiceClient) ListInstances(ctx context.Context, in *ListInstancesRequest, opts ...grpc.CallOption) (*ListInstancesResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ListInstancesResponse)
err := c.cc.Invoke(ctx, InstanceService_ListInstances_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *instanceServiceClient) CreateInstance(ctx context.Context, in *CreateInstanceRequest, opts ...grpc.CallOption) (*Instance, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Instance)
err := c.cc.Invoke(ctx, InstanceService_CreateInstance_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *instanceServiceClient) PrepareSampleProjectInstance(ctx context.Context, in *PrepareSampleProjectInstanceRequest, opts ...grpc.CallOption) (*Instance, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Instance)
err := c.cc.Invoke(ctx, InstanceService_PrepareSampleProjectInstance_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *instanceServiceClient) UpdateInstance(ctx context.Context, in *UpdateInstanceRequest, opts ...grpc.CallOption) (*Instance, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Instance)
err := c.cc.Invoke(ctx, InstanceService_UpdateInstance_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *instanceServiceClient) DeleteInstance(ctx context.Context, in *DeleteInstanceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, InstanceService_DeleteInstance_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *instanceServiceClient) UndeleteInstance(ctx context.Context, in *UndeleteInstanceRequest, opts ...grpc.CallOption) (*Instance, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Instance)
err := c.cc.Invoke(ctx, InstanceService_UndeleteInstance_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *instanceServiceClient) SyncInstance(ctx context.Context, in *SyncInstanceRequest, opts ...grpc.CallOption) (*SyncInstanceResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(SyncInstanceResponse)
err := c.cc.Invoke(ctx, InstanceService_SyncInstance_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *instanceServiceClient) ListInstanceDatabase(ctx context.Context, in *ListInstanceDatabaseRequest, opts ...grpc.CallOption) (*ListInstanceDatabaseResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ListInstanceDatabaseResponse)
err := c.cc.Invoke(ctx, InstanceService_ListInstanceDatabase_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *instanceServiceClient) BatchSyncInstances(ctx context.Context, in *BatchSyncInstancesRequest, opts ...grpc.CallOption) (*BatchSyncInstancesResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(BatchSyncInstancesResponse)
err := c.cc.Invoke(ctx, InstanceService_BatchSyncInstances_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *instanceServiceClient) BatchUpdateInstances(ctx context.Context, in *BatchUpdateInstancesRequest, opts ...grpc.CallOption) (*BatchUpdateInstancesResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(BatchUpdateInstancesResponse)
err := c.cc.Invoke(ctx, InstanceService_BatchUpdateInstances_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *instanceServiceClient) AddDataSource(ctx context.Context, in *AddDataSourceRequest, opts ...grpc.CallOption) (*Instance, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Instance)
err := c.cc.Invoke(ctx, InstanceService_AddDataSource_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *instanceServiceClient) RemoveDataSource(ctx context.Context, in *RemoveDataSourceRequest, opts ...grpc.CallOption) (*Instance, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Instance)
err := c.cc.Invoke(ctx, InstanceService_RemoveDataSource_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *instanceServiceClient) UpdateDataSource(ctx context.Context, in *UpdateDataSourceRequest, opts ...grpc.CallOption) (*Instance, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Instance)
err := c.cc.Invoke(ctx, InstanceService_UpdateDataSource_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// InstanceServiceServer is the server API for InstanceService service.
// All implementations must embed UnimplementedInstanceServiceServer
// for forward compatibility.
//
// InstanceService manages database instances and their connections.
type InstanceServiceServer interface {
// Gets a database instance by name.
// Permissions required: bb.instances.get
GetInstance(context.Context, *GetInstanceRequest) (*Instance, error)
// Lists database instances, optionally within a project.
// Permissions required: bb.instances.list
ListInstances(context.Context, *ListInstancesRequest) (*ListInstancesResponse, error)
// Creates a new database instance.
// Permissions required: bb.instances.create
CreateInstance(context.Context, *CreateInstanceRequest) (*Instance, error)
// Prepares a Sample Project Instance for a project.
// Permissions required: bb.instances.create
PrepareSampleProjectInstance(context.Context, *PrepareSampleProjectInstanceRequest) (*Instance, error)
// Updates a database instance.
// Permissions required: bb.instances.update
UpdateInstance(context.Context, *UpdateInstanceRequest) (*Instance, error)
// Deletes or soft-deletes a database instance.
// Soft-delete requests fail with FAILED_PRECONDITION while any task run
// targeting the instance is pending, available, or running.
// Permissions required: bb.instances.delete
DeleteInstance(context.Context, *DeleteInstanceRequest) (*emptypb.Empty, error)
// Restores a soft-deleted database instance.
// Restore requests fail with FAILED_PRECONDITION while any task run targeting
// the instance is pending, available, or running.
// Permissions required: bb.instances.undelete
UndeleteInstance(context.Context, *UndeleteInstanceRequest) (*Instance, error)
// Syncs database schemas and metadata from an instance.
// Permissions required: bb.instances.sync
SyncInstance(context.Context, *SyncInstanceRequest) (*SyncInstanceResponse, error)
// Lists all databases within an instance without creating them.
// Permissions required: bb.instances.get
ListInstanceDatabase(context.Context, *ListInstanceDatabaseRequest) (*ListInstanceDatabaseResponse, error)
// Syncs multiple instances in a single request.
// Permissions required: bb.instances.sync
BatchSyncInstances(context.Context, *BatchSyncInstancesRequest) (*BatchSyncInstancesResponse, error)
// Updates multiple instances in a single request.
// Permissions required: bb.instances.update
BatchUpdateInstances(context.Context, *BatchUpdateInstancesRequest) (*BatchUpdateInstancesResponse, error)
// Adds a read-only data source to an instance.
// Permissions required: bb.instances.update
AddDataSource(context.Context, *AddDataSourceRequest) (*Instance, error)
// Removes a read-only data source from an instance.
// Permissions required: bb.instances.update
RemoveDataSource(context.Context, *RemoveDataSourceRequest) (*Instance, error)
// Updates a data source configuration.
// Permissions required: bb.instances.update
UpdateDataSource(context.Context, *UpdateDataSourceRequest) (*Instance, error)
mustEmbedUnimplementedInstanceServiceServer()
}
// UnimplementedInstanceServiceServer must be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedInstanceServiceServer struct{}
func (UnimplementedInstanceServiceServer) GetInstance(context.Context, *GetInstanceRequest) (*Instance, error) {
return nil, status.Error(codes.Unimplemented, "method GetInstance not implemented")
}
func (UnimplementedInstanceServiceServer) ListInstances(context.Context, *ListInstancesRequest) (*ListInstancesResponse, error) {
return nil, status.Error(codes.Unimplemented, "method ListInstances not implemented")
}
func (UnimplementedInstanceServiceServer) CreateInstance(context.Context, *CreateInstanceRequest) (*Instance, error) {
return nil, status.Error(codes.Unimplemented, "method CreateInstance not implemented")
}
func (UnimplementedInstanceServiceServer) PrepareSampleProjectInstance(context.Context, *PrepareSampleProjectInstanceRequest) (*Instance, error) {
return nil, status.Error(codes.Unimplemented, "method PrepareSampleProjectInstance not implemented")
}
func (UnimplementedInstanceServiceServer) UpdateInstance(context.Context, *UpdateInstanceRequest) (*Instance, error) {
return nil, status.Error(codes.Unimplemented, "method UpdateInstance not implemented")
}
func (UnimplementedInstanceServiceServer) DeleteInstance(context.Context, *DeleteInstanceRequest) (*emptypb.Empty, error) {
return nil, status.Error(codes.Unimplemented, "method DeleteInstance not implemented")
}
func (UnimplementedInstanceServiceServer) UndeleteInstance(context.Context, *UndeleteInstanceRequest) (*Instance, error) {
return nil, status.Error(codes.Unimplemented, "method UndeleteInstance not implemented")
}
func (UnimplementedInstanceServiceServer) SyncInstance(context.Context, *SyncInstanceRequest) (*SyncInstanceResponse, error) {
return nil, status.Error(codes.Unimplemented, "method SyncInstance not implemented")
}
func (UnimplementedInstanceServiceServer) ListInstanceDatabase(context.Context, *ListInstanceDatabaseRequest) (*ListInstanceDatabaseResponse, error) {
return nil, status.Error(codes.Unimplemented, "method ListInstanceDatabase not implemented")
}
func (UnimplementedInstanceServiceServer) BatchSyncInstances(context.Context, *BatchSyncInstancesRequest) (*BatchSyncInstancesResponse, error) {
return nil, status.Error(codes.Unimplemented, "method BatchSyncInstances not implemented")
}
func (UnimplementedInstanceServiceServer) BatchUpdateInstances(context.Context, *BatchUpdateInstancesRequest) (*BatchUpdateInstancesResponse, error) {
return nil, status.Error(codes.Unimplemented, "method BatchUpdateInstances not implemented")
}
func (UnimplementedInstanceServiceServer) AddDataSource(context.Context, *AddDataSourceRequest) (*Instance, error) {
return nil, status.Error(codes.Unimplemented, "method AddDataSource not implemented")
}
func (UnimplementedInstanceServiceServer) RemoveDataSource(context.Context, *RemoveDataSourceRequest) (*Instance, error) {
return nil, status.Error(codes.Unimplemented, "method RemoveDataSource not implemented")
}
func (UnimplementedInstanceServiceServer) UpdateDataSource(context.Context, *UpdateDataSourceRequest) (*Instance, error) {
return nil, status.Error(codes.Unimplemented, "method UpdateDataSource not implemented")
}
func (UnimplementedInstanceServiceServer) mustEmbedUnimplementedInstanceServiceServer() {}
func (UnimplementedInstanceServiceServer) testEmbeddedByValue() {}
// UnsafeInstanceServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to InstanceServiceServer will
// result in compilation errors.
type UnsafeInstanceServiceServer interface {
mustEmbedUnimplementedInstanceServiceServer()
}
func RegisterInstanceServiceServer(s grpc.ServiceRegistrar, srv InstanceServiceServer) {
// If the following call panics, it indicates UnimplementedInstanceServiceServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
t.testEmbeddedByValue()
}
s.RegisterService(&InstanceService_ServiceDesc, srv)
}
func _InstanceService_GetInstance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetInstanceRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(InstanceServiceServer).GetInstance(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: InstanceService_GetInstance_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(InstanceServiceServer).GetInstance(ctx, req.(*GetInstanceRequest))
}
return interceptor(ctx, in, info, handler)
}
func _InstanceService_ListInstances_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListInstancesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(InstanceServiceServer).ListInstances(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: InstanceService_ListInstances_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(InstanceServiceServer).ListInstances(ctx, req.(*ListInstancesRequest))
}
return interceptor(ctx, in, info, handler)
}
func _InstanceService_CreateInstance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateInstanceRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(InstanceServiceServer).CreateInstance(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: InstanceService_CreateInstance_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(InstanceServiceServer).CreateInstance(ctx, req.(*CreateInstanceRequest))
}
return interceptor(ctx, in, info, handler)
}
func _InstanceService_PrepareSampleProjectInstance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(PrepareSampleProjectInstanceRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(InstanceServiceServer).PrepareSampleProjectInstance(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: InstanceService_PrepareSampleProjectInstance_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(InstanceServiceServer).PrepareSampleProjectInstance(ctx, req.(*PrepareSampleProjectInstanceRequest))
}
return interceptor(ctx, in, info, handler)
}
func _InstanceService_UpdateInstance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateInstanceRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(InstanceServiceServer).UpdateInstance(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: InstanceService_UpdateInstance_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(InstanceServiceServer).UpdateInstance(ctx, req.(*UpdateInstanceRequest))
}
return interceptor(ctx, in, info, handler)
}
func _InstanceService_DeleteInstance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteInstanceRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(InstanceServiceServer).DeleteInstance(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: InstanceService_DeleteInstance_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(InstanceServiceServer).DeleteInstance(ctx, req.(*DeleteInstanceRequest))
}
return interceptor(ctx, in, info, handler)
}
func _InstanceService_UndeleteInstance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UndeleteInstanceRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(InstanceServiceServer).UndeleteInstance(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: InstanceService_UndeleteInstance_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(InstanceServiceServer).UndeleteInstance(ctx, req.(*UndeleteInstanceRequest))
}
return interceptor(ctx, in, info, handler)
}
func _InstanceService_SyncInstance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SyncInstanceRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(InstanceServiceServer).SyncInstance(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: InstanceService_SyncInstance_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(InstanceServiceServer).SyncInstance(ctx, req.(*SyncInstanceRequest))
}
return interceptor(ctx, in, info, handler)
}
func _InstanceService_ListInstanceDatabase_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListInstanceDatabaseRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(InstanceServiceServer).ListInstanceDatabase(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: InstanceService_ListInstanceDatabase_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(InstanceServiceServer).ListInstanceDatabase(ctx, req.(*ListInstanceDatabaseRequest))
}
return interceptor(ctx, in, info, handler)
}
func _InstanceService_BatchSyncInstances_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(BatchSyncInstancesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(InstanceServiceServer).BatchSyncInstances(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: InstanceService_BatchSyncInstances_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(InstanceServiceServer).BatchSyncInstances(ctx, req.(*BatchSyncInstancesRequest))
}
return interceptor(ctx, in, info, handler)
}
func _InstanceService_BatchUpdateInstances_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(BatchUpdateInstancesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(InstanceServiceServer).BatchUpdateInstances(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: InstanceService_BatchUpdateInstances_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(InstanceServiceServer).BatchUpdateInstances(ctx, req.(*BatchUpdateInstancesRequest))
}
return interceptor(ctx, in, info, handler)
}
func _InstanceService_AddDataSource_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(AddDataSourceRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(InstanceServiceServer).AddDataSource(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: InstanceService_AddDataSource_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(InstanceServiceServer).AddDataSource(ctx, req.(*AddDataSourceRequest))
}
return interceptor(ctx, in, info, handler)
}
func _InstanceService_RemoveDataSource_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(RemoveDataSourceRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(InstanceServiceServer).RemoveDataSource(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: InstanceService_RemoveDataSource_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(InstanceServiceServer).RemoveDataSource(ctx, req.(*RemoveDataSourceRequest))
}
return interceptor(ctx, in, info, handler)
}
func _InstanceService_UpdateDataSource_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateDataSourceRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(InstanceServiceServer).UpdateDataSource(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: InstanceService_UpdateDataSource_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(InstanceServiceServer).UpdateDataSource(ctx, req.(*UpdateDataSourceRequest))
}
return interceptor(ctx, in, info, handler)
}
// InstanceService_ServiceDesc is the grpc.ServiceDesc for InstanceService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var InstanceService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "bytebase.v1.InstanceService",
HandlerType: (*InstanceServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetInstance",
Handler: _InstanceService_GetInstance_Handler,
},
{
MethodName: "ListInstances",
Handler: _InstanceService_ListInstances_Handler,
},
{
MethodName: "CreateInstance",
Handler: _InstanceService_CreateInstance_Handler,
},
{
MethodName: "PrepareSampleProjectInstance",
Handler: _InstanceService_PrepareSampleProjectInstance_Handler,
},
{
MethodName: "UpdateInstance",
Handler: _InstanceService_UpdateInstance_Handler,
},
{
MethodName: "DeleteInstance",
Handler: _InstanceService_DeleteInstance_Handler,
},
{
MethodName: "UndeleteInstance",
Handler: _InstanceService_UndeleteInstance_Handler,
},
{
MethodName: "SyncInstance",
Handler: _InstanceService_SyncInstance_Handler,
},
{
MethodName: "ListInstanceDatabase",
Handler: _InstanceService_ListInstanceDatabase_Handler,
},
{
MethodName: "BatchSyncInstances",
Handler: _InstanceService_BatchSyncInstances_Handler,
},
{
MethodName: "BatchUpdateInstances",
Handler: _InstanceService_BatchUpdateInstances_Handler,
},
{
MethodName: "AddDataSource",
Handler: _InstanceService_AddDataSource_Handler,
},
{
MethodName: "RemoveDataSource",
Handler: _InstanceService_RemoveDataSource_Handler,
},
{
MethodName: "UpdateDataSource",
Handler: _InstanceService_UpdateDataSource_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "v1/instance_service.proto",
}