Reorganise to make cmd code more prominant
This commit is contained in:
parent
c66d6d3994
commit
639559544d
10 changed files with 393 additions and 393 deletions
|
|
@ -22,8 +22,8 @@ import (
|
||||||
|
|
||||||
"github.com/barakmich/glog"
|
"github.com/barakmich/glog"
|
||||||
|
|
||||||
"github.com/google/cayley"
|
|
||||||
"github.com/google/cayley/config"
|
"github.com/google/cayley/config"
|
||||||
|
"github.com/google/cayley/db"
|
||||||
"github.com/google/cayley/graph"
|
"github.com/google/cayley/graph"
|
||||||
"github.com/google/cayley/http"
|
"github.com/google/cayley/http"
|
||||||
)
|
)
|
||||||
|
|
@ -69,17 +69,17 @@ func main() {
|
||||||
}
|
}
|
||||||
switch cmd {
|
switch cmd {
|
||||||
case "init":
|
case "init":
|
||||||
cayley.CayleyInit(cfg, *tripleFile)
|
db.CayleyInit(cfg, *tripleFile)
|
||||||
case "load":
|
case "load":
|
||||||
ts = cayley.OpenTSFromConfig(cfg)
|
ts = db.OpenTSFromConfig(cfg)
|
||||||
cayley.CayleyLoad(ts, cfg, *tripleFile, false)
|
db.CayleyLoad(ts, cfg, *tripleFile, false)
|
||||||
ts.Close()
|
ts.Close()
|
||||||
case "repl":
|
case "repl":
|
||||||
ts = cayley.OpenTSFromConfig(cfg)
|
ts = db.OpenTSFromConfig(cfg)
|
||||||
cayley.CayleyRepl(ts, *queryLanguage, cfg)
|
db.CayleyRepl(ts, *queryLanguage, cfg)
|
||||||
ts.Close()
|
ts.Close()
|
||||||
case "http":
|
case "http":
|
||||||
ts = cayley.OpenTSFromConfig(cfg)
|
ts = db.OpenTSFromConfig(cfg)
|
||||||
http.CayleyHTTP(ts, cfg)
|
http.CayleyHTTP(ts, cfg)
|
||||||
ts.Close()
|
ts.Close()
|
||||||
default:
|
default:
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
package cayley
|
package db
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/google/cayley/config"
|
"github.com/google/cayley/config"
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
package cayley
|
package db
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"os"
|
"os"
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
package cayley
|
package db
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/barakmich/glog"
|
"github.com/barakmich/glog"
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
package cayley
|
package db
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bufio"
|
"bufio"
|
||||||
Loading…
Add table
Add a link
Reference in a new issue