lib

package
v0.0.0-...-8524f9a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 28, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

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

func NewGRPCServer

func NewGRPCServer(opt ...grpc.ServerOption) *grpc.Server

New gRPC Server

func NewServer

func NewServer(db *mongo.Client, opt ...grpc.ServerOption) *grpc.Server

New MongoRPC and MongoRPCAdmin Server

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 (*MongoRPCAdminServer) CreateIndex

Create Index in Collection

func (*MongoRPCAdminServer) DropCollection

func (*MongoRPCAdminServer) DropDatabase

func (*MongoRPCAdminServer) DropIndex

delete index in collection

func (*MongoRPCAdminServer) ListCollections

func (*MongoRPCAdminServer) ListDatabases

func (srv *MongoRPCAdminServer) ListDatabases(ctx context.Context, _ *mongorpc.Empty) (*mongorpc.Value, error)

func (*MongoRPCAdminServer) ListIndexes

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 (*MongoRPCServer) InsertDocument

func (*MongoRPCServer) Listen

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)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL