Documentation ¶
Overview ¶
Package proto is a generated protocol buffer package.
It is generated from these files:
driver.proto
It has these top-level messages:
InstanceMeta InitRequest Empty ExecRequest ExecResponse TxRequest TxResponse DatabasesResponse ParseRequest Node ParseResponse Rule AuditRequest AuditResult AuditResponse GenRollbackSQLRequest GenRollbackSQLResponse MetasResponse
Index ¶
- func RegisterDriverServer(s *grpc.Server, srv DriverServer)
- type AuditRequest
- type AuditResponse
- type AuditResult
- type DatabasesResponse
- type DriverClient
- type DriverServer
- type Empty
- type ExecRequest
- type ExecResponse
- func (*ExecResponse) Descriptor() ([]byte, []int)
- func (m *ExecResponse) GetLastInsertId() int64
- func (m *ExecResponse) GetLastInsertIdError() string
- func (m *ExecResponse) GetRowsAffected() int64
- func (m *ExecResponse) GetRowsAffectedError() string
- func (*ExecResponse) ProtoMessage()
- func (m *ExecResponse) Reset()
- func (m *ExecResponse) String() string
- type GenRollbackSQLRequest
- type GenRollbackSQLResponse
- type InitRequest
- type InstanceMeta
- func (*InstanceMeta) Descriptor() ([]byte, []int)
- func (m *InstanceMeta) GetDatabaseOpen() string
- func (m *InstanceMeta) GetInstanceHost() string
- func (m *InstanceMeta) GetInstancePass() string
- func (m *InstanceMeta) GetInstancePort() string
- func (m *InstanceMeta) GetInstanceUser() string
- func (*InstanceMeta) ProtoMessage()
- func (m *InstanceMeta) Reset()
- func (m *InstanceMeta) String() string
- type MetasResponse
- type Node
- type ParseRequest
- type ParseResponse
- type Rule
- func (*Rule) Descriptor() ([]byte, []int)
- func (m *Rule) GetDesc() string
- func (m *Rule) GetIsDefault() bool
- func (m *Rule) GetLevel() string
- func (m *Rule) GetName() string
- func (m *Rule) GetTyp() string
- func (m *Rule) GetValue() string
- func (*Rule) ProtoMessage()
- func (m *Rule) Reset()
- func (m *Rule) String() string
- type TxRequest
- type TxResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterDriverServer ¶
func RegisterDriverServer(s *grpc.Server, srv DriverServer)
Types ¶
type AuditRequest ¶
type AuditRequest struct { Rules []*Rule `protobuf:"bytes,1,rep,name=rules" json:"rules,omitempty"` Sql string `protobuf:"bytes,2,opt,name=sql" json:"sql,omitempty"` }
func (*AuditRequest) Descriptor ¶
func (*AuditRequest) Descriptor() ([]byte, []int)
func (*AuditRequest) GetRules ¶
func (m *AuditRequest) GetRules() []*Rule
func (*AuditRequest) GetSql ¶
func (m *AuditRequest) GetSql() string
func (*AuditRequest) ProtoMessage ¶
func (*AuditRequest) ProtoMessage()
func (*AuditRequest) Reset ¶
func (m *AuditRequest) Reset()
func (*AuditRequest) String ¶
func (m *AuditRequest) String() string
type AuditResponse ¶
type AuditResponse struct {
Results []*AuditResult `protobuf:"bytes,1,rep,name=results" json:"results,omitempty"`
}
func (*AuditResponse) Descriptor ¶
func (*AuditResponse) Descriptor() ([]byte, []int)
func (*AuditResponse) GetResults ¶
func (m *AuditResponse) GetResults() []*AuditResult
func (*AuditResponse) ProtoMessage ¶
func (*AuditResponse) ProtoMessage()
func (*AuditResponse) Reset ¶
func (m *AuditResponse) Reset()
func (*AuditResponse) String ¶
func (m *AuditResponse) String() string
type AuditResult ¶
type AuditResult struct { Message string `protobuf:"bytes,1,opt,name=message" json:"message,omitempty"` Level string `protobuf:"bytes,2,opt,name=level" json:"level,omitempty"` }
func (*AuditResult) Descriptor ¶
func (*AuditResult) Descriptor() ([]byte, []int)
func (*AuditResult) GetLevel ¶
func (m *AuditResult) GetLevel() string
func (*AuditResult) GetMessage ¶
func (m *AuditResult) GetMessage() string
func (*AuditResult) ProtoMessage ¶
func (*AuditResult) ProtoMessage()
func (*AuditResult) Reset ¶
func (m *AuditResult) Reset()
func (*AuditResult) String ¶
func (m *AuditResult) String() string
type DatabasesResponse ¶
type DatabasesResponse struct {
Databases []string `protobuf:"bytes,1,rep,name=databases" json:"databases,omitempty"`
}
func (*DatabasesResponse) Descriptor ¶
func (*DatabasesResponse) Descriptor() ([]byte, []int)
func (*DatabasesResponse) GetDatabases ¶
func (m *DatabasesResponse) GetDatabases() []string
func (*DatabasesResponse) ProtoMessage ¶
func (*DatabasesResponse) ProtoMessage()
func (*DatabasesResponse) Reset ¶
func (m *DatabasesResponse) Reset()
func (*DatabasesResponse) String ¶
func (m *DatabasesResponse) String() string
type DriverClient ¶
type DriverClient interface { // Metas returns some base info from plugin server. Metas(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*MetasResponse, error) // Init will should be called at first before calling following methods. // It will pass some necessary info to plugin server. In the begginning, // we consider that put this info to the executable binary environment. // We put all communication on gRPC for unification in the end. Init(ctx context.Context, in *InitRequest, opts ...grpc.CallOption) (*Empty, error) Close(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) Ping(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) Exec(ctx context.Context, in *ExecRequest, opts ...grpc.CallOption) (*ExecResponse, error) Tx(ctx context.Context, in *TxRequest, opts ...grpc.CallOption) (*TxResponse, error) Databases(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*DatabasesResponse, error) Parse(ctx context.Context, in *ParseRequest, opts ...grpc.CallOption) (*ParseResponse, error) Audit(ctx context.Context, in *AuditRequest, opts ...grpc.CallOption) (*AuditResponse, error) GenRollbackSQL(ctx context.Context, in *GenRollbackSQLRequest, opts ...grpc.CallOption) (*GenRollbackSQLResponse, error) }
func NewDriverClient ¶
func NewDriverClient(cc *grpc.ClientConn) DriverClient
type DriverServer ¶
type DriverServer interface { // Metas returns some base info from plugin server. Metas(context.Context, *Empty) (*MetasResponse, error) // Init will should be called at first before calling following methods. // It will pass some necessary info to plugin server. In the begginning, // we consider that put this info to the executable binary environment. // We put all communication on gRPC for unification in the end. Init(context.Context, *InitRequest) (*Empty, error) Close(context.Context, *Empty) (*Empty, error) Ping(context.Context, *Empty) (*Empty, error) Exec(context.Context, *ExecRequest) (*ExecResponse, error) Tx(context.Context, *TxRequest) (*TxResponse, error) Databases(context.Context, *Empty) (*DatabasesResponse, error) Parse(context.Context, *ParseRequest) (*ParseResponse, error) Audit(context.Context, *AuditRequest) (*AuditResponse, error) GenRollbackSQL(context.Context, *GenRollbackSQLRequest) (*GenRollbackSQLResponse, error) }
type Empty ¶
type Empty struct { }
func (*Empty) Descriptor ¶
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
type ExecRequest ¶
type ExecRequest struct {
Query string `protobuf:"bytes,1,opt,name=query" json:"query,omitempty"`
}
func (*ExecRequest) Descriptor ¶
func (*ExecRequest) Descriptor() ([]byte, []int)
func (*ExecRequest) GetQuery ¶
func (m *ExecRequest) GetQuery() string
func (*ExecRequest) ProtoMessage ¶
func (*ExecRequest) ProtoMessage()
func (*ExecRequest) Reset ¶
func (m *ExecRequest) Reset()
func (*ExecRequest) String ¶
func (m *ExecRequest) String() string
type ExecResponse ¶
type ExecResponse struct { LastInsertId int64 `protobuf:"varint,1,opt,name=lastInsertId" json:"lastInsertId,omitempty"` LastInsertIdError string `protobuf:"bytes,2,opt,name=lastInsertIdError" json:"lastInsertIdError,omitempty"` RowsAffected int64 `protobuf:"varint,3,opt,name=rowsAffected" json:"rowsAffected,omitempty"` RowsAffectedError string `protobuf:"bytes,4,opt,name=rowsAffectedError" json:"rowsAffectedError,omitempty"` }
func (*ExecResponse) Descriptor ¶
func (*ExecResponse) Descriptor() ([]byte, []int)
func (*ExecResponse) GetLastInsertId ¶
func (m *ExecResponse) GetLastInsertId() int64
func (*ExecResponse) GetLastInsertIdError ¶
func (m *ExecResponse) GetLastInsertIdError() string
func (*ExecResponse) GetRowsAffected ¶
func (m *ExecResponse) GetRowsAffected() int64
func (*ExecResponse) GetRowsAffectedError ¶
func (m *ExecResponse) GetRowsAffectedError() string
func (*ExecResponse) ProtoMessage ¶
func (*ExecResponse) ProtoMessage()
func (*ExecResponse) Reset ¶
func (m *ExecResponse) Reset()
func (*ExecResponse) String ¶
func (m *ExecResponse) String() string
type GenRollbackSQLRequest ¶
type GenRollbackSQLRequest struct {
Sql string `protobuf:"bytes,1,opt,name=sql" json:"sql,omitempty"`
}
func (*GenRollbackSQLRequest) Descriptor ¶
func (*GenRollbackSQLRequest) Descriptor() ([]byte, []int)
func (*GenRollbackSQLRequest) GetSql ¶
func (m *GenRollbackSQLRequest) GetSql() string
func (*GenRollbackSQLRequest) ProtoMessage ¶
func (*GenRollbackSQLRequest) ProtoMessage()
func (*GenRollbackSQLRequest) Reset ¶
func (m *GenRollbackSQLRequest) Reset()
func (*GenRollbackSQLRequest) String ¶
func (m *GenRollbackSQLRequest) String() string
type GenRollbackSQLResponse ¶
type GenRollbackSQLResponse struct { Sql string `protobuf:"bytes,1,opt,name=sql" json:"sql,omitempty"` Reason string `protobuf:"bytes,2,opt,name=reason" json:"reason,omitempty"` }
func (*GenRollbackSQLResponse) Descriptor ¶
func (*GenRollbackSQLResponse) Descriptor() ([]byte, []int)
func (*GenRollbackSQLResponse) GetReason ¶
func (m *GenRollbackSQLResponse) GetReason() string
func (*GenRollbackSQLResponse) GetSql ¶
func (m *GenRollbackSQLResponse) GetSql() string
func (*GenRollbackSQLResponse) ProtoMessage ¶
func (*GenRollbackSQLResponse) ProtoMessage()
func (*GenRollbackSQLResponse) Reset ¶
func (m *GenRollbackSQLResponse) Reset()
func (*GenRollbackSQLResponse) String ¶
func (m *GenRollbackSQLResponse) String() string
type InitRequest ¶
type InitRequest struct { InstanceMeta *InstanceMeta `protobuf:"bytes,1,opt,name=instanceMeta" json:"instanceMeta,omitempty"` IsOffline bool `protobuf:"varint,2,opt,name=isOffline" json:"isOffline,omitempty"` }
func (*InitRequest) Descriptor ¶
func (*InitRequest) Descriptor() ([]byte, []int)
func (*InitRequest) GetInstanceMeta ¶
func (m *InitRequest) GetInstanceMeta() *InstanceMeta
func (*InitRequest) GetIsOffline ¶
func (m *InitRequest) GetIsOffline() bool
func (*InitRequest) ProtoMessage ¶
func (*InitRequest) ProtoMessage()
func (*InitRequest) Reset ¶
func (m *InitRequest) Reset()
func (*InitRequest) String ¶
func (m *InitRequest) String() string
type InstanceMeta ¶
type InstanceMeta struct { InstanceHost string `protobuf:"bytes,1,opt,name=instanceHost" json:"instanceHost,omitempty"` InstancePort string `protobuf:"bytes,2,opt,name=instancePort" json:"instancePort,omitempty"` InstanceUser string `protobuf:"bytes,3,opt,name=instanceUser" json:"instanceUser,omitempty"` InstancePass string `protobuf:"bytes,4,opt,name=instancePass" json:"instancePass,omitempty"` DatabaseOpen string `protobuf:"bytes,5,opt,name=databaseOpen" json:"databaseOpen,omitempty"` }
func (*InstanceMeta) Descriptor ¶
func (*InstanceMeta) Descriptor() ([]byte, []int)
func (*InstanceMeta) GetDatabaseOpen ¶
func (m *InstanceMeta) GetDatabaseOpen() string
func (*InstanceMeta) GetInstanceHost ¶
func (m *InstanceMeta) GetInstanceHost() string
func (*InstanceMeta) GetInstancePass ¶
func (m *InstanceMeta) GetInstancePass() string
func (*InstanceMeta) GetInstancePort ¶
func (m *InstanceMeta) GetInstancePort() string
func (*InstanceMeta) GetInstanceUser ¶
func (m *InstanceMeta) GetInstanceUser() string
func (*InstanceMeta) ProtoMessage ¶
func (*InstanceMeta) ProtoMessage()
func (*InstanceMeta) Reset ¶
func (m *InstanceMeta) Reset()
func (*InstanceMeta) String ¶
func (m *InstanceMeta) String() string
type MetasResponse ¶
type MetasResponse struct { Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` Rules []*Rule `protobuf:"bytes,2,rep,name=rules" json:"rules,omitempty"` }
func (*MetasResponse) Descriptor ¶
func (*MetasResponse) Descriptor() ([]byte, []int)
func (*MetasResponse) GetName ¶
func (m *MetasResponse) GetName() string
func (*MetasResponse) GetRules ¶
func (m *MetasResponse) GetRules() []*Rule
func (*MetasResponse) ProtoMessage ¶
func (*MetasResponse) ProtoMessage()
func (*MetasResponse) Reset ¶
func (m *MetasResponse) Reset()
func (*MetasResponse) String ¶
func (m *MetasResponse) String() string
type Node ¶
type Node struct { Text string `protobuf:"bytes,1,opt,name=text" json:"text,omitempty"` Type string `protobuf:"bytes,2,opt,name=type" json:"type,omitempty"` Fingerprint string `protobuf:"bytes,3,opt,name=fingerprint" json:"fingerprint,omitempty"` }
func (*Node) Descriptor ¶
func (*Node) GetFingerprint ¶
func (*Node) ProtoMessage ¶
func (*Node) ProtoMessage()
type ParseRequest ¶
type ParseRequest struct {
SqlText string `protobuf:"bytes,1,opt,name=sqlText" json:"sqlText,omitempty"`
}
func (*ParseRequest) Descriptor ¶
func (*ParseRequest) Descriptor() ([]byte, []int)
func (*ParseRequest) GetSqlText ¶
func (m *ParseRequest) GetSqlText() string
func (*ParseRequest) ProtoMessage ¶
func (*ParseRequest) ProtoMessage()
func (*ParseRequest) Reset ¶
func (m *ParseRequest) Reset()
func (*ParseRequest) String ¶
func (m *ParseRequest) String() string
type ParseResponse ¶
type ParseResponse struct {
Nodes []*Node `protobuf:"bytes,1,rep,name=nodes" json:"nodes,omitempty"`
}
func (*ParseResponse) Descriptor ¶
func (*ParseResponse) Descriptor() ([]byte, []int)
func (*ParseResponse) GetNodes ¶
func (m *ParseResponse) GetNodes() []*Node
func (*ParseResponse) ProtoMessage ¶
func (*ParseResponse) ProtoMessage()
func (*ParseResponse) Reset ¶
func (m *ParseResponse) Reset()
func (*ParseResponse) String ¶
func (m *ParseResponse) String() string
type Rule ¶
type Rule struct { Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` Desc string `protobuf:"bytes,2,opt,name=desc" json:"desc,omitempty"` Value string `protobuf:"bytes,3,opt,name=value" json:"value,omitempty"` Level string `protobuf:"bytes,4,opt,name=level" json:"level,omitempty"` Typ string `protobuf:"bytes,5,opt,name=typ" json:"typ,omitempty"` IsDefault bool `protobuf:"varint,6,opt,name=isDefault" json:"isDefault,omitempty"` }
func (*Rule) Descriptor ¶
func (*Rule) GetIsDefault ¶
func (*Rule) ProtoMessage ¶
func (*Rule) ProtoMessage()
type TxRequest ¶
type TxRequest struct {
Queries []string `protobuf:"bytes,1,rep,name=queries" json:"queries,omitempty"`
}
func (*TxRequest) Descriptor ¶
func (*TxRequest) GetQueries ¶
func (*TxRequest) ProtoMessage ¶
func (*TxRequest) ProtoMessage()
type TxResponse ¶
type TxResponse struct {
Resluts []*ExecResponse `protobuf:"bytes,1,rep,name=resluts" json:"resluts,omitempty"`
}
func (*TxResponse) Descriptor ¶
func (*TxResponse) Descriptor() ([]byte, []int)
func (*TxResponse) GetResluts ¶
func (m *TxResponse) GetResluts() []*ExecResponse
func (*TxResponse) ProtoMessage ¶
func (*TxResponse) ProtoMessage()
func (*TxResponse) Reset ¶
func (m *TxResponse) Reset()
func (*TxResponse) String ¶
func (m *TxResponse) String() string
Click to show internal directories.
Click to hide internal directories.