git_odb_backend

An instance for a custom backend

package extern (C) nothrow @nogc
struct git_odb_backend {}

Members

Variables

exists
int function(.git_odb_backend*, const(libgit2_d.oid.git_oid)*) exists;
Undocumented in source.
exists_prefix
int function(libgit2_d.oid.git_oid*, .git_odb_backend*, const(libgit2_d.oid.git_oid)*, size_t) exists_prefix;
Undocumented in source.
foreach_
int function(.git_odb_backend*, libgit2_d.odb.git_odb_foreach_cb cb, void* payload) foreach_;
Undocumented in source.
free
void function(.git_odb_backend*) free;

Frees any resources held by the odb (including the git_odb_backend itself). An odb backend implementation must provide this function.

freshen
int function(.git_odb_backend*, const(libgit2_d.oid.git_oid)*) freshen;

"Freshens" an already existing object, updating its last-used time. This occurs when git_odb_write was called, but the object already existed (and will not be re-written). The underlying implementation may want to update last-used timestamps.

odb
libgit2_d.types.git_odb* odb;
Undocumented in source.
read
int function(void**, size_t*, libgit2_d.types.git_object_t*, .git_odb_backend*, const(libgit2_d.oid.git_oid)*) read;

read and read_prefix each return to libgit2 a buffer which will be freed later. The buffer should be allocated using the function git_odb_backend_data_alloc to ensure that libgit2 can safely free it later.

read_header
int function(size_t*, libgit2_d.types.git_object_t*, .git_odb_backend*, const(libgit2_d.oid.git_oid)*) read_header;
Undocumented in source.
read_prefix
int function(libgit2_d.oid.git_oid*, void**, size_t*, libgit2_d.types.git_object_t*, .git_odb_backend*, const(libgit2_d.oid.git_oid)*, size_t) read_prefix;
Undocumented in source.
readstream
int function(libgit2_d.types.git_odb_stream**, size_t*, libgit2_d.types.git_object_t*, .git_odb_backend*, const(libgit2_d.oid.git_oid)*) readstream;
Undocumented in source.
refresh
int function(.git_odb_backend*) refresh;

If the backend implements a refreshing mechanism, it should be exposed through this endpoint. Each call to git_odb_refresh() will invoke it.

version_
uint version_;
Undocumented in source.
write
int function(.git_odb_backend*, const(libgit2_d.oid.git_oid)*, const(void)*, size_t, libgit2_d.types.git_object_t) write;

Write an object into the backend. The id of the object has already been calculated and is passed in.

writepack
int function(libgit2_d.types.git_odb_writepack**, .git_odb_backend*, libgit2_d.types.git_odb* odb, libgit2_d.indexer.git_indexer_progress_cb progress_cb, void* progress_payload) writepack;
Undocumented in source.
writestream
int function(libgit2_d.types.git_odb_stream**, .git_odb_backend*, libgit2_d.types.git_object_size_t, libgit2_d.types.git_object_t) writestream;
Undocumented in source.

Meta