Categorygithub.com/src-d/core-retrieval
modulepackage
0.0.0-20181128152223-27a526a7da6f
Repository: https://github.com/src-d/core-retrieval.git
Documentation: pkg.go.dev

# README

core-retrieval Build Status codecov.io

core-retrieval provides the models and services that are used across different Data Retrieval projects.

It uses a simple Dependency Injection Container configured with environment variables.

Generate models and schema

core-retrieval uses kallax as an ORM, and thus, it needs some code generation every time the models change. You can regenerate models by doing:

make generate-models

Or just:

go generate ./...

On top of that, the SQL schema of the models included in this package is bundled together as Go code using go-bindata. To regenerate the bindata of the schema, just run the following command:

make schema

There are some checks in the CI that prevent a build from suceeding if both the models and the schema are not generated.

License

Licensed under the terms of the Apache License Version 2.0. See the LICENSE file for the full license text.

# Packages

Code generated by https://github.com/src-d/go-kallax.
Package repository implements services to work with Git repository storage.
No description provided by the author
No description provided by the author

# Functions

Broker returns a queue.Broker for the default queue system.
Database returns a sql.DB for the default database.
Locking returns a lock.Service that can be used to acquire namespaced locks.
ModelMentionStore returns the default *model.ModelMentionStore, using the default database.
ModelRepositoryStore returns the default *model.RepositoryStore, using the default database.
RootedTransactioner returns the default RootedTransactioner instance, using the default RootRepositories directory.
TemporaryFilesystem returns a billy.Filesystem that can be used to store temporary files.