Documentation ¶
Index ¶
- func DecodeIndexDirection(direction int32) mongorpc.IndexDirection
- func IndexDirection(direction mongorpc.IndexDirection) bsonx.Val
- func NewGRPCServer(opt ...grpc.ServerOption) *grpc.Server
- func NewServer(db *mongo.Client, opt ...grpc.ServerOption) *grpc.Server
- type MongoRPCAdminServer
- func (srv *MongoRPCAdminServer) CreateCollection(ctx context.Context, in *mongorpc.CreateCollectionRequest) (*mongorpc.Empty, error)
- func (srv *MongoRPCAdminServer) CreateIndex(ctx context.Context, in *mongorpc.CreateIndexRequest) (*mongorpc.Value, error)
- func (srv *MongoRPCAdminServer) DropCollection(ctx context.Context, in *mongorpc.DropCollectionRequest) (*mongorpc.Empty, error)
- func (srv *MongoRPCAdminServer) DropDatabase(ctx context.Context, in *mongorpc.DropDatabaseRequest) (*mongorpc.Empty, error)
- func (srv *MongoRPCAdminServer) DropIndex(ctx context.Context, in *mongorpc.DropIndexRequest) (*mongorpc.Empty, error)
- func (srv *MongoRPCAdminServer) ListCollections(ctx context.Context, in *mongorpc.ListCollectionsRequest) (*mongorpc.Value, error)
- func (srv *MongoRPCAdminServer) ListDatabases(ctx context.Context, _ *mongorpc.Empty) (*mongorpc.Value, error)
- func (srv *MongoRPCAdminServer) ListIndexes(ctx context.Context, in *mongorpc.ListIndexesRequest) (*mongorpc.Value, error)
- type MongoRPCServer
- func (srv *MongoRPCServer) BulkInsertDocuments(ctx context.Context, in *mongorpc.BulkInsertDocumentsRequest) (*mongorpc.Value, error)
- func (srv *MongoRPCServer) DeleteDocument(ctx context.Context, in *mongorpc.DeleteDocumentRequest) (*mongorpc.Value, error)
- func (srv *MongoRPCServer) GetDocument(ctx context.Context, in *mongorpc.GetDocumentRequest) (*mongorpc.Value, error)
- func (srv *MongoRPCServer) InsertDocument(ctx context.Context, in *mongorpc.InsertDocumentRequest) (*mongorpc.ObjectId, error)
- func (srv *MongoRPCServer) Listen(in *mongorpc.ListenRequest, stream mongorpc.MongoRPC_ListenServer) error
- func (srv *MongoRPCServer) QueryDocuments(ctx context.Context, in *mongorpc.QueryDocumentsRequest) (*mongorpc.Value, error)
- func (srv *MongoRPCServer) UpdateDocument(ctx context.Context, in *mongorpc.UpdateDocumentRequest) (*mongorpc.Value, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeIndexDirection ¶
func DecodeIndexDirection(direction int32) mongorpc.IndexDirection
func IndexDirection ¶
func IndexDirection(direction mongorpc.IndexDirection) bsonx.Val
Types ¶
type MongoRPCAdminServer ¶
type MongoRPCAdminServer struct { mongorpc.UnimplementedMongoRPCAdminServer DB *mongo.Client }
func NewMongoRPCAdminServer ¶
func NewMongoRPCAdminServer(db *mongo.Client) *MongoRPCAdminServer
NewMongoRPCAdminServer creates a new MongoRPCAdminServer
func (*MongoRPCAdminServer) CreateCollection ¶
func (srv *MongoRPCAdminServer) CreateCollection(ctx context.Context, in *mongorpc.CreateCollectionRequest) (*mongorpc.Empty, error)
func (*MongoRPCAdminServer) CreateIndex ¶
func (srv *MongoRPCAdminServer) CreateIndex(ctx context.Context, in *mongorpc.CreateIndexRequest) (*mongorpc.Value, error)
Create Index in Collection
func (*MongoRPCAdminServer) DropCollection ¶
func (srv *MongoRPCAdminServer) DropCollection(ctx context.Context, in *mongorpc.DropCollectionRequest) (*mongorpc.Empty, error)
func (*MongoRPCAdminServer) DropDatabase ¶
func (srv *MongoRPCAdminServer) DropDatabase(ctx context.Context, in *mongorpc.DropDatabaseRequest) (*mongorpc.Empty, error)
func (*MongoRPCAdminServer) DropIndex ¶
func (srv *MongoRPCAdminServer) DropIndex(ctx context.Context, in *mongorpc.DropIndexRequest) (*mongorpc.Empty, error)
delete index in collection
func (*MongoRPCAdminServer) ListCollections ¶
func (srv *MongoRPCAdminServer) ListCollections(ctx context.Context, in *mongorpc.ListCollectionsRequest) (*mongorpc.Value, error)
func (*MongoRPCAdminServer) ListDatabases ¶
func (*MongoRPCAdminServer) ListIndexes ¶
func (srv *MongoRPCAdminServer) ListIndexes(ctx context.Context, in *mongorpc.ListIndexesRequest) (*mongorpc.Value, error)
List all indexes in collection
type MongoRPCServer ¶
type MongoRPCServer struct { mongorpc.UnimplementedMongoRPCServer DB *mongo.Client Authorise func(context.Context, interface{}) error }
func NewMongoRPCServer ¶
func NewMongoRPCServer(db *mongo.Client) *MongoRPCServer
NewMongoRPCServer creates a new MongoRPCServer
func (*MongoRPCServer) BulkInsertDocuments ¶
func (srv *MongoRPCServer) BulkInsertDocuments(ctx context.Context, in *mongorpc.BulkInsertDocumentsRequest) (*mongorpc.Value, error)
func (*MongoRPCServer) DeleteDocument ¶
func (srv *MongoRPCServer) DeleteDocument(ctx context.Context, in *mongorpc.DeleteDocumentRequest) (*mongorpc.Value, error)
func (*MongoRPCServer) GetDocument ¶
func (srv *MongoRPCServer) GetDocument(ctx context.Context, in *mongorpc.GetDocumentRequest) (*mongorpc.Value, error)
func (*MongoRPCServer) InsertDocument ¶
func (srv *MongoRPCServer) InsertDocument(ctx context.Context, in *mongorpc.InsertDocumentRequest) (*mongorpc.ObjectId, error)
func (*MongoRPCServer) Listen ¶
func (srv *MongoRPCServer) Listen(in *mongorpc.ListenRequest, stream mongorpc.MongoRPC_ListenServer) error
func (*MongoRPCServer) QueryDocuments ¶
func (srv *MongoRPCServer) QueryDocuments(ctx context.Context, in *mongorpc.QueryDocumentsRequest) (*mongorpc.Value, error)
func (*MongoRPCServer) UpdateDocument ¶
func (srv *MongoRPCServer) UpdateDocument(ctx context.Context, in *mongorpc.UpdateDocumentRequest) (*mongorpc.Value, error)
Click to show internal directories.
Click to hide internal directories.