mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-02 02:11:18 -06:00
Adding ocis-graph-explorer to ocis
This commit is contained in:
1
go.mod
1
go.mod
@@ -17,6 +17,7 @@ require (
|
||||
github.com/onsi/ginkgo v1.10.3 // indirect
|
||||
github.com/openzipkin/zipkin-go v0.2.2
|
||||
github.com/owncloud/ocis-graph v0.0.0-20191227120927-91e17d0cdeb1
|
||||
github.com/owncloud/ocis-graph-explorer v0.0.0-20200128104949-78e556279eab
|
||||
github.com/owncloud/ocis-hello v0.0.0-20200114093148-2205c2745838
|
||||
github.com/owncloud/ocis-konnectd v0.0.0-20191227185917-046fec203337
|
||||
github.com/owncloud/ocis-ocs v0.0.0-20191224113758-20455a2e9013
|
||||
|
||||
6
go.sum
6
go.sum
@@ -621,6 +621,12 @@ github.com/ory/go-convenience v0.1.0/go.mod h1:uEY/a60PL5c12nYz4V5cHY03IBmwIAEm8
|
||||
github.com/ovh/go-ovh v0.0.0-20181109152953-ba5adb4cf014/go.mod h1:joRatxRJaZBsY3JAOEMcoOp05CnZzsx4scTxi95DHyQ=
|
||||
github.com/owncloud/ocis-graph v0.0.0-20191227120927-91e17d0cdeb1 h1:Zamh3nQI2moI/rfbuNHwog0KXU9osNLVkUM2BfcHA0g=
|
||||
github.com/owncloud/ocis-graph v0.0.0-20191227120927-91e17d0cdeb1/go.mod h1:7fIggCksf10Nlu0KhU9U9KeY+v7n47OHLjWMRrNxlg8=
|
||||
github.com/owncloud/ocis-graph-explorer v0.0.0-20200123111637-3b2e1da63f17 h1:avZsUazewQurfNZTf091PeYw7v8GvfpFO5pbA0MDo3I=
|
||||
github.com/owncloud/ocis-graph-explorer v0.0.0-20200123111637-3b2e1da63f17/go.mod h1:MtgUsjJfUpeDvxDCmMhUjqnzrjg8qjjP4HhlLKufDdc=
|
||||
github.com/owncloud/ocis-graph-explorer v0.0.0-20200128090021-bf345cff039a h1:h3T35ffMZ0BTfENw3ErNei8sCRy6D6fTdeGqQKNTpsU=
|
||||
github.com/owncloud/ocis-graph-explorer v0.0.0-20200128090021-bf345cff039a/go.mod h1:MtgUsjJfUpeDvxDCmMhUjqnzrjg8qjjP4HhlLKufDdc=
|
||||
github.com/owncloud/ocis-graph-explorer v0.0.0-20200128104949-78e556279eab h1:yvWqFZNPKQbtuSzzlS5+F9qBX2R8YX0EH7swdQeUvm0=
|
||||
github.com/owncloud/ocis-graph-explorer v0.0.0-20200128104949-78e556279eab/go.mod h1:MtgUsjJfUpeDvxDCmMhUjqnzrjg8qjjP4HhlLKufDdc=
|
||||
github.com/owncloud/ocis-hello v0.0.0-20200114093148-2205c2745838 h1:kG/H/Ey6sqU6xIzsDtZEpR321NlyPrsxPKrDAe9sbY0=
|
||||
github.com/owncloud/ocis-hello v0.0.0-20200114093148-2205c2745838/go.mod h1:hrXqmloO2NHbdkDTPSNneobwzQgki8CUuQD8fqjkPv8=
|
||||
github.com/owncloud/ocis-konnectd v0.0.0-20191227185917-046fec203337 h1:ZGqMcrWZgGoH+jztjSFvzAJGw3lsG2/jjZQioV4ZcDY=
|
||||
|
||||
45
pkg/command/graph-explorer.go
Normal file
45
pkg/command/graph-explorer.go
Normal file
@@ -0,0 +1,45 @@
|
||||
// +build !simple
|
||||
|
||||
package command
|
||||
|
||||
import (
|
||||
"github.com/micro/cli"
|
||||
"github.com/owncloud/ocis-graph-explorer/pkg/command"
|
||||
svcconfig "github.com/owncloud/ocis-graph-explorer/pkg/config"
|
||||
"github.com/owncloud/ocis-graph-explorer/pkg/flagset"
|
||||
"github.com/owncloud/ocis/pkg/config"
|
||||
"github.com/owncloud/ocis/pkg/register"
|
||||
)
|
||||
|
||||
// GraphExplorerCommand is the entry point for the graph command.
|
||||
func GraphExplorerCommand(cfg *config.Config) cli.Command {
|
||||
return cli.Command{
|
||||
Name: "graph-explorer",
|
||||
Usage: "Start graph explorer",
|
||||
Category: "Extensions",
|
||||
Flags: flagset.ServerWithConfig(cfg.GraphExplorer),
|
||||
Action: func(c *cli.Context) error {
|
||||
scfg := configureGraphExplorer(cfg)
|
||||
|
||||
return cli.HandleAction(
|
||||
command.Server(scfg).Action,
|
||||
c,
|
||||
)
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func configureGraphExplorer(cfg *config.Config) *svcconfig.Config {
|
||||
cfg.GraphExplorer.Log.Level = cfg.Log.Level
|
||||
cfg.GraphExplorer.Log.Pretty = cfg.Log.Pretty
|
||||
cfg.GraphExplorer.Log.Color = cfg.Log.Color
|
||||
cfg.GraphExplorer.Tracing.Enabled = false
|
||||
cfg.GraphExplorer.HTTP.Addr = "localhost:9135"
|
||||
cfg.GraphExplorer.HTTP.Root = "/"
|
||||
|
||||
return cfg.GraphExplorer
|
||||
}
|
||||
|
||||
func init() {
|
||||
register.AddCommand(GraphExplorerCommand)
|
||||
}
|
||||
@@ -2,6 +2,7 @@ package config
|
||||
|
||||
import (
|
||||
graph "github.com/owncloud/ocis-graph/pkg/config"
|
||||
graphExplorer "github.com/owncloud/ocis-graph-explorer/pkg/config"
|
||||
hello "github.com/owncloud/ocis-hello/pkg/config"
|
||||
konnectd "github.com/owncloud/ocis-konnectd/pkg/config"
|
||||
ocs "github.com/owncloud/ocis-ocs/pkg/config"
|
||||
@@ -54,24 +55,26 @@ type Config struct {
|
||||
GRPC GRPC
|
||||
Tracing Tracing
|
||||
|
||||
Graph *graph.Config
|
||||
Hello *hello.Config
|
||||
Konnectd *konnectd.Config
|
||||
OCS *ocs.Config
|
||||
Phoenix *phoenix.Config
|
||||
WebDAV *webdav.Config
|
||||
Reva *reva.Config
|
||||
Graph *graph.Config
|
||||
GraphExplorer *graphExplorer.Config
|
||||
Hello *hello.Config
|
||||
Konnectd *konnectd.Config
|
||||
OCS *ocs.Config
|
||||
Phoenix *phoenix.Config
|
||||
WebDAV *webdav.Config
|
||||
Reva *reva.Config
|
||||
}
|
||||
|
||||
// New initializes a new configuration with or without defaults.
|
||||
func New() *Config {
|
||||
return &Config{
|
||||
Graph: graph.New(),
|
||||
Hello: hello.New(),
|
||||
Konnectd: konnectd.New(),
|
||||
OCS: ocs.New(),
|
||||
Phoenix: phoenix.New(),
|
||||
WebDAV: webdav.New(),
|
||||
Reva: reva.New(),
|
||||
Graph: graph.New(),
|
||||
GraphExplorer: graphExplorer.New(),
|
||||
Hello: hello.New(),
|
||||
Konnectd: konnectd.New(),
|
||||
OCS: ocs.New(),
|
||||
Phoenix: phoenix.New(),
|
||||
WebDAV: webdav.New(),
|
||||
Reva: reva.New(),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,6 +41,7 @@ var Extensions = []string{
|
||||
"hello",
|
||||
"phoenix",
|
||||
"graph",
|
||||
"graph-explorer",
|
||||
"ocs",
|
||||
"webdav",
|
||||
"reva-frontend",
|
||||
|
||||
Reference in New Issue
Block a user