Add javadoc

This commit is contained in:
Paul Campbell 2018-05-31 23:41:10 +01:00
parent 1098cd2e21
commit 5f9588b175
3 changed files with 15 additions and 0 deletions

View file

@ -27,6 +27,11 @@ import org.eclipse.jgit.api.errors.GitAPIException;
import java.nio.file.Path; import java.nio.file.Path;
/**
* Main API for connecting to a Git repo as a database.
*
* @author Paul Campbell (pcampbell@kemitix.net)
*/
public interface GitDB { public interface GitDB {
/** /**
@ -34,6 +39,7 @@ public interface GitDB {
* *
* @param dbDir the path to initialise the local repo in * @param dbDir the path to initialise the local repo in
* @return a GitDB instance for the created local gitdb * @return a GitDB instance for the created local gitdb
* @throws GitAPIException if there is an error initialising the Git repo
*/ */
static GitDB initLocal(final Path dbDir) throws GitAPIException { static GitDB initLocal(final Path dbDir) throws GitAPIException {
final InitCommand initCommand = Git.init().setGitDir(dbDir.toFile()).setBare(true); final InitCommand initCommand = Git.init().setGitDir(dbDir.toFile()).setBare(true);

View file

@ -24,6 +24,11 @@ package net.kemitix.gitdb;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.eclipse.jgit.api.Git; import org.eclipse.jgit.api.Git;
/**
* Implementation of GitDB for working with a local Repo.
*
* @author Paul Campbell (pcampbell@kemitix.net)
*/
@RequiredArgsConstructor @RequiredArgsConstructor
class GitDBLocal implements GitDB { class GitDBLocal implements GitDB {

View file

@ -19,4 +19,8 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/ */
/**
* GitDB - using git as a key/value database.
*/
package net.kemitix.gitdb; package net.kemitix.gitdb;