diff --git a/Dockerfile b/Dockerfile index c4ba452..201616d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,7 +19,7 @@ RUN make build FROM registry.access.redhat.com/ubi8/ubi-minimal:8.10 -COPY --from=builder /workspace/bin/ciam-rebac /usr/local/bin/ +COPY --from=builder /workspace/bin/kessel-relations /usr/local/bin/ COPY --from=builder /workspace/configs/config.yaml /usr/local/bin/ EXPOSE 8000 @@ -27,9 +27,9 @@ EXPOSE 9000 USER 1001 -ENTRYPOINT ["/usr/local/bin/ciam-rebac","-conf","/usr/local/bin/config.yaml"] +ENTRYPOINT ["/usr/local/bin/kessel-relations","-conf","/usr/local/bin/config.yaml"] -LABEL name="ciam-rebac" \ +LABEL name="kessel-relations-api" \ version="0.0.1" \ - summary="ciam-rebac service" \ - description="rebac" + summary="Kessel relations-api service" \ + description="The Kessel relations-api service" diff --git a/Makefile b/Makefile index 87f69b0..68276a2 100644 --- a/Makefile +++ b/Makefile @@ -85,25 +85,25 @@ pr-check: make lint; make build; -spicedb: +spicedb-up: ./spicedb/start-spicedb.sh -.PHONY: spicedb +.PHONY: spicedb-up -rebac: - ./spicedb/start-insights-rebac.sh -.PHONY: rebac +relations-api-up: + ./spicedb/start-relations-api.sh +.PHONY: relations-api-up -rebac/teardown: - ./spicedb/teardownrebac.sh -.PHONY: rebac/teardown +relations-api-down: + ./spicedb/stop-relations-api.sh +.PHONY: relations-api-down -spicedb/teardown: +spicedb-down: ./spicedb/teardown.sh -.PHONY: spicedb/teardown +.PHONY: spicedb-down -kind/rebac: +kind/relations-api: ./spicedb-kind-setup/setup.sh -.PHONY: kind/spicedb +.PHONY: kind/relations-api kind/teardown: ./spicedb-kind-setup/teardown.sh @@ -112,7 +112,7 @@ kind/teardown: .PHONY: run # run api locally run: build - ./bin/ciam-rebac -conf configs + ./bin/kessel-relations -conf configs # show help help: diff --git a/README.md b/README.md index 872ab59..75a4ec9 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ See also: `make build` -(Configs must be specified to run binary, e.g. `./bin/ciam-rebac -conf configs`, or run make target, below.) +(Configs must be specified to run binary, e.g. `./bin/kessel-relations -conf configs`, or run make target, below.) ### Run @@ -74,28 +74,28 @@ wire ### Run spicedb and postgresql db with docker/podman compose -`make spicedb` +`make spicedb-up` -This is a good option for keeping spicedb running in the background while the rebac service is run via +This is a good option for keeping spicedb running in the background while the relations-api service is run via `make run`, the binary or via the IDE (run/debug) during local development. -### Run the insights-rebac and spicedb with docker/podman compose +### Run the relations-api and spicedb with docker/podman compose -`make rebac` +`make relations-api-up` -This runs everything and is a good option for testing a built rebac container image with the running binary. +This runs everything and is a good option for testing a built relations-api container image with the running binary. ### Teardown spicedb and postgresql db (brought up with docker/podman compose, as above) -`make spicedb/teardown` +`make spicedb-down` -### Teardown rebac and dependencies (brought up with docker/podman compose, as above) +### Teardown relations-api and dependencies (brought up with docker/podman compose, as above) -`make rebac/teardown` +`make relations-api-down` -### Deploy Rebac and Spicedb using kind/kubernetes +### Deploy relations-api and spicedb using kind/kubernetes -`make kind/rebac` +`make kind/relations-api` ### Docker @@ -159,7 +159,7 @@ You should be able to use the public route (relations-\*) created by the clowder This is demonstrating calling relationship api from rbac service in ephemeral environment. ``` -./deploy.sh rbac +./deploy.sh rbac ``` `path_to_local_copy_of_insights_rbac` is this [repository](https://github.com/RedHatInsights/insights-rbac) diff --git a/api/health/v1/health.pb.go b/api/health/v1/health.pb.go index 7ef95e2..82609f6 100644 --- a/api/health/v1/health.pb.go +++ b/api/health/v1/health.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.1 -// protoc v5.27.0 +// protoc-gen-go v1.34.2 +// protoc v5.26.1 // source: health/v1/health.proto package v1 @@ -199,12 +199,13 @@ var file_health_v1_health_proto_rawDesc = []byte{ 0x1a, 0x23, 0x2e, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x61, 0x64, 0x79, 0x7a, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x0f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x09, 0x12, 0x07, 0x2f, - 0x72, 0x65, 0x61, 0x64, 0x79, 0x7a, 0x42, 0x44, 0x0a, 0x23, 0x6f, 0x72, 0x67, 0x2e, 0x70, 0x72, + 0x72, 0x65, 0x61, 0x64, 0x79, 0x7a, 0x42, 0x5e, 0x0a, 0x23, 0x6f, 0x72, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x31, 0x50, 0x01, 0x5a, - 0x1b, 0x63, 0x69, 0x61, 0x6d, 0x2d, 0x72, 0x65, 0x62, 0x61, 0x63, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x3b, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x2d, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2d, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x68, 0x65, 0x61, + 0x6c, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -220,7 +221,7 @@ func file_health_v1_health_proto_rawDescGZIP() []byte { } var file_health_v1_health_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_health_v1_health_proto_goTypes = []interface{}{ +var file_health_v1_health_proto_goTypes = []any{ (*GetLivezRequest)(nil), // 0: kessel.relations.v1.GetLivezRequest (*GetLivezReply)(nil), // 1: kessel.relations.v1.GetLivezReply (*GetReadyzRequest)(nil), // 2: kessel.relations.v1.GetReadyzRequest @@ -244,7 +245,7 @@ func file_health_v1_health_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_health_v1_health_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_health_v1_health_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*GetLivezRequest); i { case 0: return &v.state @@ -256,7 +257,7 @@ func file_health_v1_health_proto_init() { return nil } } - file_health_v1_health_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_health_v1_health_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*GetLivezReply); i { case 0: return &v.state @@ -268,7 +269,7 @@ func file_health_v1_health_proto_init() { return nil } } - file_health_v1_health_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_health_v1_health_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*GetReadyzRequest); i { case 0: return &v.state @@ -280,7 +281,7 @@ func file_health_v1_health_proto_init() { return nil } } - file_health_v1_health_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_health_v1_health_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*GetReadyzReply); i { case 0: return &v.state diff --git a/api/health/v1/health.proto b/api/health/v1/health.proto index 96caf33..2d7e9d6 100644 --- a/api/health/v1/health.proto +++ b/api/health/v1/health.proto @@ -4,7 +4,7 @@ package kessel.relations.v1; import "google/api/annotations.proto"; -option go_package = "ciam-rebac/api/health/v1;v1"; +option go_package = "github.com/project-kessel/relations-api/api/health/v1"; option java_multiple_files = true; option java_package = "org.project_kessel.api.relations.v1"; diff --git a/api/health/v1/health_grpc.pb.go b/api/health/v1/health_grpc.pb.go index 6016b68..f29809f 100644 --- a/api/health/v1/health_grpc.pb.go +++ b/api/health/v1/health_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.4.0 -// - protoc v5.27.0 +// - protoc v5.26.1 // source: health/v1/health.proto package v1 diff --git a/api/health/v1/health_http.pb.go b/api/health/v1/health_http.pb.go index 9c3b42e..168e784 100644 --- a/api/health/v1/health_http.pb.go +++ b/api/health/v1/health_http.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-http. DO NOT EDIT. // versions: // - protoc-gen-go-http v2.7.3 -// - protoc v5.27.0 +// - protoc v5.26.1 // source: health/v1/health.proto package v1 diff --git a/api/relations/v0/check.pb.go b/api/relations/v0/check.pb.go index ff55a8e..4452f9b 100644 --- a/api/relations/v0/check.pb.go +++ b/api/relations/v0/check.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.1 -// protoc v5.27.0 +// protoc-gen-go v1.34.2 +// protoc v5.26.1 // source: relations/v0/check.proto package v0 @@ -218,12 +218,13 @@ var file_relations_v0_check_proto_rawDesc = []byte{ 0x73, 0x73, 0x65, 0x6c, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x14, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0e, 0x3a, 0x01, 0x2a, 0x22, 0x09, 0x2f, 0x76, 0x30, 0x2f, - 0x63, 0x68, 0x65, 0x63, 0x6b, 0x42, 0x47, 0x0a, 0x23, 0x6f, 0x72, 0x67, 0x2e, 0x70, 0x72, 0x6f, + 0x63, 0x68, 0x65, 0x63, 0x6b, 0x42, 0x61, 0x0a, 0x23, 0x6f, 0x72, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x30, 0x50, 0x01, 0x5a, 0x1e, - 0x63, 0x69, 0x61, 0x6d, 0x2d, 0x72, 0x65, 0x62, 0x61, 0x63, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, - 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x30, 0x3b, 0x76, 0x30, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x30, 0x50, 0x01, 0x5a, 0x38, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x2d, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2d, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x30, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -240,7 +241,7 @@ func file_relations_v0_check_proto_rawDescGZIP() []byte { var file_relations_v0_check_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_relations_v0_check_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_relations_v0_check_proto_goTypes = []interface{}{ +var file_relations_v0_check_proto_goTypes = []any{ (CheckResponse_Allowed)(0), // 0: kessel.relations.v0.CheckResponse.Allowed (*CheckRequest)(nil), // 1: kessel.relations.v0.CheckRequest (*CheckResponse)(nil), // 2: kessel.relations.v0.CheckResponse @@ -267,7 +268,7 @@ func file_relations_v0_check_proto_init() { } file_relations_v0_common_proto_init() if !protoimpl.UnsafeEnabled { - file_relations_v0_check_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_relations_v0_check_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*CheckRequest); i { case 0: return &v.state @@ -279,7 +280,7 @@ func file_relations_v0_check_proto_init() { return nil } } - file_relations_v0_check_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_relations_v0_check_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*CheckResponse); i { case 0: return &v.state diff --git a/api/relations/v0/check.proto b/api/relations/v0/check.proto index d7ce52a..ae48c77 100644 --- a/api/relations/v0/check.proto +++ b/api/relations/v0/check.proto @@ -5,7 +5,7 @@ package kessel.relations.v0; import "google/api/annotations.proto"; import "relations/v0/common.proto"; -option go_package = "ciam-rebac/api/relations/v0;v0"; +option go_package = "github.com/project-kessel/relations-api/api/relations/v0"; option java_multiple_files = true; option java_package = "org.project_kessel.api.relations.v0"; diff --git a/api/relations/v0/check_grpc.pb.go b/api/relations/v0/check_grpc.pb.go index 4bac320..f2cf833 100644 --- a/api/relations/v0/check_grpc.pb.go +++ b/api/relations/v0/check_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.4.0 -// - protoc v5.27.0 +// - protoc v5.26.1 // source: relations/v0/check.proto package v0 diff --git a/api/relations/v0/check_http.pb.go b/api/relations/v0/check_http.pb.go index 0f37d2f..064d0d1 100644 --- a/api/relations/v0/check_http.pb.go +++ b/api/relations/v0/check_http.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-http. DO NOT EDIT. // versions: // - protoc-gen-go-http v2.7.3 -// - protoc v5.27.0 +// - protoc v5.26.1 // source: relations/v0/check.proto package v0 diff --git a/api/relations/v0/common.pb.go b/api/relations/v0/common.pb.go index 0a31ce4..0e7c30d 100644 --- a/api/relations/v0/common.pb.go +++ b/api/relations/v0/common.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.1 -// protoc v5.27.0 +// protoc-gen-go v1.34.2 +// protoc v5.26.1 // source: relations/v0/common.proto package v0 @@ -408,12 +408,14 @@ var file_relations_v0_common_proto_rawDesc = []byte{ 0x54, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x47, 0x0a, 0x23, 0x6f, 0x72, 0x67, 0x2e, 0x70, 0x72, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x61, 0x0a, 0x23, 0x6f, 0x72, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x30, 0x50, 0x01, 0x5a, - 0x1e, 0x63, 0x69, 0x61, 0x6d, 0x2d, 0x72, 0x65, 0x62, 0x61, 0x63, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x30, 0x3b, 0x76, 0x30, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x38, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x2d, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2d, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x30, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( @@ -429,7 +431,7 @@ func file_relations_v0_common_proto_rawDescGZIP() []byte { } var file_relations_v0_common_proto_msgTypes = make([]protoimpl.MessageInfo, 6) -var file_relations_v0_common_proto_goTypes = []interface{}{ +var file_relations_v0_common_proto_goTypes = []any{ (*Relationship)(nil), // 0: kessel.relations.v0.Relationship (*SubjectReference)(nil), // 1: kessel.relations.v0.SubjectReference (*RequestPagination)(nil), // 2: kessel.relations.v0.RequestPagination @@ -455,7 +457,7 @@ func file_relations_v0_common_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_relations_v0_common_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_relations_v0_common_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Relationship); i { case 0: return &v.state @@ -467,7 +469,7 @@ func file_relations_v0_common_proto_init() { return nil } } - file_relations_v0_common_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_relations_v0_common_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*SubjectReference); i { case 0: return &v.state @@ -479,7 +481,7 @@ func file_relations_v0_common_proto_init() { return nil } } - file_relations_v0_common_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_relations_v0_common_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*RequestPagination); i { case 0: return &v.state @@ -491,7 +493,7 @@ func file_relations_v0_common_proto_init() { return nil } } - file_relations_v0_common_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_relations_v0_common_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*ResponsePagination); i { case 0: return &v.state @@ -503,7 +505,7 @@ func file_relations_v0_common_proto_init() { return nil } } - file_relations_v0_common_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_relations_v0_common_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*ObjectReference); i { case 0: return &v.state @@ -515,7 +517,7 @@ func file_relations_v0_common_proto_init() { return nil } } - file_relations_v0_common_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_relations_v0_common_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*ObjectType); i { case 0: return &v.state @@ -528,8 +530,8 @@ func file_relations_v0_common_proto_init() { } } } - file_relations_v0_common_proto_msgTypes[1].OneofWrappers = []interface{}{} - file_relations_v0_common_proto_msgTypes[2].OneofWrappers = []interface{}{} + file_relations_v0_common_proto_msgTypes[1].OneofWrappers = []any{} + file_relations_v0_common_proto_msgTypes[2].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/api/relations/v0/common.proto b/api/relations/v0/common.proto index 2218c0f..6ba8157 100644 --- a/api/relations/v0/common.proto +++ b/api/relations/v0/common.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package kessel.relations.v0; -option go_package = "ciam-rebac/api/relations/v0;v0"; +option go_package = "github.com/project-kessel/relations-api/api/relations/v0"; option java_multiple_files = true; option java_package = "org.project_kessel.api.relations.v0"; diff --git a/api/relations/v0/lookup.pb.go b/api/relations/v0/lookup.pb.go index 894e964..2599f59 100644 --- a/api/relations/v0/lookup.pb.go +++ b/api/relations/v0/lookup.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.1 -// protoc v5.27.0 +// protoc-gen-go v1.34.2 +// protoc v5.26.1 // source: relations/v0/lookup.proto package v0 @@ -206,12 +206,14 @@ var file_relations_v0_lookup_proto_rawDesc = []byte{ 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x14, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0e, 0x12, 0x0c, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x75, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x73, 0x30, 0x01, 0x42, 0x47, 0x0a, 0x23, 0x6f, 0x72, 0x67, 0x2e, 0x70, + 0x6a, 0x65, 0x63, 0x74, 0x73, 0x30, 0x01, 0x42, 0x61, 0x0a, 0x23, 0x6f, 0x72, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x30, 0x50, 0x01, - 0x5a, 0x1e, 0x63, 0x69, 0x61, 0x6d, 0x2d, 0x72, 0x65, 0x62, 0x61, 0x63, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x30, 0x3b, 0x76, 0x30, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x5a, 0x38, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2f, 0x72, 0x65, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2d, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x30, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( @@ -227,7 +229,7 @@ func file_relations_v0_lookup_proto_rawDescGZIP() []byte { } var file_relations_v0_lookup_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_relations_v0_lookup_proto_goTypes = []interface{}{ +var file_relations_v0_lookup_proto_goTypes = []any{ (*LookupSubjectsRequest)(nil), // 0: kessel.relations.v0.LookupSubjectsRequest (*LookupSubjectsResponse)(nil), // 1: kessel.relations.v0.LookupSubjectsResponse (*ObjectReference)(nil), // 2: kessel.relations.v0.ObjectReference @@ -258,7 +260,7 @@ func file_relations_v0_lookup_proto_init() { } file_relations_v0_common_proto_init() if !protoimpl.UnsafeEnabled { - file_relations_v0_lookup_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_relations_v0_lookup_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*LookupSubjectsRequest); i { case 0: return &v.state @@ -270,7 +272,7 @@ func file_relations_v0_lookup_proto_init() { return nil } } - file_relations_v0_lookup_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_relations_v0_lookup_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*LookupSubjectsResponse); i { case 0: return &v.state @@ -283,7 +285,7 @@ func file_relations_v0_lookup_proto_init() { } } } - file_relations_v0_lookup_proto_msgTypes[0].OneofWrappers = []interface{}{} + file_relations_v0_lookup_proto_msgTypes[0].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/api/relations/v0/lookup.proto b/api/relations/v0/lookup.proto index de97bab..81b7f9d 100644 --- a/api/relations/v0/lookup.proto +++ b/api/relations/v0/lookup.proto @@ -5,7 +5,7 @@ package kessel.relations.v0; import "google/api/annotations.proto"; import "relations/v0/common.proto"; -option go_package = "ciam-rebac/api/relations/v0;v0"; +option go_package = "github.com/project-kessel/relations-api/api/relations/v0"; option java_multiple_files = true; option java_package = "org.project_kessel.api.relations.v0"; diff --git a/api/relations/v0/lookup_grpc.pb.go b/api/relations/v0/lookup_grpc.pb.go index e691cc1..aaa939a 100644 --- a/api/relations/v0/lookup_grpc.pb.go +++ b/api/relations/v0/lookup_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.4.0 -// - protoc v5.27.0 +// - protoc v5.26.1 // source: relations/v0/lookup.proto package v0 diff --git a/api/relations/v0/relation_tuples.pb.go b/api/relations/v0/relation_tuples.pb.go index 426e2cb..6735c37 100644 --- a/api/relations/v0/relation_tuples.pb.go +++ b/api/relations/v0/relation_tuples.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.1 -// protoc v5.27.0 +// protoc-gen-go v1.34.2 +// protoc v5.26.1 // source: relations/v0/relation_tuples.proto package v0 @@ -573,12 +573,14 @@ var file_relations_v0_relation_tuples_proto_rawDesc = []byte{ 0x2e, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x12, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x0c, 0x2a, 0x0a, 0x2f, 0x76, 0x30, 0x2f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x42, 0x47, 0x0a, + 0x0c, 0x2a, 0x0a, 0x2f, 0x76, 0x30, 0x2f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x42, 0x61, 0x0a, 0x23, 0x6f, 0x72, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x76, 0x30, 0x50, 0x01, 0x5a, 0x1e, 0x63, 0x69, 0x61, 0x6d, 0x2d, 0x72, 0x65, 0x62, - 0x61, 0x63, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2f, 0x76, 0x30, 0x3b, 0x76, 0x30, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x2e, 0x76, 0x30, 0x50, 0x01, 0x5a, 0x38, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x6b, 0x65, 0x73, 0x73, 0x65, + 0x6c, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2d, 0x61, 0x70, 0x69, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x30, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -594,7 +596,7 @@ func file_relations_v0_relation_tuples_proto_rawDescGZIP() []byte { } var file_relations_v0_relation_tuples_proto_msgTypes = make([]protoimpl.MessageInfo, 8) -var file_relations_v0_relation_tuples_proto_goTypes = []interface{}{ +var file_relations_v0_relation_tuples_proto_goTypes = []any{ (*CreateTuplesRequest)(nil), // 0: kessel.relations.v0.CreateTuplesRequest (*CreateTuplesResponse)(nil), // 1: kessel.relations.v0.CreateTuplesResponse (*ReadTuplesRequest)(nil), // 2: kessel.relations.v0.ReadTuplesRequest @@ -635,7 +637,7 @@ func file_relations_v0_relation_tuples_proto_init() { } file_relations_v0_common_proto_init() if !protoimpl.UnsafeEnabled { - file_relations_v0_relation_tuples_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_relations_v0_relation_tuples_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*CreateTuplesRequest); i { case 0: return &v.state @@ -647,7 +649,7 @@ func file_relations_v0_relation_tuples_proto_init() { return nil } } - file_relations_v0_relation_tuples_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_relations_v0_relation_tuples_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*CreateTuplesResponse); i { case 0: return &v.state @@ -659,7 +661,7 @@ func file_relations_v0_relation_tuples_proto_init() { return nil } } - file_relations_v0_relation_tuples_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_relations_v0_relation_tuples_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*ReadTuplesRequest); i { case 0: return &v.state @@ -671,7 +673,7 @@ func file_relations_v0_relation_tuples_proto_init() { return nil } } - file_relations_v0_relation_tuples_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_relations_v0_relation_tuples_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*ReadTuplesResponse); i { case 0: return &v.state @@ -683,7 +685,7 @@ func file_relations_v0_relation_tuples_proto_init() { return nil } } - file_relations_v0_relation_tuples_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_relations_v0_relation_tuples_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*DeleteTuplesRequest); i { case 0: return &v.state @@ -695,7 +697,7 @@ func file_relations_v0_relation_tuples_proto_init() { return nil } } - file_relations_v0_relation_tuples_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_relations_v0_relation_tuples_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*DeleteTuplesResponse); i { case 0: return &v.state @@ -707,7 +709,7 @@ func file_relations_v0_relation_tuples_proto_init() { return nil } } - file_relations_v0_relation_tuples_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_relations_v0_relation_tuples_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*RelationTupleFilter); i { case 0: return &v.state @@ -719,7 +721,7 @@ func file_relations_v0_relation_tuples_proto_init() { return nil } } - file_relations_v0_relation_tuples_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_relations_v0_relation_tuples_proto_msgTypes[7].Exporter = func(v any, i int) any { switch v := v.(*SubjectFilter); i { case 0: return &v.state @@ -732,9 +734,9 @@ func file_relations_v0_relation_tuples_proto_init() { } } } - file_relations_v0_relation_tuples_proto_msgTypes[2].OneofWrappers = []interface{}{} - file_relations_v0_relation_tuples_proto_msgTypes[6].OneofWrappers = []interface{}{} - file_relations_v0_relation_tuples_proto_msgTypes[7].OneofWrappers = []interface{}{} + file_relations_v0_relation_tuples_proto_msgTypes[2].OneofWrappers = []any{} + file_relations_v0_relation_tuples_proto_msgTypes[6].OneofWrappers = []any{} + file_relations_v0_relation_tuples_proto_msgTypes[7].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/api/relations/v0/relation_tuples.proto b/api/relations/v0/relation_tuples.proto index 1ffc439..7335132 100644 --- a/api/relations/v0/relation_tuples.proto +++ b/api/relations/v0/relation_tuples.proto @@ -5,7 +5,7 @@ package kessel.relations.v0; import "google/api/annotations.proto"; import "relations/v0/common.proto"; -option go_package = "ciam-rebac/api/relations/v0;v0"; +option go_package = "github.com/project-kessel/relations-api/api/relations/v0"; option java_multiple_files = true; option java_package = "org.project_kessel.api.relations.v0"; diff --git a/api/relations/v0/relation_tuples_grpc.pb.go b/api/relations/v0/relation_tuples_grpc.pb.go index d315d84..1444be8 100644 --- a/api/relations/v0/relation_tuples_grpc.pb.go +++ b/api/relations/v0/relation_tuples_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.4.0 -// - protoc v5.27.0 +// - protoc v5.26.1 // source: relations/v0/relation_tuples.proto package v0 diff --git a/api/relations/v0/relation_tuples_http.pb.go b/api/relations/v0/relation_tuples_http.pb.go index 0d1f8c0..aae8fb3 100644 --- a/api/relations/v0/relation_tuples_http.pb.go +++ b/api/relations/v0/relation_tuples_http.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-http. DO NOT EDIT. // versions: // - protoc-gen-go-http v2.7.3 -// - protoc v5.27.0 +// - protoc v5.26.1 // source: relations/v0/relation_tuples.proto package v0 diff --git a/cmd/ciam-rebac/main.go b/cmd/kessel-relations/main.go similarity index 97% rename from cmd/ciam-rebac/main.go rename to cmd/kessel-relations/main.go index 0fe6127..c8b076c 100644 --- a/cmd/ciam-rebac/main.go +++ b/cmd/kessel-relations/main.go @@ -5,7 +5,7 @@ import ( "github.com/go-kratos/kratos/v2/config/env" "os" - "ciam-rebac/internal/conf" + "github.com/project-kessel/relations-api/internal/conf" "github.com/go-kratos/kratos/v2" "github.com/go-kratos/kratos/v2/config" diff --git a/cmd/ciam-rebac/wire.go b/cmd/kessel-relations/wire.go similarity index 61% rename from cmd/ciam-rebac/wire.go rename to cmd/kessel-relations/wire.go index 511f816..99344f5 100644 --- a/cmd/ciam-rebac/wire.go +++ b/cmd/kessel-relations/wire.go @@ -6,11 +6,11 @@ package main import ( - "ciam-rebac/internal/biz" - "ciam-rebac/internal/conf" - "ciam-rebac/internal/data" - "ciam-rebac/internal/server" - "ciam-rebac/internal/service" + "github.com/project-kessel/relations-api/internal/biz" + "github.com/project-kessel/relations-api/internal/conf" + "github.com/project-kessel/relations-api/internal/data" + "github.com/project-kessel/relations-api/internal/server" + "github.com/project-kessel/relations-api/internal/service" "github.com/go-kratos/kratos/v2" "github.com/go-kratos/kratos/v2/log" diff --git a/cmd/ciam-rebac/wire_gen.go b/cmd/kessel-relations/wire_gen.go similarity index 85% rename from cmd/ciam-rebac/wire_gen.go rename to cmd/kessel-relations/wire_gen.go index 314dbdf..4d0bb17 100644 --- a/cmd/ciam-rebac/wire_gen.go +++ b/cmd/kessel-relations/wire_gen.go @@ -7,13 +7,13 @@ package main import ( - "ciam-rebac/internal/biz" - "ciam-rebac/internal/conf" - "ciam-rebac/internal/data" - "ciam-rebac/internal/server" - "ciam-rebac/internal/service" "github.com/go-kratos/kratos/v2" "github.com/go-kratos/kratos/v2/log" + "github.com/project-kessel/relations-api/internal/biz" + "github.com/project-kessel/relations-api/internal/conf" + "github.com/project-kessel/relations-api/internal/data" + "github.com/project-kessel/relations-api/internal/server" + "github.com/project-kessel/relations-api/internal/service" ) import ( diff --git a/docker-compose.yaml b/docker-compose.yaml index 37bbcb6..f326a26 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,5 +1,5 @@ services: - rebac: + relations-api: image: "quay.io/cloudservices/kessel-relations:latest" environment: - "SPICEDB_PRESHARED=${SPICEDB_GRPC_PRESHARED_KEY}" @@ -7,7 +7,7 @@ services: - "SPICEDB_ENDPOINT=spicedb:50051" build: dockerfile: Dockerfile - profiles: ["rebac"] + profiles: ["relations-api"] secrets: - spicedb_pre_shared restart: "always" diff --git a/go.mod b/go.mod index 4b9ba1d..f29b4c1 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module ciam-rebac +module github.com/project-kessel/relations-api go 1.21 diff --git a/internal/biz/lookup.go b/internal/biz/lookup.go index ea4b050..3a25eb0 100644 --- a/internal/biz/lookup.go +++ b/internal/biz/lookup.go @@ -1,8 +1,8 @@ package biz import ( - v0 "ciam-rebac/api/relations/v0" "context" + v0 "github.com/project-kessel/relations-api/api/relations/v0" "github.com/go-kratos/kratos/v2/errors" "github.com/go-kratos/kratos/v2/log" diff --git a/internal/biz/relationships.go b/internal/biz/relationships.go index c28ae62..96c3f4d 100644 --- a/internal/biz/relationships.go +++ b/internal/biz/relationships.go @@ -1,8 +1,8 @@ package biz import ( - v0 "ciam-rebac/api/relations/v0" "context" + v0 "github.com/project-kessel/relations-api/api/relations/v0" "github.com/go-kratos/kratos/v2/log" ) diff --git a/internal/conf/conf.pb.go b/internal/conf/conf.pb.go index cb50b86..baaa9d5 100644 --- a/internal/conf/conf.pb.go +++ b/internal/conf/conf.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.1 -// protoc v5.27.0 +// protoc-gen-go v1.34.2 +// protoc v5.26.1 // source: conf/conf.proto package conf @@ -428,10 +428,11 @@ var file_conf_conf_proto_rawDesc = []byte{ 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x46, 0x69, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, - 0x6f, 0x6b, 0x65, 0x6e, 0x46, 0x69, 0x6c, 0x65, 0x42, 0x1f, 0x5a, 0x1d, 0x63, 0x69, 0x61, 0x6d, - 0x2d, 0x72, 0x65, 0x62, 0x61, 0x63, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, - 0x63, 0x6f, 0x6e, 0x66, 0x3b, 0x63, 0x6f, 0x6e, 0x66, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x6f, 0x6b, 0x65, 0x6e, 0x46, 0x69, 0x6c, 0x65, 0x42, 0x3c, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x6b, + 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2d, + 0x61, 0x70, 0x69, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x63, 0x6f, 0x6e, + 0x66, 0x3b, 0x63, 0x6f, 0x6e, 0x66, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -447,7 +448,7 @@ func file_conf_conf_proto_rawDescGZIP() []byte { } var file_conf_conf_proto_msgTypes = make([]protoimpl.MessageInfo, 6) -var file_conf_conf_proto_goTypes = []interface{}{ +var file_conf_conf_proto_goTypes = []any{ (*Bootstrap)(nil), // 0: kratos.api.Bootstrap (*Server)(nil), // 1: kratos.api.Server (*Data)(nil), // 2: kratos.api.Data @@ -477,7 +478,7 @@ func file_conf_conf_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_conf_conf_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_conf_conf_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Bootstrap); i { case 0: return &v.state @@ -489,7 +490,7 @@ func file_conf_conf_proto_init() { return nil } } - file_conf_conf_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_conf_conf_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*Server); i { case 0: return &v.state @@ -501,7 +502,7 @@ func file_conf_conf_proto_init() { return nil } } - file_conf_conf_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_conf_conf_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*Data); i { case 0: return &v.state @@ -513,7 +514,7 @@ func file_conf_conf_proto_init() { return nil } } - file_conf_conf_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_conf_conf_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*Server_HTTP); i { case 0: return &v.state @@ -525,7 +526,7 @@ func file_conf_conf_proto_init() { return nil } } - file_conf_conf_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_conf_conf_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*Server_GRPC); i { case 0: return &v.state @@ -537,7 +538,7 @@ func file_conf_conf_proto_init() { return nil } } - file_conf_conf_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_conf_conf_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*Data_SpiceDb); i { case 0: return &v.state diff --git a/internal/conf/conf.proto b/internal/conf/conf.proto index 4de1944..75fd4ed 100644 --- a/internal/conf/conf.proto +++ b/internal/conf/conf.proto @@ -1,7 +1,7 @@ syntax = "proto3"; package kratos.api; -option go_package = "ciam-rebac/internal/conf;conf"; +option go_package = "github.com/project-kessel/relations-api/internal/conf;conf"; import "google/protobuf/duration.proto"; diff --git a/internal/data/LocalSpiceDbContainer.go b/internal/data/LocalSpiceDbContainer.go index c927224..1b132aa 100644 --- a/internal/data/LocalSpiceDbContainer.go +++ b/internal/data/LocalSpiceDbContainer.go @@ -1,7 +1,6 @@ package data import ( - "ciam-rebac/internal/conf" "context" "crypto/rand" "encoding/base64" @@ -9,6 +8,7 @@ import ( "fmt" "github.com/authzed/authzed-go/v1" "github.com/go-kratos/kratos/v2/log" + "github.com/project-kessel/relations-api/internal/conf" "io" "os" "path" @@ -147,7 +147,7 @@ func (l *LocalSpiceDbContainer) CreateSpiceDbRepository() (*SpiceDbRepository, e return nil, err } - tmpDir, err := os.MkdirTemp("", "rebac") + tmpDir, err := os.MkdirTemp("", "relations-api") if err != nil { return nil, err } diff --git a/internal/data/data.go b/internal/data/data.go index b5f8cff..ad729e0 100644 --- a/internal/data/data.go +++ b/internal/data/data.go @@ -1,8 +1,8 @@ package data import ( - "ciam-rebac/internal/biz" "github.com/google/wire" + "github.com/project-kessel/relations-api/internal/biz" ) // ProviderSet is data providers. diff --git a/internal/data/spicedb.go b/internal/data/spicedb.go index 444c522..0e96805 100644 --- a/internal/data/spicedb.go +++ b/internal/data/spicedb.go @@ -1,12 +1,12 @@ package data import ( - apiV0 "ciam-rebac/api/relations/v0" - "ciam-rebac/internal/biz" - "ciam-rebac/internal/conf" "context" "errors" "fmt" + apiV0 "github.com/project-kessel/relations-api/api/relations/v0" + "github.com/project-kessel/relations-api/internal/biz" + "github.com/project-kessel/relations-api/internal/conf" "io" "os" "strings" diff --git a/internal/data/spicedb_test.go b/internal/data/spicedb_test.go index 327d505..1c4a243 100644 --- a/internal/data/spicedb_test.go +++ b/internal/data/spicedb_test.go @@ -1,10 +1,10 @@ package data import ( - apiV0 "ciam-rebac/api/relations/v0" - "ciam-rebac/internal/biz" "context" "fmt" + apiV0 "github.com/project-kessel/relations-api/api/relations/v0" + "github.com/project-kessel/relations-api/internal/biz" "os" "testing" diff --git a/internal/server/grpc.go b/internal/server/grpc.go index 678848c..a4fba68 100644 --- a/internal/server/grpc.go +++ b/internal/server/grpc.go @@ -1,10 +1,10 @@ package server import ( - h "ciam-rebac/api/health/v1" - v0 "ciam-rebac/api/relations/v0" - "ciam-rebac/internal/conf" - "ciam-rebac/internal/service" + h "github.com/project-kessel/relations-api/api/health/v1" + v0 "github.com/project-kessel/relations-api/api/relations/v0" + "github.com/project-kessel/relations-api/internal/conf" + "github.com/project-kessel/relations-api/internal/service" "github.com/go-kratos/kratos/v2/log" "github.com/go-kratos/kratos/v2/middleware/recovery" diff --git a/internal/server/http.go b/internal/server/http.go index 37b3034..b63746d 100644 --- a/internal/server/http.go +++ b/internal/server/http.go @@ -1,10 +1,10 @@ package server import ( - h "ciam-rebac/api/health/v1" - v0 "ciam-rebac/api/relations/v0" - "ciam-rebac/internal/conf" - "ciam-rebac/internal/service" + h "github.com/project-kessel/relations-api/api/health/v1" + v0 "github.com/project-kessel/relations-api/api/relations/v0" + "github.com/project-kessel/relations-api/internal/conf" + "github.com/project-kessel/relations-api/internal/service" "github.com/go-kratos/kratos/v2/log" "github.com/go-kratos/kratos/v2/middleware/recovery" diff --git a/internal/service/check.go b/internal/service/check.go index 57dba7b..bb0dd79 100644 --- a/internal/service/check.go +++ b/internal/service/check.go @@ -1,12 +1,12 @@ package service import ( - "ciam-rebac/internal/biz" "context" + "github.com/project-kessel/relations-api/internal/biz" "github.com/go-kratos/kratos/v2/log" - pb "ciam-rebac/api/relations/v0" + pb "github.com/project-kessel/relations-api/api/relations/v0" ) type CheckService struct { diff --git a/internal/service/health.go b/internal/service/health.go index 39f8158..3993e85 100644 --- a/internal/service/health.go +++ b/internal/service/health.go @@ -3,7 +3,7 @@ package service import ( "context" - pb "ciam-rebac/api/health/v1" + pb "github.com/project-kessel/relations-api/api/health/v1" ) type HealthService struct { diff --git a/internal/service/lookup.go b/internal/service/lookup.go index 93c74df..05895d8 100644 --- a/internal/service/lookup.go +++ b/internal/service/lookup.go @@ -1,8 +1,8 @@ package service import ( - pb "ciam-rebac/api/relations/v0" - "ciam-rebac/internal/biz" + pb "github.com/project-kessel/relations-api/api/relations/v0" + "github.com/project-kessel/relations-api/internal/biz" ) type LookupService struct { diff --git a/internal/service/lookup_test.go b/internal/service/lookup_test.go index e0b92cd..32fd19c 100644 --- a/internal/service/lookup_test.go +++ b/internal/service/lookup_test.go @@ -1,10 +1,10 @@ package service import ( - v0 "ciam-rebac/api/relations/v0" - "ciam-rebac/internal/biz" - "ciam-rebac/internal/data" "context" + v0 "github.com/project-kessel/relations-api/api/relations/v0" + "github.com/project-kessel/relations-api/internal/biz" + "github.com/project-kessel/relations-api/internal/data" "os" "testing" diff --git a/internal/service/relationships.go b/internal/service/relationships.go index 997a520..4557d74 100644 --- a/internal/service/relationships.go +++ b/internal/service/relationships.go @@ -1,12 +1,12 @@ package service import ( - "ciam-rebac/internal/biz" "context" + "github.com/project-kessel/relations-api/internal/biz" "github.com/go-kratos/kratos/v2/log" - pb "ciam-rebac/api/relations/v0" + pb "github.com/project-kessel/relations-api/api/relations/v0" ) type RelationshipsService struct { diff --git a/internal/service/relationships_test.go b/internal/service/relationships_test.go index 1f3588e..98b905d 100644 --- a/internal/service/relationships_test.go +++ b/internal/service/relationships_test.go @@ -1,11 +1,11 @@ package service import ( - v0 "ciam-rebac/api/relations/v0" - "ciam-rebac/internal/biz" - "ciam-rebac/internal/data" "context" "fmt" + v0 "github.com/project-kessel/relations-api/api/relations/v0" + "github.com/project-kessel/relations-api/internal/biz" + "github.com/project-kessel/relations-api/internal/data" "os" "testing" diff --git a/spicedb-kind-setup/rebac/deployment.yaml b/spicedb-kind-setup/relations-api/deployment.yaml similarity index 100% rename from spicedb-kind-setup/rebac/deployment.yaml rename to spicedb-kind-setup/relations-api/deployment.yaml diff --git a/spicedb-kind-setup/rebac/secret.yaml b/spicedb-kind-setup/relations-api/secret.yaml similarity index 100% rename from spicedb-kind-setup/rebac/secret.yaml rename to spicedb-kind-setup/relations-api/secret.yaml diff --git a/spicedb-kind-setup/rebac/svc.yaml b/spicedb-kind-setup/relations-api/svc.yaml similarity index 100% rename from spicedb-kind-setup/rebac/svc.yaml rename to spicedb-kind-setup/relations-api/svc.yaml diff --git a/spicedb-kind-setup/setup.sh b/spicedb-kind-setup/setup.sh index cca5da7..d2f5e25 100755 --- a/spicedb-kind-setup/setup.sh +++ b/spicedb-kind-setup/setup.sh @@ -53,10 +53,10 @@ done echo "spicedb is ready" kubectl get ingresses.networking.k8s.io -n spicedb -echo "Deploying rebac service" -kubectl apply -f ./spicedb-kind-setup/rebac/secret.yaml -n spicedb -kubectl apply -f ./spicedb-kind-setup/rebac/deployment.yaml -n spicedb -kubectl apply -f ./spicedb-kind-setup/rebac/svc.yaml -n spicedb +echo "Deploying relations-api service" +kubectl apply -f ./spicedb-kind-setup/relations-api/secret.yaml -n spicedb +kubectl apply -f ./spicedb-kind-setup/relations-api/deployment.yaml -n spicedb +kubectl apply -f ./spicedb-kind-setup/relations-api/svc.yaml -n spicedb while [[ -z $(kubectl get deployments.apps -n spicedb relationships -o jsonpath="{.status.readyReplicas}" 2>/dev/null) ]]; do echo "still waiting for relationships" diff --git a/spicedb/start-insights-rebac.sh b/spicedb/start-relations-api.sh similarity index 50% rename from spicedb/start-insights-rebac.sh rename to spicedb/start-relations-api.sh index 5ccaef3..cc80d3b 100755 --- a/spicedb/start-insights-rebac.sh +++ b/spicedb/start-relations-api.sh @@ -3,4 +3,4 @@ set -e # Function to check if a command is available source ./spicedb/check_docker_podman.sh -${DOCKER} compose --env-file ./spicedb/.env --profile rebac -f ./docker-compose.yaml up -d --build \ No newline at end of file +${DOCKER} compose --env-file ./spicedb/.env --profile relations-api -f ./docker-compose.yaml up -d --build \ No newline at end of file diff --git a/spicedb/teardownrebac.sh b/spicedb/stop-relations-api.sh similarity index 52% rename from spicedb/teardownrebac.sh rename to spicedb/stop-relations-api.sh index 157a754..c00d17a 100755 --- a/spicedb/teardownrebac.sh +++ b/spicedb/stop-relations-api.sh @@ -2,4 +2,4 @@ set -e # Function to check if a command is available source ./spicedb/check_docker_podman.sh -${DOCKER} compose --env-file ./spicedb/.env --profile rebac -f docker-compose.yaml down \ No newline at end of file +${DOCKER} compose --env-file ./spicedb/.env --profile relations-api -f docker-compose.yaml down \ No newline at end of file