COuple fixes to tabletmanager.proto.

This commit is contained in:
Alain Jobart 2015-06-09 11:40:12 -07:00
Родитель ee1a57f664
Коммит 057a901d6f
2 изменённых файлов: 23 добавлений и 36 удалений

Просмотреть файл

@ -11,7 +11,6 @@ It is generated from these files:
It has these top-level messages:
TableDefinition
SchemaDefinition
Privilege
UserPermission
DbPermission
HostPermission
@ -129,7 +128,7 @@ type TableDefinition struct {
Columns []string `protobuf:"bytes,3,rep,name=columns" json:"columns,omitempty"`
// the primary key columns in the primary key order
PrimaryKeyColumns []string `protobuf:"bytes,6,rep,name=primary_key_columns" json:"primary_key_columns,omitempty"`
// TABLE_BASE_TABLE or TABLE_VIEW
// type is either mysqlctl.TableBaseTable or mysqlctl.TableView
Type string `protobuf:"bytes,4,opt,name=type" json:"type,omitempty"`
// how much space the data file takes.
DataLength uint64 `protobuf:"varint,5,opt,name=data_length" json:"data_length,omitempty"`
@ -158,15 +157,6 @@ func (m *SchemaDefinition) GetTableDefinitions() []*TableDefinition {
return nil
}
type Privilege struct {
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
Value string `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"`
}
func (m *Privilege) Reset() { *m = Privilege{} }
func (m *Privilege) String() string { return proto.CompactTextString(m) }
func (*Privilege) ProtoMessage() {}
// UserPermission describes a single row in the mysql.user table
// Primary key is Host+User
// PasswordChecksum is the crc64 of the password, for security reasons
@ -174,14 +164,14 @@ type UserPermission struct {
Host string `protobuf:"bytes,1,opt,name=host" json:"host,omitempty"`
User string `protobuf:"bytes,2,opt,name=user" json:"user,omitempty"`
PasswordChecksum uint64 `protobuf:"varint,3,opt,name=password_checksum" json:"password_checksum,omitempty"`
Privileges []*Privilege `protobuf:"bytes,4,rep,name=privileges" json:"privileges,omitempty"`
Privileges map[string]string `protobuf:"bytes,4,rep,name=privileges" json:"privileges,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
}
func (m *UserPermission) Reset() { *m = UserPermission{} }
func (m *UserPermission) String() string { return proto.CompactTextString(m) }
func (*UserPermission) ProtoMessage() {}
func (m *UserPermission) GetPrivileges() []*Privilege {
func (m *UserPermission) GetPrivileges() map[string]string {
if m != nil {
return m.Privileges
}
@ -194,14 +184,14 @@ type DbPermission struct {
Host string `protobuf:"bytes,1,opt,name=host" json:"host,omitempty"`
Db string `protobuf:"bytes,2,opt,name=db" json:"db,omitempty"`
User string `protobuf:"bytes,3,opt,name=user" json:"user,omitempty"`
Privileges []*Privilege `protobuf:"bytes,4,rep,name=privileges" json:"privileges,omitempty"`
Privileges map[string]string `protobuf:"bytes,4,rep,name=privileges" json:"privileges,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
}
func (m *DbPermission) Reset() { *m = DbPermission{} }
func (m *DbPermission) String() string { return proto.CompactTextString(m) }
func (*DbPermission) ProtoMessage() {}
func (m *DbPermission) GetPrivileges() []*Privilege {
func (m *DbPermission) GetPrivileges() map[string]string {
if m != nil {
return m.Privileges
}
@ -213,14 +203,14 @@ func (m *DbPermission) GetPrivileges() []*Privilege {
type HostPermission struct {
Host string `protobuf:"bytes,1,opt,name=host" json:"host,omitempty"`
Db string `protobuf:"bytes,2,opt,name=db" json:"db,omitempty"`
Privileges []*Privilege `protobuf:"bytes,3,rep,name=privileges" json:"privileges,omitempty"`
Privileges map[string]string `protobuf:"bytes,3,rep,name=privileges" json:"privileges,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
}
func (m *HostPermission) Reset() { *m = HostPermission{} }
func (m *HostPermission) String() string { return proto.CompactTextString(m) }
func (*HostPermission) ProtoMessage() {}
func (m *HostPermission) GetPrivileges() []*Privilege {
func (m *HostPermission) GetPrivileges() map[string]string {
if m != nil {
return m.Privileges
}
@ -260,9 +250,10 @@ func (m *Permissions) GetHostPermissions() []*HostPermission {
return nil
}
// BlpPosition is a replication position for a given binlog player
type BlpPosition struct {
Uid uint32 `protobuf:"varint,1,opt,name=uid" json:"uid,omitempty"`
Position *replication.Position `protobuf:"bytes,3,opt,name=position" json:"position,omitempty"`
Position *replication.Position `protobuf:"bytes,2,opt,name=position" json:"position,omitempty"`
}
func (m *BlpPosition) Reset() { *m = BlpPosition{} }

Просмотреть файл

@ -27,7 +27,7 @@ message TableDefinition {
// the primary key columns in the primary key order
repeated string primary_key_columns = 6;
// TABLE_BASE_TABLE or TABLE_VIEW
// type is either mysqlctl.TableBaseTable or mysqlctl.TableView
string type = 4;
// how much space the data file takes.
@ -43,11 +43,6 @@ message SchemaDefinition {
string version = 3;
}
message Privilege {
string name = 1;
string value = 2;
}
// UserPermission describes a single row in the mysql.user table
// Primary key is Host+User
// PasswordChecksum is the crc64 of the password, for security reasons
@ -55,7 +50,7 @@ message UserPermission {
string host = 1;
string user = 2;
uint64 password_checksum = 3;
repeated Privilege privileges = 4;
map<string, string> privileges = 4;
}
// DbPermission describes a single row in the mysql.db table
@ -64,7 +59,7 @@ message DbPermission {
string host = 1;
string db = 2;
string user = 3;
repeated Privilege privileges = 4;
map<string, string> privileges = 4;
}
// HostPermission describes a single row in the mysql.host table
@ -72,7 +67,7 @@ message DbPermission {
message HostPermission {
string host = 1;
string db = 2;
repeated Privilege privileges = 3;
map<string, string> privileges = 3;
}
// Permissions have all the rows in mysql.{user,db,host} tables,
@ -83,9 +78,10 @@ message Permissions {
repeated HostPermission host_permissions = 3;
}
// BlpPosition is a replication position for a given binlog player
message BlpPosition {
uint32 uid = 1;
replication.Position position = 3;
replication.Position position = 2;
}
//