Documentation
¶
Overview ¶
Package go_micro_srv_db_db is a generated protocol buffer package.
It is generated from these files:
github.com/micro/db-srv/proto/db/db.proto
It has these top-level messages:
Database Record ReadRequest ReadResponse CreateRequest CreateResponse UpdateRequest UpdateResponse DeleteRequest DeleteResponse SearchRequest SearchResponse
Index ¶
- func RegisterDBHandler(s server.Server, hdlr DBHandler)
- type CreateRequest
- type CreateResponse
- type DB
- func (h *DB) Create(ctx context.Context, in *CreateRequest, out *CreateResponse) error
- func (h *DB) Delete(ctx context.Context, in *DeleteRequest, out *DeleteResponse) error
- func (h *DB) Read(ctx context.Context, in *ReadRequest, out *ReadResponse) error
- func (h *DB) Search(ctx context.Context, in *SearchRequest, out *SearchResponse) error
- func (h *DB) Update(ctx context.Context, in *UpdateRequest, out *UpdateResponse) error
- type DBClient
- type DBHandler
- type Database
- type DeleteRequest
- type DeleteResponse
- type ReadRequest
- type ReadResponse
- type Record
- type SearchRequest
- type SearchResponse
- type UpdateRequest
- type UpdateResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterDBHandler ¶
Types ¶
type CreateRequest ¶
type CreateRequest struct { Database *Database `protobuf:"bytes,1,opt,name=database" json:"database,omitempty"` Record *Record `protobuf:"bytes,2,opt,name=record" json:"record,omitempty"` }
func (*CreateRequest) Descriptor ¶
func (*CreateRequest) Descriptor() ([]byte, []int)
func (*CreateRequest) GetDatabase ¶
func (m *CreateRequest) GetDatabase() *Database
func (*CreateRequest) GetRecord ¶
func (m *CreateRequest) GetRecord() *Record
func (*CreateRequest) ProtoMessage ¶
func (*CreateRequest) ProtoMessage()
func (*CreateRequest) Reset ¶
func (m *CreateRequest) Reset()
func (*CreateRequest) String ¶
func (m *CreateRequest) String() string
type CreateResponse ¶
type CreateResponse struct { }
func (*CreateResponse) Descriptor ¶
func (*CreateResponse) Descriptor() ([]byte, []int)
func (*CreateResponse) ProtoMessage ¶
func (*CreateResponse) ProtoMessage()
func (*CreateResponse) Reset ¶
func (m *CreateResponse) Reset()
func (*CreateResponse) String ¶
func (m *CreateResponse) String() string
type DB ¶
type DB struct {
DBHandler
}
func (*DB) Create ¶
func (h *DB) Create(ctx context.Context, in *CreateRequest, out *CreateResponse) error
func (*DB) Delete ¶
func (h *DB) Delete(ctx context.Context, in *DeleteRequest, out *DeleteResponse) error
func (*DB) Read ¶
func (h *DB) Read(ctx context.Context, in *ReadRequest, out *ReadResponse) error
func (*DB) Search ¶
func (h *DB) Search(ctx context.Context, in *SearchRequest, out *SearchResponse) error
func (*DB) Update ¶
func (h *DB) Update(ctx context.Context, in *UpdateRequest, out *UpdateResponse) error
type DBClient ¶
type DBClient interface { Read(ctx context.Context, in *ReadRequest, opts ...client.CallOption) (*ReadResponse, error) Create(ctx context.Context, in *CreateRequest, opts ...client.CallOption) (*CreateResponse, error) Update(ctx context.Context, in *UpdateRequest, opts ...client.CallOption) (*UpdateResponse, error) Delete(ctx context.Context, in *DeleteRequest, opts ...client.CallOption) (*DeleteResponse, error) Search(ctx context.Context, in *SearchRequest, opts ...client.CallOption) (*SearchResponse, error) }
type DBHandler ¶
type DBHandler interface { Read(context.Context, *ReadRequest, *ReadResponse) error Create(context.Context, *CreateRequest, *CreateResponse) error Update(context.Context, *UpdateRequest, *UpdateResponse) error Delete(context.Context, *DeleteRequest, *DeleteResponse) error Search(context.Context, *SearchRequest, *SearchResponse) error }
type Database ¶
type Database struct { Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` Table string `protobuf:"bytes,2,opt,name=table" json:"table,omitempty"` }
func (*Database) Descriptor ¶
func (*Database) ProtoMessage ¶
func (*Database) ProtoMessage()
type DeleteRequest ¶
type DeleteRequest struct { Database *Database `protobuf:"bytes,1,opt,name=database" json:"database,omitempty"` Id string `protobuf:"bytes,2,opt,name=id" json:"id,omitempty"` }
func (*DeleteRequest) Descriptor ¶
func (*DeleteRequest) Descriptor() ([]byte, []int)
func (*DeleteRequest) GetDatabase ¶
func (m *DeleteRequest) GetDatabase() *Database
func (*DeleteRequest) ProtoMessage ¶
func (*DeleteRequest) ProtoMessage()
func (*DeleteRequest) Reset ¶
func (m *DeleteRequest) Reset()
func (*DeleteRequest) String ¶
func (m *DeleteRequest) String() string
type DeleteResponse ¶
type DeleteResponse struct { }
func (*DeleteResponse) Descriptor ¶
func (*DeleteResponse) Descriptor() ([]byte, []int)
func (*DeleteResponse) ProtoMessage ¶
func (*DeleteResponse) ProtoMessage()
func (*DeleteResponse) Reset ¶
func (m *DeleteResponse) Reset()
func (*DeleteResponse) String ¶
func (m *DeleteResponse) String() string
type ReadRequest ¶
type ReadRequest struct { Database *Database `protobuf:"bytes,1,opt,name=database" json:"database,omitempty"` Id string `protobuf:"bytes,2,opt,name=id" json:"id,omitempty"` }
func (*ReadRequest) Descriptor ¶
func (*ReadRequest) Descriptor() ([]byte, []int)
func (*ReadRequest) GetDatabase ¶
func (m *ReadRequest) GetDatabase() *Database
func (*ReadRequest) ProtoMessage ¶
func (*ReadRequest) ProtoMessage()
func (*ReadRequest) Reset ¶
func (m *ReadRequest) Reset()
func (*ReadRequest) String ¶
func (m *ReadRequest) String() string
type ReadResponse ¶
type ReadResponse struct {
Record *Record `protobuf:"bytes,1,opt,name=record" json:"record,omitempty"`
}
func (*ReadResponse) Descriptor ¶
func (*ReadResponse) Descriptor() ([]byte, []int)
func (*ReadResponse) GetRecord ¶
func (m *ReadResponse) GetRecord() *Record
func (*ReadResponse) ProtoMessage ¶
func (*ReadResponse) ProtoMessage()
func (*ReadResponse) Reset ¶
func (m *ReadResponse) Reset()
func (*ReadResponse) String ¶
func (m *ReadResponse) String() string
type Record ¶
type Record struct { Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` Created int64 `protobuf:"varint,2,opt,name=created" json:"created,omitempty"` Updated int64 `protobuf:"varint,3,opt,name=updated" json:"updated,omitempty"` Metadata map[string]string `` /* 136-byte string literal not displayed */ Bytes string `protobuf:"bytes,5,opt,name=bytes" json:"bytes,omitempty"` }
func (*Record) Descriptor ¶
func (*Record) GetMetadata ¶
func (*Record) ProtoMessage ¶
func (*Record) ProtoMessage()
type SearchRequest ¶
type SearchRequest struct { Database *Database `protobuf:"bytes,1,opt,name=database" json:"database,omitempty"` Metadata map[string]string `` /* 136-byte string literal not displayed */ Limit int64 `protobuf:"varint,3,opt,name=limit" json:"limit,omitempty"` Offset int64 `protobuf:"varint,4,opt,name=offset" json:"offset,omitempty"` }
func (*SearchRequest) Descriptor ¶
func (*SearchRequest) Descriptor() ([]byte, []int)
func (*SearchRequest) GetDatabase ¶
func (m *SearchRequest) GetDatabase() *Database
func (*SearchRequest) GetMetadata ¶
func (m *SearchRequest) GetMetadata() map[string]string
func (*SearchRequest) ProtoMessage ¶
func (*SearchRequest) ProtoMessage()
func (*SearchRequest) Reset ¶
func (m *SearchRequest) Reset()
func (*SearchRequest) String ¶
func (m *SearchRequest) String() string
type SearchResponse ¶
type SearchResponse struct {
Records []*Record `protobuf:"bytes,1,rep,name=records" json:"records,omitempty"`
}
func (*SearchResponse) Descriptor ¶
func (*SearchResponse) Descriptor() ([]byte, []int)
func (*SearchResponse) GetRecords ¶
func (m *SearchResponse) GetRecords() []*Record
func (*SearchResponse) ProtoMessage ¶
func (*SearchResponse) ProtoMessage()
func (*SearchResponse) Reset ¶
func (m *SearchResponse) Reset()
func (*SearchResponse) String ¶
func (m *SearchResponse) String() string
type UpdateRequest ¶
type UpdateRequest struct { Database *Database `protobuf:"bytes,1,opt,name=database" json:"database,omitempty"` Record *Record `protobuf:"bytes,2,opt,name=record" json:"record,omitempty"` }
func (*UpdateRequest) Descriptor ¶
func (*UpdateRequest) Descriptor() ([]byte, []int)
func (*UpdateRequest) GetDatabase ¶
func (m *UpdateRequest) GetDatabase() *Database
func (*UpdateRequest) GetRecord ¶
func (m *UpdateRequest) GetRecord() *Record
func (*UpdateRequest) ProtoMessage ¶
func (*UpdateRequest) ProtoMessage()
func (*UpdateRequest) Reset ¶
func (m *UpdateRequest) Reset()
func (*UpdateRequest) String ¶
func (m *UpdateRequest) String() string
type UpdateResponse ¶
type UpdateResponse struct { }
func (*UpdateResponse) Descriptor ¶
func (*UpdateResponse) Descriptor() ([]byte, []int)
func (*UpdateResponse) ProtoMessage ¶
func (*UpdateResponse) ProtoMessage()
func (*UpdateResponse) Reset ¶
func (m *UpdateResponse) Reset()
func (*UpdateResponse) String ¶
func (m *UpdateResponse) String() string
Click to show internal directories.
Click to hide internal directories.