зеркало из https://github.com/github/vitess-gh.git
Add GetSrvKeyspaces rpc, run generators and add method stub
Signed-off-by: Andrew Mason <amason@slack-corp.com>
This commit is contained in:
Родитель
58fc9a158a
Коммит
51a640ee53
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -29,52 +29,53 @@ const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
|
|||
func init() { proto.RegisterFile("vtctlservice.proto", fileDescriptor_27055cdbb1148d2b) }
|
||||
|
||||
var fileDescriptor_27055cdbb1148d2b = []byte{
|
||||
// 710 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x96, 0xd1, 0x4e, 0x14, 0x3d,
|
||||
0x14, 0xc7, 0xd9, 0x8b, 0x8f, 0x7c, 0x56, 0x14, 0x52, 0x8d, 0x26, 0x0b, 0x3b, 0x02, 0x8a, 0x8a,
|
||||
0x51, 0xd6, 0xe0, 0xa5, 0x57, 0xb0, 0xae, 0x48, 0x48, 0x08, 0x02, 0x81, 0x84, 0x84, 0x8b, 0x32,
|
||||
0x73, 0x60, 0x27, 0x74, 0x3a, 0x4b, 0x5b, 0x46, 0x36, 0xbe, 0x88, 0x8f, 0xe4, 0xa5, 0x8f, 0x60,
|
||||
0xf0, 0x09, 0x7c, 0x03, 0xb3, 0xd3, 0x6d, 0xe9, 0x74, 0x5a, 0xd8, 0xbb, 0xdd, 0xf3, 0xfb, 0x9f,
|
||||
0xff, 0xe9, 0x99, 0xe9, 0x69, 0x07, 0xe1, 0x42, 0xc6, 0x92, 0x0a, 0xe0, 0x45, 0x1a, 0xc3, 0x4a,
|
||||
0x9f, 0xe7, 0x32, 0xc7, 0x53, 0x76, 0xac, 0x39, 0x5d, 0xfe, 0x4b, 0x88, 0x24, 0x0a, 0xaf, 0x5e,
|
||||
0xa0, 0xff, 0x0e, 0x86, 0x21, 0xdc, 0x43, 0x8f, 0xba, 0x57, 0x10, 0x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 0x7c, 0x37, 0xa6, 0x5a, 0x17, 0x5f, 0xff, 0xf8, 0xf3, 0x3a, 0x6a,
|
||||
0xfc, 0xba, 0x8e, 0x1a, 0xbf, 0xaf, 0xa3, 0xc6, 0x8f, 0x3f, 0xd1, 0xc4, 0xd1, 0x72, 0x91, 0x4a,
|
||||
0x10, 0x62, 0x25, 0xcd, 0xdb, 0xea, 0x57, 0xfb, 0x2c, 0x6f, 0x17, 0xb2, 0x5d, 0x7e, 0x16, 0xb6,
|
||||
0xed, 0x8f, 0xc6, 0x93, 0xc9, 0x32, 0xf6, 0xe1, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x3b, 0xa1,
|
||||
0xee, 0xe7, 0x5f, 0x0a, 0x00, 0x00,
|
||||
// 725 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x96, 0xdb, 0x4e, 0x14, 0x4d,
|
||||
0x10, 0xc7, 0xd9, 0x8b, 0x8f, 0x7c, 0xb6, 0x28, 0xa4, 0x31, 0x9a, 0x2c, 0xec, 0xb0, 0xa0, 0xa8,
|
||||
0x18, 0x65, 0x0d, 0x5e, 0x7a, 0x05, 0xeb, 0x8a, 0x84, 0x84, 0x20, 0x10, 0x48, 0x48, 0xb8, 0x68,
|
||||
0x66, 0x0a, 0x76, 0xc2, 0x1c, 0x96, 0xe9, 0x66, 0x64, 0xe3, 0x8b, 0xf8, 0x48, 0xde, 0x98, 0xf8,
|
||||
0x08, 0x06, 0x5f, 0xc4, 0x30, 0xbd, 0xdd, 0xd4, 0xf4, 0x01, 0xb8, 0xdb, 0xad, 0xdf, 0xbf, 0xfe,
|
||||
0x35, 0x7d, 0xa8, 0x9a, 0x21, 0xb4, 0x14, 0xa1, 0x48, 0x38, 0x14, 0x65, 0x1c, 0xc2, 0xf2, 0xa0,
|
||||
0xc8, 0x45, 0x4e, 0x27, 0x70, 0xac, 0x39, 0x59, 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, 0xd3, 0x5e, 0x0a, 0xc5, 0x29, 0x64, 0xe1, 0x70, 0x07,
|
||||
0x06, 0xac, 0x80, 0x4c, 0xc8, 0xcd, 0x7d, 0x8d, 0xaf, 0x96, 0x53, 0xa2, 0xea, 0x2c, 0xdd, 0x43,
|
||||
0xa9, 0x0b, 0x16, 0xe4, 0xd9, 0xe7, 0x38, 0x8b, 0x56, 0x93, 0x44, 0xae, 0x70, 0x23, 0xd3, 0x7b,
|
||||
0x8f, 0x7d, 0x3c, 0x1a, 0x55, 0xf2, 0xcd, 0x7d, 0xa4, 0xba, 0xe6, 0x26, 0x21, 0xeb, 0x20, 0xd6,
|
||||
0x58, 0x78, 0x76, 0x31, 0xe0, 0x74, 0x16, 0xe5, 0xde, 0x84, 0x95, 0x73, 0xcb, 0x43, 0xb5, 0xd9,
|
||||
0x11, 0x99, 0x5a, 0x07, 0xd1, 0x85, 0x24, 0xd9, 0xc8, 0x4e, 0xf2, 0x2d, 0x96, 0x02, 0xaf, 0xf5,
|
||||
0x8e, 0x09, 0x5d, 0xbd, 0x63, 0x6b, 0xf0, 0x15, 0x47, 0x94, 0xb6, 0xdc, 0x59, 0xae, 0x2b, 0x5e,
|
||||
0xc3, 0xda, 0xef, 0x90, 0x4c, 0x8e, 0x00, 0x5f, 0x4d, 0x62, 0xc6, 0x81, 0xd3, 0x79, 0x3b, 0x49,
|
||||
0x31, 0xe5, 0xbb, 0x70, 0x9b, 0xc4, 0x78, 0x56, 0x7d, 0x7e, 0xc6, 0xb3, 0x9a, 0x67, 0x16, 0xf8,
|
||||
0x30, 0xee, 0x1a, 0x04, 0xea, 0x5d, 0x83, 0x81, 0xab, 0x6b, 0xea, 0x5c, 0x5b, 0x7e, 0x21, 0x0f,
|
||||
0xd6, 0x41, 0xec, 0x86, 0x7d, 0x48, 0x19, 0x9d, 0xa9, 0xeb, 0x65, 0x54, 0x99, 0xcd, 0xba, 0xa1,
|
||||
0x76, 0xea, 0x91, 0xff, 0xaf, 0xc3, 0x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xed, 0x5a, 0x1e, 0x46, 0xae, 0xd7, 0xbc, 0xa9, 0xd0, 0xc6, 0xdf,
|
||||
0x49, 0x53, 0xc6, 0x7a, 0x97, 0x02, 0x8a, 0x8c, 0x25, 0x89, 0x7e, 0xef, 0x41, 0x44, 0xdf, 0x22,
|
||||
0x0b, 0xbf, 0x4c, 0x15, 0x7c, 0x77, 0x4f, 0xb5, 0x2a, 0xbe, 0xf6, 0xf1, 0xe7, 0x55, 0xd0, 0xf8,
|
||||
0x7d, 0x15, 0x34, 0xfe, 0x5c, 0x05, 0x8d, 0x1f, 0x7f, 0x83, 0xb1, 0xc3, 0xa5, 0x32, 0x16, 0xc0,
|
||||
0xf9, 0x72, 0x9c, 0x77, 0xe4, 0xaf, 0xce, 0x69, 0xde, 0x29, 0x45, 0xa7, 0xfa, 0xe4, 0xec, 0xe0,
|
||||
0x0f, 0xd2, 0xe3, 0xf1, 0x2a, 0xf6, 0xe1, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xc6, 0x00, 0x52,
|
||||
0x66, 0xbb, 0x0a, 0x00, 0x00,
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
|
@ -237,6 +238,9 @@ type VtctldClient interface {
|
|||
GetSchema(ctx context.Context, in *vtctldata.GetSchemaRequest, opts ...grpc.CallOption) (*vtctldata.GetSchemaResponse, error)
|
||||
// GetShard returns information about a shard in the topology.
|
||||
GetShard(ctx context.Context, in *vtctldata.GetShardRequest, opts ...grpc.CallOption) (*vtctldata.GetShardResponse, error)
|
||||
// GetSrvKeyspaces returns the SrvKeyspaces for a keyspace in one or more
|
||||
// cells.
|
||||
GetSrvKeyspaces(ctx context.Context, in *vtctldata.GetSrvKeyspacesRequest, opts ...grpc.CallOption) (*vtctldata.GetSrvKeyspacesResponse, error)
|
||||
// GetSrvVSchema returns a the SrvVSchema for a cell.
|
||||
GetSrvVSchema(ctx context.Context, in *vtctldata.GetSrvVSchemaRequest, opts ...grpc.CallOption) (*vtctldata.GetSrvVSchemaResponse, error)
|
||||
// GetTablet returns information about a tablet.
|
||||
|
@ -434,6 +438,15 @@ func (c *vtctldClient) GetShard(ctx context.Context, in *vtctldata.GetShardReque
|
|||
return out, nil
|
||||
}
|
||||
|
||||
func (c *vtctldClient) GetSrvKeyspaces(ctx context.Context, in *vtctldata.GetSrvKeyspacesRequest, opts ...grpc.CallOption) (*vtctldata.GetSrvKeyspacesResponse, error) {
|
||||
out := new(vtctldata.GetSrvKeyspacesResponse)
|
||||
err := c.cc.Invoke(ctx, "/vtctlservice.Vtctld/GetSrvKeyspaces", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *vtctldClient) GetSrvVSchema(ctx context.Context, in *vtctldata.GetSrvVSchemaRequest, opts ...grpc.CallOption) (*vtctldata.GetSrvVSchemaResponse, error) {
|
||||
out := new(vtctldata.GetSrvVSchemaResponse)
|
||||
err := c.cc.Invoke(ctx, "/vtctlservice.Vtctld/GetSrvVSchema", in, out, opts...)
|
||||
|
@ -584,6 +597,9 @@ type VtctldServer interface {
|
|||
GetSchema(context.Context, *vtctldata.GetSchemaRequest) (*vtctldata.GetSchemaResponse, error)
|
||||
// GetShard returns information about a shard in the topology.
|
||||
GetShard(context.Context, *vtctldata.GetShardRequest) (*vtctldata.GetShardResponse, error)
|
||||
// GetSrvKeyspaces returns the SrvKeyspaces for a keyspace in one or more
|
||||
// cells.
|
||||
GetSrvKeyspaces(context.Context, *vtctldata.GetSrvKeyspacesRequest) (*vtctldata.GetSrvKeyspacesResponse, error)
|
||||
// GetSrvVSchema returns a the SrvVSchema for a cell.
|
||||
GetSrvVSchema(context.Context, *vtctldata.GetSrvVSchemaRequest) (*vtctldata.GetSrvVSchemaResponse, error)
|
||||
// GetTablet returns information about a tablet.
|
||||
|
@ -681,6 +697,9 @@ func (*UnimplementedVtctldServer) GetSchema(ctx context.Context, req *vtctldata.
|
|||
func (*UnimplementedVtctldServer) GetShard(ctx context.Context, req *vtctldata.GetShardRequest) (*vtctldata.GetShardResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetShard not implemented")
|
||||
}
|
||||
func (*UnimplementedVtctldServer) GetSrvKeyspaces(ctx context.Context, req *vtctldata.GetSrvKeyspacesRequest) (*vtctldata.GetSrvKeyspacesResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetSrvKeyspaces not implemented")
|
||||
}
|
||||
func (*UnimplementedVtctldServer) GetSrvVSchema(ctx context.Context, req *vtctldata.GetSrvVSchemaRequest) (*vtctldata.GetSrvVSchemaResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetSrvVSchema not implemented")
|
||||
}
|
||||
|
@ -1007,6 +1026,24 @@ func _Vtctld_GetShard_Handler(srv interface{}, ctx context.Context, dec func(int
|
|||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Vtctld_GetSrvKeyspaces_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(vtctldata.GetSrvKeyspacesRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(VtctldServer).GetSrvKeyspaces(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/vtctlservice.Vtctld/GetSrvKeyspaces",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(VtctldServer).GetSrvKeyspaces(ctx, req.(*vtctldata.GetSrvKeyspacesRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Vtctld_GetSrvVSchema_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(vtctldata.GetSrvVSchemaRequest)
|
||||
if err := dec(in); err != nil {
|
||||
|
@ -1273,6 +1310,10 @@ var _Vtctld_serviceDesc = grpc.ServiceDesc{
|
|||
MethodName: "GetShard",
|
||||
Handler: _Vtctld_GetShard_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetSrvKeyspaces",
|
||||
Handler: _Vtctld_GetSrvKeyspaces_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetSrvVSchema",
|
||||
Handler: _Vtctld_GetSrvVSchema_Handler,
|
||||
|
|
|
@ -172,6 +172,15 @@ func (client *gRPCVtctldClient) GetShard(ctx context.Context, in *vtctldatapb.Ge
|
|||
return client.c.GetShard(ctx, in, opts...)
|
||||
}
|
||||
|
||||
// GetSrvKeyspaces is part of the vtctlservicepb.VtctldClient interface.
|
||||
func (client *gRPCVtctldClient) GetSrvKeyspaces(ctx context.Context, in *vtctldatapb.GetSrvKeyspacesRequest, opts ...grpc.CallOption) (*vtctldatapb.GetSrvKeyspacesResponse, error) {
|
||||
if client.c == nil {
|
||||
return nil, status.Error(codes.Unavailable, connClosedMsg)
|
||||
}
|
||||
|
||||
return client.c.GetSrvKeyspaces(ctx, in, opts...)
|
||||
}
|
||||
|
||||
// GetSrvVSchema is part of the vtctlservicepb.VtctldClient interface.
|
||||
func (client *gRPCVtctldClient) GetSrvVSchema(ctx context.Context, in *vtctldatapb.GetSrvVSchemaRequest, opts ...grpc.CallOption) (*vtctldatapb.GetSrvVSchemaResponse, error) {
|
||||
if client.c == nil {
|
||||
|
|
|
@ -556,6 +556,11 @@ func (s *VtctldServer) GetShard(ctx context.Context, req *vtctldatapb.GetShardRe
|
|||
}, nil
|
||||
}
|
||||
|
||||
// GetSrvKeyspaces is part of the vtctlservicepb.VtctldServer interface.
|
||||
func (s *VtctldServer) GetSrvKeyspaces(ctx context.Context, req *vtctldatapb.GetSrvKeyspacesRequest) (*vtctldatapb.GetSrvKeyspacesResponse, error) {
|
||||
panic("unimplemented!")
|
||||
}
|
||||
|
||||
// GetSrvVSchema is part of the vtctlservicepb.VtctldServer interface.
|
||||
func (s *VtctldServer) GetSrvVSchema(ctx context.Context, req *vtctldatapb.GetSrvVSchemaRequest) (*vtctldatapb.GetSrvVSchemaResponse, error) {
|
||||
vschema, err := s.ts.GetSrvVSchema(ctx, req.Cell)
|
||||
|
|
|
@ -351,6 +351,18 @@ message GetShardResponse {
|
|||
Shard shard = 1;
|
||||
}
|
||||
|
||||
message GetSrvKeyspacesRequest {
|
||||
string keyspace = 1;
|
||||
// Cells is a list of cells to lookup a SrvKeyspace for. Leaving this empty is
|
||||
// equivalent to specifying all cells in the topo.
|
||||
repeated string cells = 2;
|
||||
}
|
||||
|
||||
message GetSrvKeyspacesResponse {
|
||||
// SrvKeyspaces is a mapping of cell name to SrvKeyspace.
|
||||
map<string, topodata.SrvKeyspace> srv_keyspaces = 1;
|
||||
}
|
||||
|
||||
message GetSrvVSchemaRequest {
|
||||
string cell = 1;
|
||||
}
|
||||
|
|
|
@ -80,6 +80,9 @@ service Vtctld {
|
|||
rpc GetSchema(vtctldata.GetSchemaRequest) returns (vtctldata.GetSchemaResponse) {};
|
||||
// GetShard returns information about a shard in the topology.
|
||||
rpc GetShard(vtctldata.GetShardRequest) returns (vtctldata.GetShardResponse) {};
|
||||
// GetSrvKeyspaces returns the SrvKeyspaces for a keyspace in one or more
|
||||
// cells.
|
||||
rpc GetSrvKeyspaces (vtctldata.GetSrvKeyspacesRequest) returns (vtctldata.GetSrvKeyspacesResponse) {};
|
||||
// GetSrvVSchema returns a the SrvVSchema for a cell.
|
||||
rpc GetSrvVSchema(vtctldata.GetSrvVSchemaRequest) returns (vtctldata.GetSrvVSchemaResponse) {};
|
||||
// GetTablet returns information about a tablet.
|
||||
|
|
|
@ -25953,6 +25953,192 @@ export namespace vtctldata {
|
|||
public toJSON(): { [k: string]: any };
|
||||
}
|
||||
|
||||
/** Properties of a GetSrvKeyspacesRequest. */
|
||||
interface IGetSrvKeyspacesRequest {
|
||||
|
||||
/** GetSrvKeyspacesRequest keyspace */
|
||||
keyspace?: (string|null);
|
||||
|
||||
/** GetSrvKeyspacesRequest cells */
|
||||
cells?: (string[]|null);
|
||||
}
|
||||
|
||||
/** Represents a GetSrvKeyspacesRequest. */
|
||||
class GetSrvKeyspacesRequest implements IGetSrvKeyspacesRequest {
|
||||
|
||||
/**
|
||||
* Constructs a new GetSrvKeyspacesRequest.
|
||||
* @param [properties] Properties to set
|
||||
*/
|
||||
constructor(properties?: vtctldata.IGetSrvKeyspacesRequest);
|
||||
|
||||
/** GetSrvKeyspacesRequest keyspace. */
|
||||
public keyspace: string;
|
||||
|
||||
/** GetSrvKeyspacesRequest cells. */
|
||||
public cells: string[];
|
||||
|
||||
/**
|
||||
* Creates a new GetSrvKeyspacesRequest instance using the specified properties.
|
||||
* @param [properties] Properties to set
|
||||
* @returns GetSrvKeyspacesRequest instance
|
||||
*/
|
||||
public static create(properties?: vtctldata.IGetSrvKeyspacesRequest): vtctldata.GetSrvKeyspacesRequest;
|
||||
|
||||
/**
|
||||
* Encodes the specified GetSrvKeyspacesRequest message. Does not implicitly {@link vtctldata.GetSrvKeyspacesRequest.verify|verify} messages.
|
||||
* @param message GetSrvKeyspacesRequest message or plain object to encode
|
||||
* @param [writer] Writer to encode to
|
||||
* @returns Writer
|
||||
*/
|
||||
public static encode(message: vtctldata.IGetSrvKeyspacesRequest, writer?: $protobuf.Writer): $protobuf.Writer;
|
||||
|
||||
/**
|
||||
* Encodes the specified GetSrvKeyspacesRequest message, length delimited. Does not implicitly {@link vtctldata.GetSrvKeyspacesRequest.verify|verify} messages.
|
||||
* @param message GetSrvKeyspacesRequest message or plain object to encode
|
||||
* @param [writer] Writer to encode to
|
||||
* @returns Writer
|
||||
*/
|
||||
public static encodeDelimited(message: vtctldata.IGetSrvKeyspacesRequest, writer?: $protobuf.Writer): $protobuf.Writer;
|
||||
|
||||
/**
|
||||
* Decodes a GetSrvKeyspacesRequest message from the specified reader or buffer.
|
||||
* @param reader Reader or buffer to decode from
|
||||
* @param [length] Message length if known beforehand
|
||||
* @returns GetSrvKeyspacesRequest
|
||||
* @throws {Error} If the payload is not a reader or valid buffer
|
||||
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
||||
*/
|
||||
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetSrvKeyspacesRequest;
|
||||
|
||||
/**
|
||||
* Decodes a GetSrvKeyspacesRequest message from the specified reader or buffer, length delimited.
|
||||
* @param reader Reader or buffer to decode from
|
||||
* @returns GetSrvKeyspacesRequest
|
||||
* @throws {Error} If the payload is not a reader or valid buffer
|
||||
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
||||
*/
|
||||
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetSrvKeyspacesRequest;
|
||||
|
||||
/**
|
||||
* Verifies a GetSrvKeyspacesRequest message.
|
||||
* @param message Plain object to verify
|
||||
* @returns `null` if valid, otherwise the reason why it is not
|
||||
*/
|
||||
public static verify(message: { [k: string]: any }): (string|null);
|
||||
|
||||
/**
|
||||
* Creates a GetSrvKeyspacesRequest message from a plain object. Also converts values to their respective internal types.
|
||||
* @param object Plain object
|
||||
* @returns GetSrvKeyspacesRequest
|
||||
*/
|
||||
public static fromObject(object: { [k: string]: any }): vtctldata.GetSrvKeyspacesRequest;
|
||||
|
||||
/**
|
||||
* Creates a plain object from a GetSrvKeyspacesRequest message. Also converts values to other types if specified.
|
||||
* @param message GetSrvKeyspacesRequest
|
||||
* @param [options] Conversion options
|
||||
* @returns Plain object
|
||||
*/
|
||||
public static toObject(message: vtctldata.GetSrvKeyspacesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
|
||||
|
||||
/**
|
||||
* Converts this GetSrvKeyspacesRequest to JSON.
|
||||
* @returns JSON object
|
||||
*/
|
||||
public toJSON(): { [k: string]: any };
|
||||
}
|
||||
|
||||
/** Properties of a GetSrvKeyspacesResponse. */
|
||||
interface IGetSrvKeyspacesResponse {
|
||||
|
||||
/** GetSrvKeyspacesResponse srv_keyspaces */
|
||||
srv_keyspaces?: ({ [k: string]: topodata.ISrvKeyspace }|null);
|
||||
}
|
||||
|
||||
/** Represents a GetSrvKeyspacesResponse. */
|
||||
class GetSrvKeyspacesResponse implements IGetSrvKeyspacesResponse {
|
||||
|
||||
/**
|
||||
* Constructs a new GetSrvKeyspacesResponse.
|
||||
* @param [properties] Properties to set
|
||||
*/
|
||||
constructor(properties?: vtctldata.IGetSrvKeyspacesResponse);
|
||||
|
||||
/** GetSrvKeyspacesResponse srv_keyspaces. */
|
||||
public srv_keyspaces: { [k: string]: topodata.ISrvKeyspace };
|
||||
|
||||
/**
|
||||
* Creates a new GetSrvKeyspacesResponse instance using the specified properties.
|
||||
* @param [properties] Properties to set
|
||||
* @returns GetSrvKeyspacesResponse instance
|
||||
*/
|
||||
public static create(properties?: vtctldata.IGetSrvKeyspacesResponse): vtctldata.GetSrvKeyspacesResponse;
|
||||
|
||||
/**
|
||||
* Encodes the specified GetSrvKeyspacesResponse message. Does not implicitly {@link vtctldata.GetSrvKeyspacesResponse.verify|verify} messages.
|
||||
* @param message GetSrvKeyspacesResponse message or plain object to encode
|
||||
* @param [writer] Writer to encode to
|
||||
* @returns Writer
|
||||
*/
|
||||
public static encode(message: vtctldata.IGetSrvKeyspacesResponse, writer?: $protobuf.Writer): $protobuf.Writer;
|
||||
|
||||
/**
|
||||
* Encodes the specified GetSrvKeyspacesResponse message, length delimited. Does not implicitly {@link vtctldata.GetSrvKeyspacesResponse.verify|verify} messages.
|
||||
* @param message GetSrvKeyspacesResponse message or plain object to encode
|
||||
* @param [writer] Writer to encode to
|
||||
* @returns Writer
|
||||
*/
|
||||
public static encodeDelimited(message: vtctldata.IGetSrvKeyspacesResponse, writer?: $protobuf.Writer): $protobuf.Writer;
|
||||
|
||||
/**
|
||||
* Decodes a GetSrvKeyspacesResponse message from the specified reader or buffer.
|
||||
* @param reader Reader or buffer to decode from
|
||||
* @param [length] Message length if known beforehand
|
||||
* @returns GetSrvKeyspacesResponse
|
||||
* @throws {Error} If the payload is not a reader or valid buffer
|
||||
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
||||
*/
|
||||
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetSrvKeyspacesResponse;
|
||||
|
||||
/**
|
||||
* Decodes a GetSrvKeyspacesResponse message from the specified reader or buffer, length delimited.
|
||||
* @param reader Reader or buffer to decode from
|
||||
* @returns GetSrvKeyspacesResponse
|
||||
* @throws {Error} If the payload is not a reader or valid buffer
|
||||
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
||||
*/
|
||||
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetSrvKeyspacesResponse;
|
||||
|
||||
/**
|
||||
* Verifies a GetSrvKeyspacesResponse message.
|
||||
* @param message Plain object to verify
|
||||
* @returns `null` if valid, otherwise the reason why it is not
|
||||
*/
|
||||
public static verify(message: { [k: string]: any }): (string|null);
|
||||
|
||||
/**
|
||||
* Creates a GetSrvKeyspacesResponse message from a plain object. Also converts values to their respective internal types.
|
||||
* @param object Plain object
|
||||
* @returns GetSrvKeyspacesResponse
|
||||
*/
|
||||
public static fromObject(object: { [k: string]: any }): vtctldata.GetSrvKeyspacesResponse;
|
||||
|
||||
/**
|
||||
* Creates a plain object from a GetSrvKeyspacesResponse message. Also converts values to other types if specified.
|
||||
* @param message GetSrvKeyspacesResponse
|
||||
* @param [options] Conversion options
|
||||
* @returns Plain object
|
||||
*/
|
||||
public static toObject(message: vtctldata.GetSrvKeyspacesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any };
|
||||
|
||||
/**
|
||||
* Converts this GetSrvKeyspacesResponse to JSON.
|
||||
* @returns JSON object
|
||||
*/
|
||||
public toJSON(): { [k: string]: any };
|
||||
}
|
||||
|
||||
/** Properties of a GetSrvVSchemaRequest. */
|
||||
interface IGetSrvVSchemaRequest {
|
||||
|
||||
|
|
|
@ -62099,6 +62099,461 @@ $root.vtctldata = (function() {
|
|||
return GetShardResponse;
|
||||
})();
|
||||
|
||||
vtctldata.GetSrvKeyspacesRequest = (function() {
|
||||
|
||||
/**
|
||||
* Properties of a GetSrvKeyspacesRequest.
|
||||
* @memberof vtctldata
|
||||
* @interface IGetSrvKeyspacesRequest
|
||||
* @property {string|null} [keyspace] GetSrvKeyspacesRequest keyspace
|
||||
* @property {Array.<string>|null} [cells] GetSrvKeyspacesRequest cells
|
||||
*/
|
||||
|
||||
/**
|
||||
* Constructs a new GetSrvKeyspacesRequest.
|
||||
* @memberof vtctldata
|
||||
* @classdesc Represents a GetSrvKeyspacesRequest.
|
||||
* @implements IGetSrvKeyspacesRequest
|
||||
* @constructor
|
||||
* @param {vtctldata.IGetSrvKeyspacesRequest=} [properties] Properties to set
|
||||
*/
|
||||
function GetSrvKeyspacesRequest(properties) {
|
||||
this.cells = [];
|
||||
if (properties)
|
||||
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
||||
if (properties[keys[i]] != null)
|
||||
this[keys[i]] = properties[keys[i]];
|
||||
}
|
||||
|
||||
/**
|
||||
* GetSrvKeyspacesRequest keyspace.
|
||||
* @member {string} keyspace
|
||||
* @memberof vtctldata.GetSrvKeyspacesRequest
|
||||
* @instance
|
||||
*/
|
||||
GetSrvKeyspacesRequest.prototype.keyspace = "";
|
||||
|
||||
/**
|
||||
* GetSrvKeyspacesRequest cells.
|
||||
* @member {Array.<string>} cells
|
||||
* @memberof vtctldata.GetSrvKeyspacesRequest
|
||||
* @instance
|
||||
*/
|
||||
GetSrvKeyspacesRequest.prototype.cells = $util.emptyArray;
|
||||
|
||||
/**
|
||||
* Creates a new GetSrvKeyspacesRequest instance using the specified properties.
|
||||
* @function create
|
||||
* @memberof vtctldata.GetSrvKeyspacesRequest
|
||||
* @static
|
||||
* @param {vtctldata.IGetSrvKeyspacesRequest=} [properties] Properties to set
|
||||
* @returns {vtctldata.GetSrvKeyspacesRequest} GetSrvKeyspacesRequest instance
|
||||
*/
|
||||
GetSrvKeyspacesRequest.create = function create(properties) {
|
||||
return new GetSrvKeyspacesRequest(properties);
|
||||
};
|
||||
|
||||
/**
|
||||
* Encodes the specified GetSrvKeyspacesRequest message. Does not implicitly {@link vtctldata.GetSrvKeyspacesRequest.verify|verify} messages.
|
||||
* @function encode
|
||||
* @memberof vtctldata.GetSrvKeyspacesRequest
|
||||
* @static
|
||||
* @param {vtctldata.IGetSrvKeyspacesRequest} message GetSrvKeyspacesRequest message or plain object to encode
|
||||
* @param {$protobuf.Writer} [writer] Writer to encode to
|
||||
* @returns {$protobuf.Writer} Writer
|
||||
*/
|
||||
GetSrvKeyspacesRequest.encode = function encode(message, writer) {
|
||||
if (!writer)
|
||||
writer = $Writer.create();
|
||||
if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace"))
|
||||
writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace);
|
||||
if (message.cells != null && message.cells.length)
|
||||
for (var i = 0; i < message.cells.length; ++i)
|
||||
writer.uint32(/* id 2, wireType 2 =*/18).string(message.cells[i]);
|
||||
return writer;
|
||||
};
|
||||
|
||||
/**
|
||||
* Encodes the specified GetSrvKeyspacesRequest message, length delimited. Does not implicitly {@link vtctldata.GetSrvKeyspacesRequest.verify|verify} messages.
|
||||
* @function encodeDelimited
|
||||
* @memberof vtctldata.GetSrvKeyspacesRequest
|
||||
* @static
|
||||
* @param {vtctldata.IGetSrvKeyspacesRequest} message GetSrvKeyspacesRequest message or plain object to encode
|
||||
* @param {$protobuf.Writer} [writer] Writer to encode to
|
||||
* @returns {$protobuf.Writer} Writer
|
||||
*/
|
||||
GetSrvKeyspacesRequest.encodeDelimited = function encodeDelimited(message, writer) {
|
||||
return this.encode(message, writer).ldelim();
|
||||
};
|
||||
|
||||
/**
|
||||
* Decodes a GetSrvKeyspacesRequest message from the specified reader or buffer.
|
||||
* @function decode
|
||||
* @memberof vtctldata.GetSrvKeyspacesRequest
|
||||
* @static
|
||||
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
||||
* @param {number} [length] Message length if known beforehand
|
||||
* @returns {vtctldata.GetSrvKeyspacesRequest} GetSrvKeyspacesRequest
|
||||
* @throws {Error} If the payload is not a reader or valid buffer
|
||||
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
||||
*/
|
||||
GetSrvKeyspacesRequest.decode = function decode(reader, length) {
|
||||
if (!(reader instanceof $Reader))
|
||||
reader = $Reader.create(reader);
|
||||
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetSrvKeyspacesRequest();
|
||||
while (reader.pos < end) {
|
||||
var tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1:
|
||||
message.keyspace = reader.string();
|
||||
break;
|
||||
case 2:
|
||||
if (!(message.cells && message.cells.length))
|
||||
message.cells = [];
|
||||
message.cells.push(reader.string());
|
||||
break;
|
||||
default:
|
||||
reader.skipType(tag & 7);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return message;
|
||||
};
|
||||
|
||||
/**
|
||||
* Decodes a GetSrvKeyspacesRequest message from the specified reader or buffer, length delimited.
|
||||
* @function decodeDelimited
|
||||
* @memberof vtctldata.GetSrvKeyspacesRequest
|
||||
* @static
|
||||
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
||||
* @returns {vtctldata.GetSrvKeyspacesRequest} GetSrvKeyspacesRequest
|
||||
* @throws {Error} If the payload is not a reader or valid buffer
|
||||
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
||||
*/
|
||||
GetSrvKeyspacesRequest.decodeDelimited = function decodeDelimited(reader) {
|
||||
if (!(reader instanceof $Reader))
|
||||
reader = new $Reader(reader);
|
||||
return this.decode(reader, reader.uint32());
|
||||
};
|
||||
|
||||
/**
|
||||
* Verifies a GetSrvKeyspacesRequest message.
|
||||
* @function verify
|
||||
* @memberof vtctldata.GetSrvKeyspacesRequest
|
||||
* @static
|
||||
* @param {Object.<string,*>} message Plain object to verify
|
||||
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
||||
*/
|
||||
GetSrvKeyspacesRequest.verify = function verify(message) {
|
||||
if (typeof message !== "object" || message === null)
|
||||
return "object expected";
|
||||
if (message.keyspace != null && message.hasOwnProperty("keyspace"))
|
||||
if (!$util.isString(message.keyspace))
|
||||
return "keyspace: string expected";
|
||||
if (message.cells != null && message.hasOwnProperty("cells")) {
|
||||
if (!Array.isArray(message.cells))
|
||||
return "cells: array expected";
|
||||
for (var i = 0; i < message.cells.length; ++i)
|
||||
if (!$util.isString(message.cells[i]))
|
||||
return "cells: string[] expected";
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
/**
|
||||
* Creates a GetSrvKeyspacesRequest message from a plain object. Also converts values to their respective internal types.
|
||||
* @function fromObject
|
||||
* @memberof vtctldata.GetSrvKeyspacesRequest
|
||||
* @static
|
||||
* @param {Object.<string,*>} object Plain object
|
||||
* @returns {vtctldata.GetSrvKeyspacesRequest} GetSrvKeyspacesRequest
|
||||
*/
|
||||
GetSrvKeyspacesRequest.fromObject = function fromObject(object) {
|
||||
if (object instanceof $root.vtctldata.GetSrvKeyspacesRequest)
|
||||
return object;
|
||||
var message = new $root.vtctldata.GetSrvKeyspacesRequest();
|
||||
if (object.keyspace != null)
|
||||
message.keyspace = String(object.keyspace);
|
||||
if (object.cells) {
|
||||
if (!Array.isArray(object.cells))
|
||||
throw TypeError(".vtctldata.GetSrvKeyspacesRequest.cells: array expected");
|
||||
message.cells = [];
|
||||
for (var i = 0; i < object.cells.length; ++i)
|
||||
message.cells[i] = String(object.cells[i]);
|
||||
}
|
||||
return message;
|
||||
};
|
||||
|
||||
/**
|
||||
* Creates a plain object from a GetSrvKeyspacesRequest message. Also converts values to other types if specified.
|
||||
* @function toObject
|
||||
* @memberof vtctldata.GetSrvKeyspacesRequest
|
||||
* @static
|
||||
* @param {vtctldata.GetSrvKeyspacesRequest} message GetSrvKeyspacesRequest
|
||||
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
||||
* @returns {Object.<string,*>} Plain object
|
||||
*/
|
||||
GetSrvKeyspacesRequest.toObject = function toObject(message, options) {
|
||||
if (!options)
|
||||
options = {};
|
||||
var object = {};
|
||||
if (options.arrays || options.defaults)
|
||||
object.cells = [];
|
||||
if (options.defaults)
|
||||
object.keyspace = "";
|
||||
if (message.keyspace != null && message.hasOwnProperty("keyspace"))
|
||||
object.keyspace = message.keyspace;
|
||||
if (message.cells && message.cells.length) {
|
||||
object.cells = [];
|
||||
for (var j = 0; j < message.cells.length; ++j)
|
||||
object.cells[j] = message.cells[j];
|
||||
}
|
||||
return object;
|
||||
};
|
||||
|
||||
/**
|
||||
* Converts this GetSrvKeyspacesRequest to JSON.
|
||||
* @function toJSON
|
||||
* @memberof vtctldata.GetSrvKeyspacesRequest
|
||||
* @instance
|
||||
* @returns {Object.<string,*>} JSON object
|
||||
*/
|
||||
GetSrvKeyspacesRequest.prototype.toJSON = function toJSON() {
|
||||
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
||||
};
|
||||
|
||||
return GetSrvKeyspacesRequest;
|
||||
})();
|
||||
|
||||
vtctldata.GetSrvKeyspacesResponse = (function() {
|
||||
|
||||
/**
|
||||
* Properties of a GetSrvKeyspacesResponse.
|
||||
* @memberof vtctldata
|
||||
* @interface IGetSrvKeyspacesResponse
|
||||
* @property {Object.<string,topodata.ISrvKeyspace>|null} [srv_keyspaces] GetSrvKeyspacesResponse srv_keyspaces
|
||||
*/
|
||||
|
||||
/**
|
||||
* Constructs a new GetSrvKeyspacesResponse.
|
||||
* @memberof vtctldata
|
||||
* @classdesc Represents a GetSrvKeyspacesResponse.
|
||||
* @implements IGetSrvKeyspacesResponse
|
||||
* @constructor
|
||||
* @param {vtctldata.IGetSrvKeyspacesResponse=} [properties] Properties to set
|
||||
*/
|
||||
function GetSrvKeyspacesResponse(properties) {
|
||||
this.srv_keyspaces = {};
|
||||
if (properties)
|
||||
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
||||
if (properties[keys[i]] != null)
|
||||
this[keys[i]] = properties[keys[i]];
|
||||
}
|
||||
|
||||
/**
|
||||
* GetSrvKeyspacesResponse srv_keyspaces.
|
||||
* @member {Object.<string,topodata.ISrvKeyspace>} srv_keyspaces
|
||||
* @memberof vtctldata.GetSrvKeyspacesResponse
|
||||
* @instance
|
||||
*/
|
||||
GetSrvKeyspacesResponse.prototype.srv_keyspaces = $util.emptyObject;
|
||||
|
||||
/**
|
||||
* Creates a new GetSrvKeyspacesResponse instance using the specified properties.
|
||||
* @function create
|
||||
* @memberof vtctldata.GetSrvKeyspacesResponse
|
||||
* @static
|
||||
* @param {vtctldata.IGetSrvKeyspacesResponse=} [properties] Properties to set
|
||||
* @returns {vtctldata.GetSrvKeyspacesResponse} GetSrvKeyspacesResponse instance
|
||||
*/
|
||||
GetSrvKeyspacesResponse.create = function create(properties) {
|
||||
return new GetSrvKeyspacesResponse(properties);
|
||||
};
|
||||
|
||||
/**
|
||||
* Encodes the specified GetSrvKeyspacesResponse message. Does not implicitly {@link vtctldata.GetSrvKeyspacesResponse.verify|verify} messages.
|
||||
* @function encode
|
||||
* @memberof vtctldata.GetSrvKeyspacesResponse
|
||||
* @static
|
||||
* @param {vtctldata.IGetSrvKeyspacesResponse} message GetSrvKeyspacesResponse message or plain object to encode
|
||||
* @param {$protobuf.Writer} [writer] Writer to encode to
|
||||
* @returns {$protobuf.Writer} Writer
|
||||
*/
|
||||
GetSrvKeyspacesResponse.encode = function encode(message, writer) {
|
||||
if (!writer)
|
||||
writer = $Writer.create();
|
||||
if (message.srv_keyspaces != null && Object.hasOwnProperty.call(message, "srv_keyspaces"))
|
||||
for (var keys = Object.keys(message.srv_keyspaces), i = 0; i < keys.length; ++i) {
|
||||
writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]);
|
||||
$root.topodata.SrvKeyspace.encode(message.srv_keyspaces[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim();
|
||||
}
|
||||
return writer;
|
||||
};
|
||||
|
||||
/**
|
||||
* Encodes the specified GetSrvKeyspacesResponse message, length delimited. Does not implicitly {@link vtctldata.GetSrvKeyspacesResponse.verify|verify} messages.
|
||||
* @function encodeDelimited
|
||||
* @memberof vtctldata.GetSrvKeyspacesResponse
|
||||
* @static
|
||||
* @param {vtctldata.IGetSrvKeyspacesResponse} message GetSrvKeyspacesResponse message or plain object to encode
|
||||
* @param {$protobuf.Writer} [writer] Writer to encode to
|
||||
* @returns {$protobuf.Writer} Writer
|
||||
*/
|
||||
GetSrvKeyspacesResponse.encodeDelimited = function encodeDelimited(message, writer) {
|
||||
return this.encode(message, writer).ldelim();
|
||||
};
|
||||
|
||||
/**
|
||||
* Decodes a GetSrvKeyspacesResponse message from the specified reader or buffer.
|
||||
* @function decode
|
||||
* @memberof vtctldata.GetSrvKeyspacesResponse
|
||||
* @static
|
||||
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
||||
* @param {number} [length] Message length if known beforehand
|
||||
* @returns {vtctldata.GetSrvKeyspacesResponse} GetSrvKeyspacesResponse
|
||||
* @throws {Error} If the payload is not a reader or valid buffer
|
||||
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
||||
*/
|
||||
GetSrvKeyspacesResponse.decode = function decode(reader, length) {
|
||||
if (!(reader instanceof $Reader))
|
||||
reader = $Reader.create(reader);
|
||||
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetSrvKeyspacesResponse(), key, value;
|
||||
while (reader.pos < end) {
|
||||
var tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1:
|
||||
if (message.srv_keyspaces === $util.emptyObject)
|
||||
message.srv_keyspaces = {};
|
||||
var end2 = reader.uint32() + reader.pos;
|
||||
key = "";
|
||||
value = null;
|
||||
while (reader.pos < end2) {
|
||||
var tag2 = reader.uint32();
|
||||
switch (tag2 >>> 3) {
|
||||
case 1:
|
||||
key = reader.string();
|
||||
break;
|
||||
case 2:
|
||||
value = $root.topodata.SrvKeyspace.decode(reader, reader.uint32());
|
||||
break;
|
||||
default:
|
||||
reader.skipType(tag2 & 7);
|
||||
break;
|
||||
}
|
||||
}
|
||||
message.srv_keyspaces[key] = value;
|
||||
break;
|
||||
default:
|
||||
reader.skipType(tag & 7);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return message;
|
||||
};
|
||||
|
||||
/**
|
||||
* Decodes a GetSrvKeyspacesResponse message from the specified reader or buffer, length delimited.
|
||||
* @function decodeDelimited
|
||||
* @memberof vtctldata.GetSrvKeyspacesResponse
|
||||
* @static
|
||||
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
||||
* @returns {vtctldata.GetSrvKeyspacesResponse} GetSrvKeyspacesResponse
|
||||
* @throws {Error} If the payload is not a reader or valid buffer
|
||||
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
||||
*/
|
||||
GetSrvKeyspacesResponse.decodeDelimited = function decodeDelimited(reader) {
|
||||
if (!(reader instanceof $Reader))
|
||||
reader = new $Reader(reader);
|
||||
return this.decode(reader, reader.uint32());
|
||||
};
|
||||
|
||||
/**
|
||||
* Verifies a GetSrvKeyspacesResponse message.
|
||||
* @function verify
|
||||
* @memberof vtctldata.GetSrvKeyspacesResponse
|
||||
* @static
|
||||
* @param {Object.<string,*>} message Plain object to verify
|
||||
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
||||
*/
|
||||
GetSrvKeyspacesResponse.verify = function verify(message) {
|
||||
if (typeof message !== "object" || message === null)
|
||||
return "object expected";
|
||||
if (message.srv_keyspaces != null && message.hasOwnProperty("srv_keyspaces")) {
|
||||
if (!$util.isObject(message.srv_keyspaces))
|
||||
return "srv_keyspaces: object expected";
|
||||
var key = Object.keys(message.srv_keyspaces);
|
||||
for (var i = 0; i < key.length; ++i) {
|
||||
var error = $root.topodata.SrvKeyspace.verify(message.srv_keyspaces[key[i]]);
|
||||
if (error)
|
||||
return "srv_keyspaces." + error;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
/**
|
||||
* Creates a GetSrvKeyspacesResponse message from a plain object. Also converts values to their respective internal types.
|
||||
* @function fromObject
|
||||
* @memberof vtctldata.GetSrvKeyspacesResponse
|
||||
* @static
|
||||
* @param {Object.<string,*>} object Plain object
|
||||
* @returns {vtctldata.GetSrvKeyspacesResponse} GetSrvKeyspacesResponse
|
||||
*/
|
||||
GetSrvKeyspacesResponse.fromObject = function fromObject(object) {
|
||||
if (object instanceof $root.vtctldata.GetSrvKeyspacesResponse)
|
||||
return object;
|
||||
var message = new $root.vtctldata.GetSrvKeyspacesResponse();
|
||||
if (object.srv_keyspaces) {
|
||||
if (typeof object.srv_keyspaces !== "object")
|
||||
throw TypeError(".vtctldata.GetSrvKeyspacesResponse.srv_keyspaces: object expected");
|
||||
message.srv_keyspaces = {};
|
||||
for (var keys = Object.keys(object.srv_keyspaces), i = 0; i < keys.length; ++i) {
|
||||
if (typeof object.srv_keyspaces[keys[i]] !== "object")
|
||||
throw TypeError(".vtctldata.GetSrvKeyspacesResponse.srv_keyspaces: object expected");
|
||||
message.srv_keyspaces[keys[i]] = $root.topodata.SrvKeyspace.fromObject(object.srv_keyspaces[keys[i]]);
|
||||
}
|
||||
}
|
||||
return message;
|
||||
};
|
||||
|
||||
/**
|
||||
* Creates a plain object from a GetSrvKeyspacesResponse message. Also converts values to other types if specified.
|
||||
* @function toObject
|
||||
* @memberof vtctldata.GetSrvKeyspacesResponse
|
||||
* @static
|
||||
* @param {vtctldata.GetSrvKeyspacesResponse} message GetSrvKeyspacesResponse
|
||||
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
||||
* @returns {Object.<string,*>} Plain object
|
||||
*/
|
||||
GetSrvKeyspacesResponse.toObject = function toObject(message, options) {
|
||||
if (!options)
|
||||
options = {};
|
||||
var object = {};
|
||||
if (options.objects || options.defaults)
|
||||
object.srv_keyspaces = {};
|
||||
var keys2;
|
||||
if (message.srv_keyspaces && (keys2 = Object.keys(message.srv_keyspaces)).length) {
|
||||
object.srv_keyspaces = {};
|
||||
for (var j = 0; j < keys2.length; ++j)
|
||||
object.srv_keyspaces[keys2[j]] = $root.topodata.SrvKeyspace.toObject(message.srv_keyspaces[keys2[j]], options);
|
||||
}
|
||||
return object;
|
||||
};
|
||||
|
||||
/**
|
||||
* Converts this GetSrvKeyspacesResponse to JSON.
|
||||
* @function toJSON
|
||||
* @memberof vtctldata.GetSrvKeyspacesResponse
|
||||
* @instance
|
||||
* @returns {Object.<string,*>} JSON object
|
||||
*/
|
||||
GetSrvKeyspacesResponse.prototype.toJSON = function toJSON() {
|
||||
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
||||
};
|
||||
|
||||
return GetSrvKeyspacesResponse;
|
||||
})();
|
||||
|
||||
vtctldata.GetSrvVSchemaRequest = (function() {
|
||||
|
||||
/**
|
||||
|
|
Загрузка…
Ссылка в новой задаче