summaryrefslogtreecommitdiff
path: root/magefiles/magefile.go
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2025-05-02 14:29:41 -0600
committermo khan <mo@mokhan.ca>2025-05-02 14:29:41 -0600
commitc583bcd1473205104a1e1af812ed4976d30c7baa (patch)
tree933edf78a4ac8aea55256e42641e56bbb4c58834 /magefiles/magefile.go
parent91defaefca47e9cebbe92c6abf33c4423df9bc7d (diff)
refactor: remove anything unrelated to the authz daemon
Diffstat (limited to 'magefiles/magefile.go')
-rw-r--r--magefiles/magefile.go52
1 files changed, 4 insertions, 48 deletions
diff --git a/magefiles/magefile.go b/magefiles/magefile.go
index 71aa3bc8..06dc0251 100644
--- a/magefiles/magefile.go
+++ b/magefiles/magefile.go
@@ -16,49 +16,10 @@ import (
// If not set, running mage will list available targets
var Default = Servers
-// Run the Identity Provider
-func Idp() error {
- env := map[string]string{
- "SCHEME": "http",
- "PORT": "8282",
- "HOST": "idp.example.com:8080",
- }
- return sh.RunWithV(env, "ruby", "./bin/idp")
-}
-
-// Run the UI (a.k.a Service Provider)
-func UI() error {
- env := map[string]string{
- "SCHEME": "http",
- "PORT": "8283",
- "HOST": "ui.example.com:8080",
- "IDP_HOST": "idp.example.com:8080",
- }
- return sh.RunWithV(env, "ruby", "./bin/ui")
-}
-
-// Run the API Gateway
-func Gateway() error {
- env := map[string]string{
- "BIND_ADDR": ":8080",
- }
- return sh.RunWithV(env, "go", "run", "./cmd/gtwy/main.go")
-}
-
-// Run the REST API
-func Api() error {
- env := map[string]string{
- "SCHEME": "http",
- "PORT": "8284",
- "HOST": "localhost:8284",
- }
- return sh.RunWithV(env, "ruby", "./bin/api")
-}
-
// Run the Authzd Service
func Authzd() error {
env := map[string]string{
- "BIND_ADDR": ":50051",
+ "BIND_ADDR": ":8080",
}
return sh.RunWithV(env, "go", "run", "./cmd/authzd/main.go")
}
@@ -82,13 +43,8 @@ func Protos() error {
if err := sh.RunV(
"protoc",
"--proto_path=./protos",
- "--go_out=pkg/rpc",
- "--go_opt=paths=source_relative",
- "--go-grpc_out=pkg/rpc",
- "--go-grpc_opt=paths=source_relative",
- "--twirp_out=pkg/rpc",
- "--ruby_out=lib/authx/rpc",
- "--twirp_ruby_out=lib/authx/rpc",
+ "--go_out=.",
+ "--twirp_out=.",
file,
); err != nil {
return err
@@ -100,7 +56,7 @@ func Protos() error {
// Run All the servers
func Servers(ctx context.Context) {
- mg.CtxDeps(ctx, (Step{}).Server, Nats, Idp, UI, Api, Authzd, Gateway)
+ mg.CtxDeps(ctx, Nats, Authzd)
}
// Run the end to end tests