diff --git a/internal/hermes-api/service/identity.go b/internal/hermes-api/service/identity.go index 9d8deff7..97107aba 100644 --- a/internal/hermes-api/service/identity.go +++ b/internal/hermes-api/service/identity.go @@ -13,7 +13,6 @@ import ( "strings" "time" - "github.com/ownmfa/hermes/api/go/message" ikey "github.com/ownmfa/hermes/internal/hermes-api/key" "github.com/ownmfa/hermes/internal/hermes-api/session" "github.com/ownmfa/hermes/pkg/consterr" @@ -21,6 +20,7 @@ import ( "github.com/ownmfa/hermes/pkg/key" "github.com/ownmfa/hermes/pkg/metric" "github.com/ownmfa/hermes/pkg/oath" + "github.com/ownmfa/hermes/proto/go/message" "github.com/ownmfa/proto/go/api" "google.golang.org/grpc" "google.golang.org/grpc/codes" diff --git a/internal/hermes-api/service/identity_test.go b/internal/hermes-api/service/identity_test.go index 4fb2bde0..6d66e8be 100644 --- a/internal/hermes-api/service/identity_test.go +++ b/internal/hermes-api/service/identity_test.go @@ -12,7 +12,6 @@ import ( "time" "github.com/google/uuid" - "github.com/ownmfa/hermes/api/go/message" ikey "github.com/ownmfa/hermes/internal/hermes-api/key" "github.com/ownmfa/hermes/internal/hermes-api/session" "github.com/ownmfa/hermes/pkg/cache" @@ -22,6 +21,7 @@ import ( "github.com/ownmfa/hermes/pkg/oath" "github.com/ownmfa/hermes/pkg/queue" "github.com/ownmfa/hermes/pkg/test/random" + "github.com/ownmfa/hermes/proto/go/message" "github.com/ownmfa/proto/go/api" "github.com/stretchr/testify/require" "go.uber.org/mock/gomock" diff --git a/internal/hermes-api/session/page_token.go b/internal/hermes-api/session/page_token.go index 926ce21f..16d00df9 100644 --- a/internal/hermes-api/session/page_token.go +++ b/internal/hermes-api/session/page_token.go @@ -5,7 +5,7 @@ import ( "time" "github.com/google/uuid" - "github.com/ownmfa/hermes/api/go/token" + "github.com/ownmfa/hermes/proto/go/token" "google.golang.org/protobuf/proto" "google.golang.org/protobuf/types/known/timestamppb" ) diff --git a/internal/hermes-api/session/page_token_test.go b/internal/hermes-api/session/page_token_test.go index c0a171f1..a2f1e4e2 100644 --- a/internal/hermes-api/session/page_token_test.go +++ b/internal/hermes-api/session/page_token_test.go @@ -9,8 +9,8 @@ import ( "time" "github.com/google/uuid" - "github.com/ownmfa/hermes/api/go/token" "github.com/ownmfa/hermes/pkg/test/random" + "github.com/ownmfa/hermes/proto/go/token" "github.com/stretchr/testify/require" "google.golang.org/protobuf/proto" "google.golang.org/protobuf/types/known/timestamppb" diff --git a/internal/hermes-api/session/web_token.go b/internal/hermes-api/session/web_token.go index 6811cf19..0fa94f7b 100644 --- a/internal/hermes-api/session/web_token.go +++ b/internal/hermes-api/session/web_token.go @@ -5,9 +5,9 @@ import ( "time" "github.com/google/uuid" - "github.com/ownmfa/hermes/api/go/token" "github.com/ownmfa/hermes/pkg/consterr" "github.com/ownmfa/hermes/pkg/crypto" + "github.com/ownmfa/hermes/proto/go/token" "github.com/ownmfa/proto/go/api" "google.golang.org/protobuf/proto" "google.golang.org/protobuf/types/known/timestamppb" diff --git a/internal/hermes-api/session/web_token_test.go b/internal/hermes-api/session/web_token_test.go index 0ef6b480..e3c10166 100644 --- a/internal/hermes-api/session/web_token_test.go +++ b/internal/hermes-api/session/web_token_test.go @@ -10,9 +10,9 @@ import ( "time" "github.com/google/uuid" - "github.com/ownmfa/hermes/api/go/token" "github.com/ownmfa/hermes/pkg/crypto" "github.com/ownmfa/hermes/pkg/test/random" + "github.com/ownmfa/hermes/proto/go/token" "github.com/ownmfa/proto/go/api" "github.com/stretchr/testify/require" "google.golang.org/protobuf/proto" diff --git a/internal/hermes-api/test/identity_test.go b/internal/hermes-api/test/identity_test.go index 94516aeb..7179dc55 100644 --- a/internal/hermes-api/test/identity_test.go +++ b/internal/hermes-api/test/identity_test.go @@ -12,11 +12,11 @@ import ( "time" "github.com/google/uuid" - "github.com/ownmfa/hermes/api/go/message" ikey "github.com/ownmfa/hermes/internal/hermes-api/key" "github.com/ownmfa/hermes/pkg/key" "github.com/ownmfa/hermes/pkg/oath" "github.com/ownmfa/hermes/pkg/test/random" + "github.com/ownmfa/hermes/proto/go/message" "github.com/ownmfa/proto/go/api" "github.com/stretchr/testify/require" "google.golang.org/protobuf/proto" diff --git a/internal/hermes-notifier/notifier/notify.go b/internal/hermes-notifier/notifier/notify.go index 61814fc1..213bb23d 100644 --- a/internal/hermes-notifier/notifier/notify.go +++ b/internal/hermes-notifier/notifier/notify.go @@ -6,12 +6,12 @@ import ( "time" "github.com/google/uuid" - "github.com/ownmfa/hermes/api/go/message" "github.com/ownmfa/hermes/internal/hermes-notifier/template" "github.com/ownmfa/hermes/pkg/hlog" "github.com/ownmfa/hermes/pkg/key" "github.com/ownmfa/hermes/pkg/metric" "github.com/ownmfa/hermes/pkg/queue" + "github.com/ownmfa/hermes/proto/go/message" "github.com/ownmfa/proto/go/api" "google.golang.org/protobuf/proto" ) diff --git a/internal/hermes-notifier/notifier/notify_test.go b/internal/hermes-notifier/notifier/notify_test.go index 6f84626f..78dee7b9 100644 --- a/internal/hermes-notifier/notifier/notify_test.go +++ b/internal/hermes-notifier/notifier/notify_test.go @@ -11,7 +11,6 @@ import ( "time" "github.com/google/uuid" - "github.com/ownmfa/hermes/api/go/message" "github.com/ownmfa/hermes/pkg/cache" "github.com/ownmfa/hermes/pkg/consterr" "github.com/ownmfa/hermes/pkg/key" @@ -19,6 +18,7 @@ import ( "github.com/ownmfa/hermes/pkg/oath" "github.com/ownmfa/hermes/pkg/queue" "github.com/ownmfa/hermes/pkg/test/random" + "github.com/ownmfa/hermes/proto/go/message" "github.com/ownmfa/proto/go/api" "github.com/stretchr/testify/require" "go.uber.org/mock/gomock" diff --git a/internal/hermes-notifier/test/notifier_test.go b/internal/hermes-notifier/test/notifier_test.go index 7f823abb..7ef66606 100644 --- a/internal/hermes-notifier/test/notifier_test.go +++ b/internal/hermes-notifier/test/notifier_test.go @@ -9,9 +9,9 @@ import ( "time" "github.com/google/uuid" - "github.com/ownmfa/hermes/api/go/message" "github.com/ownmfa/hermes/pkg/key" "github.com/ownmfa/hermes/pkg/test/random" + "github.com/ownmfa/hermes/proto/go/message" "github.com/ownmfa/proto/go/api" "github.com/stretchr/testify/require" "google.golang.org/protobuf/proto" diff --git a/pkg/test/matcher/mock_protoer_test.go b/pkg/test/matcher/mock_protoer_test.go index 1cafa41d..ff8f41f0 100644 --- a/pkg/test/matcher/mock_protoer_test.go +++ b/pkg/test/matcher/mock_protoer_test.go @@ -11,7 +11,7 @@ package matcher import ( reflect "reflect" - token "github.com/ownmfa/hermes/api/go/token" + token "github.com/ownmfa/hermes/proto/go/token" gomock "go.uber.org/mock/gomock" ) diff --git a/pkg/test/matcher/proto_test.go b/pkg/test/matcher/proto_test.go index 695c4413..6e3bc052 100644 --- a/pkg/test/matcher/proto_test.go +++ b/pkg/test/matcher/proto_test.go @@ -7,7 +7,7 @@ package matcher import ( "testing" - "github.com/ownmfa/hermes/api/go/token" + "github.com/ownmfa/hermes/proto/go/token" "github.com/stretchr/testify/require" "go.uber.org/mock/gomock" ) diff --git a/api/Makefile b/proto/Makefile similarity index 100% rename from api/Makefile rename to proto/Makefile diff --git a/api/README.md b/proto/README.md similarity index 87% rename from api/README.md rename to proto/README.md index 96ca1ea6..ec7ca64b 100644 --- a/api/README.md +++ b/proto/README.md @@ -1,4 +1,4 @@ -# API (Internal) +# Proto (Internal) This directory contains the [Protobuf](https://developers.google.com/protocol-buffers/) internal definitions @@ -10,7 +10,7 @@ based on the Google [API Design Guide](https://cloud.google.com/apis/design). ### Go ``` -import "github.com/ownmfa/hermes/api/go/token" +import "github.com/ownmfa/hermes/proto/go/token" ``` ## Building diff --git a/api/docker-compose.yml b/proto/docker-compose.yml similarity index 100% rename from api/docker-compose.yml rename to proto/docker-compose.yml diff --git a/api/go/Dockerfile b/proto/go/Dockerfile similarity index 100% rename from api/go/Dockerfile rename to proto/go/Dockerfile diff --git a/api/go/Makefile b/proto/go/Makefile similarity index 100% rename from api/go/Makefile rename to proto/go/Makefile diff --git a/api/go/message/doc.go b/proto/go/message/doc.go similarity index 100% rename from api/go/message/doc.go rename to proto/go/message/doc.go diff --git a/api/go/message/ownmfa_notifier_in.pb.go b/proto/go/message/ownmfa_notifier_in.pb.go similarity index 96% rename from api/go/message/ownmfa_notifier_in.pb.go rename to proto/go/message/ownmfa_notifier_in.pb.go index 64a57437..3df943b9 100644 --- a/api/go/message/ownmfa_notifier_in.pb.go +++ b/proto/go/message/ownmfa_notifier_in.pb.go @@ -109,11 +109,11 @@ var file_message_ownmfa_notifier_in_proto_rawDesc = []byte{ 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x74, 0x72, 0x61, 0x63, 0x65, 0x49, 0x64, 0x42, 0x29, - 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x77, 0x6e, - 0x6d, 0x66, 0x61, 0x2f, 0x68, 0x65, 0x72, 0x6d, 0x65, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, - 0x6f, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x74, 0x72, 0x61, 0x63, 0x65, 0x49, 0x64, 0x42, 0x2b, + 0x5a, 0x29, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x77, 0x6e, + 0x6d, 0x66, 0x61, 0x2f, 0x68, 0x65, 0x72, 0x6d, 0x65, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2f, 0x67, 0x6f, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( diff --git a/api/go/token/doc.go b/proto/go/token/doc.go similarity index 100% rename from api/go/token/doc.go rename to proto/go/token/doc.go diff --git a/api/go/token/ownmfa_page.pb.go b/proto/go/token/ownmfa_page.pb.go similarity index 96% rename from api/go/token/ownmfa_page.pb.go rename to proto/go/token/ownmfa_page.pb.go index d2471d9f..516667cb 100644 --- a/api/go/token/ownmfa_page.pb.go +++ b/proto/go/token/ownmfa_page.pb.go @@ -92,10 +92,10 @@ var file_token_ownmfa_page_proto_rawDesc = []byte{ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x07, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x54, 0x73, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x72, 0x65, 0x76, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x70, 0x72, - 0x65, 0x76, 0x49, 0x64, 0x42, 0x27, 0x5a, 0x25, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x65, 0x76, 0x49, 0x64, 0x42, 0x29, 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x77, 0x6e, 0x6d, 0x66, 0x61, 0x2f, 0x68, 0x65, 0x72, 0x6d, 0x65, 0x73, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x6f, 0x2f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/go/token/ownmfa_web.pb.go b/proto/go/token/ownmfa_web.pb.go similarity index 97% rename from api/go/token/ownmfa_web.pb.go rename to proto/go/token/ownmfa_web.pb.go index a14f893e..2a11b2e6 100644 --- a/api/go/token/ownmfa_web.pb.go +++ b/proto/go/token/ownmfa_web.pb.go @@ -156,10 +156,10 @@ var file_token_ownmfa_web_proto_rawDesc = []byte{ 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x41, 0x74, 0x42, 0x0a, 0x0a, 0x08, 0x69, 0x64, 0x5f, 0x6f, 0x6e, 0x65, - 0x6f, 0x66, 0x42, 0x27, 0x5a, 0x25, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x6f, 0x77, 0x6e, 0x6d, 0x66, 0x61, 0x2f, 0x68, 0x65, 0x72, 0x6d, 0x65, 0x73, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x67, 0x6f, 0x2f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x6f, 0x66, 0x42, 0x29, 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x6f, 0x77, 0x6e, 0x6d, 0x66, 0x61, 0x2f, 0x68, 0x65, 0x72, 0x6d, 0x65, 0x73, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/protobuf/message/ownmfa_notifier_in.proto b/proto/protobuf/message/ownmfa_notifier_in.proto similarity index 84% rename from api/protobuf/message/ownmfa_notifier_in.proto rename to proto/protobuf/message/ownmfa_notifier_in.proto index 160cf622..6e04006c 100644 --- a/api/protobuf/message/ownmfa_notifier_in.proto +++ b/proto/protobuf/message/ownmfa_notifier_in.proto @@ -1,7 +1,7 @@ syntax = "proto3"; package ownmfa.int.message; -option go_package = "github.com/ownmfa/hermes/api/go/message"; +option go_package = "github.com/ownmfa/hermes/proto/go/message"; // NotifierIn represents notification metadata as used in message queues. message NotifierIn { diff --git a/api/protobuf/token/ownmfa_page.proto b/proto/protobuf/token/ownmfa_page.proto similarity index 87% rename from api/protobuf/token/ownmfa_page.proto rename to proto/protobuf/token/ownmfa_page.proto index ce230739..d69b0834 100644 --- a/api/protobuf/token/ownmfa_page.proto +++ b/proto/protobuf/token/ownmfa_page.proto @@ -3,7 +3,7 @@ package ownmfa.int.token; import "google/protobuf/timestamp.proto"; -option go_package = "github.com/ownmfa/hermes/api/go/token"; +option go_package = "github.com/ownmfa/hermes/proto/go/token"; // Page represents a pagination token. message Page { diff --git a/api/protobuf/token/ownmfa_web.proto b/proto/protobuf/token/ownmfa_web.proto similarity index 91% rename from api/protobuf/token/ownmfa_web.proto rename to proto/protobuf/token/ownmfa_web.proto index cc1480ce..4c6ecb2e 100644 --- a/api/protobuf/token/ownmfa_web.proto +++ b/proto/protobuf/token/ownmfa_web.proto @@ -4,7 +4,7 @@ package ownmfa.int.token; import "api/ownmfa_role.proto"; import "google/protobuf/timestamp.proto"; -option go_package = "github.com/ownmfa/hermes/api/go/token"; +option go_package = "github.com/ownmfa/hermes/proto/go/token"; // Web represents a web or API key token. message Web {