35 lines
779 B
C++
35 lines
779 B
C++
#ifndef BOLTDB_H
|
|
#define BOLTDB_H
|
|
|
|
#include "interop.h"
|
|
#include <functional>
|
|
|
|
typedef std::function<void(QByteArray)> NameReciever;
|
|
|
|
class BoltDB
|
|
{
|
|
protected:
|
|
BoltDB();
|
|
|
|
GoInt64 gmsDbRef;
|
|
|
|
public:
|
|
static BoltDB* createFrom(QString filePath, QString &errorOut);
|
|
|
|
bool listBucketsAtRoot(QString& errorOut, NameReciever cb);
|
|
|
|
bool listBuckets(QStringList bucketPath, QString& errorOut, NameReciever cb);
|
|
|
|
bool getStatsJSON(std::function<void(QString)> onSuccess, std::function<void(QString)> onError);
|
|
|
|
bool getBucketStatsJSON(QStringList bucketPath, std::function<void(QString)> onSuccess, std::function<void(QString)> onError);
|
|
|
|
~BoltDB();
|
|
|
|
protected:
|
|
|
|
bool pumpNext(GoInt64 jobRef, QString& errorOut, NameReciever cb);
|
|
};
|
|
|
|
#endif // BOLTDB_H
|