mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-01 18:01:28 -06:00
set owncloud namespace on micro tooling
This commit is contained in:
1
go.mod
1
go.mod
@@ -23,4 +23,5 @@ require (
|
||||
github.com/spf13/viper v1.6.1
|
||||
go.opencensus.io v0.22.2
|
||||
google.golang.org/appengine v1.6.1
|
||||
gopkg.in/urfave/cli.v1 v1.20.0 // indirect
|
||||
)
|
||||
|
||||
2
go.sum
2
go.sum
@@ -997,6 +997,8 @@ gopkg.in/src-d/go-git.v4 v4.13.1/go.mod h1:nx5NYcxdKxq5fpltdHnPa2Exj4Sx0EclMWZQb
|
||||
gopkg.in/telegram-bot-api.v4 v4.6.4 h1:hpHWhzn4jTCsAJZZ2loNKfy2QWyPDRJVl3aTFXeMW8g=
|
||||
gopkg.in/telegram-bot-api.v4 v4.6.4/go.mod h1:5DpGO5dbumb40px+dXcwCpcjmeHNYLpk0bp3XRNvWDM=
|
||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
|
||||
gopkg.in/urfave/cli.v1 v1.20.0 h1:NdAVW6RYxDif9DhDHaAortIu956m2c0v+09AZBPTbE0=
|
||||
gopkg.in/urfave/cli.v1 v1.20.0/go.mod h1:vuBzUtMdQeixQj8LVd+/98pzhxNGQoyuPBlsXHOQNO0=
|
||||
gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI=
|
||||
gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74=
|
||||
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
|
||||
@@ -8,13 +8,10 @@ import (
|
||||
"github.com/micro/cli"
|
||||
gorun "github.com/micro/go-micro/runtime"
|
||||
"github.com/micro/micro/api"
|
||||
"github.com/micro/micro/bot"
|
||||
"github.com/micro/micro/broker"
|
||||
"github.com/micro/micro/debug"
|
||||
"github.com/micro/micro/health"
|
||||
"github.com/micro/micro/monitor"
|
||||
"github.com/micro/micro/network"
|
||||
"github.com/micro/micro/new"
|
||||
"github.com/micro/micro/plugin/build"
|
||||
"github.com/micro/micro/proxy"
|
||||
"github.com/micro/micro/registry"
|
||||
@@ -29,21 +26,24 @@ import (
|
||||
"github.com/owncloud/ocis-pkg/log"
|
||||
)
|
||||
|
||||
// OwncloudNamespace is the base path for micro' services to use
|
||||
var OwncloudNamespace = "com.owncloud."
|
||||
|
||||
// RuntimeServices to start as part of the fullstack option
|
||||
var RuntimeServices = []string{
|
||||
"network", // :8085
|
||||
// "network", // :8085
|
||||
"runtime", // :8088
|
||||
"registry", // :8000
|
||||
"broker", // :8001
|
||||
"store", // :8002
|
||||
"tunnel", // :8083
|
||||
"router", // :8084
|
||||
"monitor", // :????
|
||||
"debug", // :????
|
||||
"proxy", // :8081
|
||||
"api", // :8080
|
||||
"web", // :8082
|
||||
"bot", // :????
|
||||
"monitor", // :????
|
||||
// "debug", // :????
|
||||
// "bot", // :????
|
||||
}
|
||||
|
||||
// Extensions are ocis extension services
|
||||
@@ -118,8 +118,10 @@ func (r *Runtime) Start() {
|
||||
|
||||
// AddRuntime adds the micro subcommands to the cli app
|
||||
func AddRuntime(app *cli.App) {
|
||||
// load this from disk / env?
|
||||
setDefaults()
|
||||
|
||||
app.Commands = append(app.Commands, api.Commands()...)
|
||||
app.Commands = append(app.Commands, bot.Commands()...)
|
||||
app.Commands = append(app.Commands, broker.Commands()...)
|
||||
app.Commands = append(app.Commands, health.Commands()...)
|
||||
app.Commands = append(app.Commands, proxy.Commands()...)
|
||||
@@ -129,12 +131,91 @@ func AddRuntime(app *cli.App) {
|
||||
app.Commands = append(app.Commands, network.Commands()...)
|
||||
app.Commands = append(app.Commands, registry.Commands()...)
|
||||
app.Commands = append(app.Commands, runtime.Commands()...)
|
||||
app.Commands = append(app.Commands, debug.Commands()...)
|
||||
app.Commands = append(app.Commands, server.Commands()...)
|
||||
app.Commands = append(app.Commands, service.Commands()...)
|
||||
app.Commands = append(app.Commands, store.Commands()...)
|
||||
app.Commands = append(app.Commands, token.Commands()...)
|
||||
app.Commands = append(app.Commands, new.Commands()...)
|
||||
app.Commands = append(app.Commands, build.Commands()...)
|
||||
app.Commands = append(app.Commands, web.Commands()...)
|
||||
// app.Commands = append(app.Commands, bot.Commands()...)
|
||||
// app.Commands = append(app.Commands, new.Commands()...)
|
||||
// app.Commands = append(app.Commands, debug.Commands()...)
|
||||
}
|
||||
|
||||
// provide a config.Config with default values?
|
||||
func setDefaults() {
|
||||
// api
|
||||
api.Name = OwncloudNamespace + "api"
|
||||
api.Namespace = OwncloudNamespace + "api"
|
||||
api.HeaderPrefix = "X-Micro-Owncloud-"
|
||||
// api.EnableRPC = false
|
||||
// api.RPCPath
|
||||
// api.Address
|
||||
// api.Handler
|
||||
// api.Resolver
|
||||
// api.ProxyPath
|
||||
// api.APIPath
|
||||
|
||||
// broker
|
||||
broker.Name = OwncloudNamespace + "http.broker"
|
||||
// broker.Address
|
||||
|
||||
// proxy
|
||||
proxy.Name = OwncloudNamespace + "proxy"
|
||||
// proxy.Address
|
||||
// proxy.Protocol
|
||||
// proxy.Endpoint
|
||||
|
||||
// monitor
|
||||
monitor.Name = OwncloudNamespace + "monitor"
|
||||
|
||||
// router
|
||||
router.Name = OwncloudNamespace + "router"
|
||||
// router.Address
|
||||
// router.Network
|
||||
// router.Topic
|
||||
|
||||
// tunnel
|
||||
tunnel.Name = OwncloudNamespace + "tunnel"
|
||||
// tunnel.Address
|
||||
// tunnel.Token
|
||||
// tunnel.Tunnel
|
||||
|
||||
// network
|
||||
network.Name = OwncloudNamespace + "network"
|
||||
// network.Address
|
||||
// network.Advertise
|
||||
// network.Resolver
|
||||
// network.Token
|
||||
|
||||
// registry
|
||||
registry.Name = OwncloudNamespace + "registry"
|
||||
// registry.Address
|
||||
// registry.SyncTime
|
||||
// registry.Topic
|
||||
|
||||
// runtime
|
||||
runtime.Name = OwncloudNamespace + "runtime"
|
||||
// runtime.Address
|
||||
|
||||
// server
|
||||
server.Name = OwncloudNamespace + "server"
|
||||
// server.Address
|
||||
// server.Network
|
||||
// server.Router
|
||||
|
||||
// store
|
||||
store.Name = OwncloudNamespace + "store"
|
||||
// store.Address
|
||||
|
||||
// web
|
||||
web.Name = OwncloudNamespace + "web"
|
||||
web.Namespace = OwncloudNamespace + "web"
|
||||
// web.ACMECA
|
||||
// web.ACMEChallengeProvider
|
||||
// web.ACMEProvider
|
||||
// web.Address
|
||||
// web.BasePathHeader
|
||||
// web.DefaultIcon
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user