diff --git a/cmd/main.go b/cmd/main.go index 7af7d88..f472e75 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -12,25 +12,11 @@ import ( "github.com/isd-sgcu/rpkm66-gateway/cfgldr" _ "github.com/isd-sgcu/rpkm66-gateway/docs" - authHdr "github.com/isd-sgcu/rpkm66-gateway/internal/handler/auth" - baanHdr "github.com/isd-sgcu/rpkm66-gateway/internal/handler/baan" - ciHdr "github.com/isd-sgcu/rpkm66-gateway/internal/handler/checkin" - eHdr "github.com/isd-sgcu/rpkm66-gateway/internal/handler/estamp" - fileHdr "github.com/isd-sgcu/rpkm66-gateway/internal/handler/file" - grpHdr "github.com/isd-sgcu/rpkm66-gateway/internal/handler/group" health_check "github.com/isd-sgcu/rpkm66-gateway/internal/handler/health-check" - usrHdr "github.com/isd-sgcu/rpkm66-gateway/internal/handler/user" guard "github.com/isd-sgcu/rpkm66-gateway/internal/middleware/auth" "github.com/isd-sgcu/rpkm66-gateway/internal/router" authSrv "github.com/isd-sgcu/rpkm66-gateway/internal/service/auth" - baanSrv "github.com/isd-sgcu/rpkm66-gateway/internal/service/baan" - ciSrv "github.com/isd-sgcu/rpkm66-gateway/internal/service/checkin" - eSrv "github.com/isd-sgcu/rpkm66-gateway/internal/service/estamp" - fileSrv "github.com/isd-sgcu/rpkm66-gateway/internal/service/file" - grpSrv "github.com/isd-sgcu/rpkm66-gateway/internal/service/group" - usrSrv "github.com/isd-sgcu/rpkm66-gateway/internal/service/user" - "github.com/isd-sgcu/rpkm66-gateway/internal/validator" - "github.com/isd-sgcu/rpkm66-gateway/proto" + proto "github.com/isd-sgcu/rpkm66-go-proto/rpkm66/auth/auth/v1" "github.com/rs/zerolog/log" "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" @@ -85,21 +71,21 @@ func main() { Msg("Failed to start service") } - v, err := validator.NewValidator() - if err != nil { - log.Fatal(). - Err(err). - Str("service", "validator"). - Msg("Failed to start service") - } - - backendConn, err := grpc.Dial(conf.Service.Backend, grpc.WithTransportCredentials(insecure.NewCredentials())) - if err != nil { - log.Fatal(). - Err(err). - Str("service", "rnkm-backend"). - Msg("Cannot connect to service") - } + // v, err := validator.NewValidator() + // if err != nil { + // log.Fatal(). + // Err(err). + // Str("service", "validator"). + // Msg("Failed to start service") + // } + + // backendConn, err := grpc.Dial(conf.Service.Backend, grpc.WithTransportCredentials(insecure.NewCredentials())) + // if err != nil { + // log.Fatal(). + // Err(err). + // Str("service", "rnkm-backend"). + // Msg("Cannot connect to service") + // } authConn, err := grpc.Dial(conf.Service.Auth, grpc.WithTransportCredentials(insecure.NewCredentials())) if err != nil { @@ -109,74 +95,74 @@ func main() { Msg("Cannot connect to service") } - fileConn, err := grpc.Dial(conf.Service.File, grpc.WithTransportCredentials(insecure.NewCredentials())) - if err != nil { - log.Fatal(). - Err(err). - Str("service", "rnkm-file"). - Msg("Cannot connect to service") - } + // fileConn, err := grpc.Dial(conf.Service.File, grpc.WithTransportCredentials(insecure.NewCredentials())) + // if err != nil { + // log.Fatal(). + // Err(err). + // Str("service", "rnkm-file"). + // Msg("Cannot connect to service") + // } hc := health_check.NewHandler() - usrClient := proto.NewUserServiceClient(backendConn) - userSrv := usrSrv.NewService(usrClient) - userHdr := usrHdr.NewHandler(userSrv, v) + // usrClient := proto.NewUserServiceClient(backendConn) + // userSrv := usrSrv.NewService(usrClient) + // userHdr := usrHdr.NewHandler(userSrv, v) authClient := proto.NewAuthServiceClient(authConn) athSrv := authSrv.NewService(authClient) - athHdr := authHdr.NewHandler(athSrv, userSrv, v) + // athHdr := authHdr.NewHandler(athSrv, userSrv, v) - fileClient := proto.NewFileServiceClient(fileConn) - fleSrv := fileSrv.NewService(fileClient) - fleHdr := fileHdr.NewHandler(fleSrv, userSrv, conf.App.MaxFileSize) + // fileClient := proto.NewFileServiceClient(fileConn) + // fleSrv := fileSrv.NewService(fileClient) + // fleHdr := fileHdr.NewHandler(fleSrv, userSrv, conf.App.MaxFileSize) - gClient := proto.NewGroupServiceClient(backendConn) - gSrv := grpSrv.NewService(gClient) - gHdr := grpHdr.NewHandler(gSrv, v) + // gClient := proto.NewGroupServiceClient(backendConn) + // gSrv := grpSrv.NewService(gClient) + // gHdr := grpHdr.NewHandler(gSrv, v) - bnClient := proto.NewBaanServiceClient(backendConn) - bnSrv := baanSrv.NewService(bnClient) - bnHdr := baanHdr.NewHandler(bnSrv, userSrv) + // bnClient := proto.NewBaanServiceClient(backendConn) + // bnSrv := baanSrv.NewService(bnClient) + // bnHdr := baanHdr.NewHandler(bnSrv, userSrv) - checkinClient := proto.NewCheckinServiceClient(backendConn) - checkinSrv := ciSrv.NewService(checkinClient) + // checkinClient := proto.NewCheckinServiceClient(backendConn) + // checkinSrv := ciSrv.NewService(checkinClient) - estampClient := proto.NewEventServiceClient(backendConn) - estampSrv := eSrv.NewService(estampClient) - estampHdr := eHdr.NewHandler(estampSrv, v) + // estampClient := proto.NewEventServiceClient(backendConn) + // estampSrv := eSrv.NewService(estampClient) + // estampHdr := eHdr.NewHandler(estampSrv, v) - ciHandler := ciHdr.NewHandler(checkinSrv, v) + // ciHandler := ciHdr.NewHandler(checkinSrv, v) authGuard := guard.NewAuthGuard(athSrv) r := router.NewGinRouter(&authGuard, conf.App) r.SetHandler("GET /", hc.HealthCheck) - r.SetHandler("PUT /user", userHdr.CreateOrUpdate) - r.SetHandler("PATCH /user", userHdr.Update) - r.SetHandler("GET /auth/me", athHdr.Validate) - r.SetHandler("POST /auth/verify", athHdr.VerifyTicket) - r.SetHandler("POST /auth/refreshToken", athHdr.RefreshToken) - r.SetHandler("PUT /file/upload", fleHdr.Upload) - r.SetHandler("GET /baan", bnHdr.FindAll) - r.SetHandler("GET /baan/:id", bnHdr.FindOne) - r.SetHandler("GET /group", gHdr.FindOne) - r.SetHandler("GET /group/:token", gHdr.FindByToken) - r.SetHandler("POST /group/:token", gHdr.Join) - r.SetHandler("DELETE /group/leave", gHdr.Leave) - r.SetHandler("PUT /group/select", gHdr.SelectBaan) - r.SetHandler("DELETE /members/:member_id", gHdr.DeleteMember) - r.SetHandler("POST /qr/checkin/verify", ciHandler.CheckinVerify) - r.SetHandler("POST /qr/checkin/confirm", ciHandler.CheckinConfirm) - r.SetHandler("POST /qr/estamp/verify", estampHdr.VerifyEstamp) - r.SetHandler("POST /qr/estamp/confirm", userHdr.ConfirmEstamp) - r.SetHandler("POST /qr/ticket", userHdr.VerifyTicket) - r.SetHandler("GET /estamp/:id", estampHdr.FindEventByID) - r.SetHandler("GET /estamp", estampHdr.FindAllEventWithType) - r.SetHandler("GET /estamp/user", userHdr.GetUserEstamp) - r.SetHandler("GET /user/:id", userHdr.FindOne) - r.SetHandler("POST /user", userHdr.Create) - r.SetHandler("DELETE /user/:id", userHdr.Delete) + // r.SetHandler("PUT /user", userHdr.CreateOrUpdate) + // r.SetHandler("PATCH /user", userHdr.Update) + // r.SetHandler("GET /auth/me", athHdr.Validate) + // r.SetHandler("POST /auth/verify", athHdr.VerifyTicket) + // r.SetHandler("POST /auth/refreshToken", athHdr.RefreshToken) + // r.SetHandler("PUT /file/upload", fleHdr.Upload) + // r.SetHandler("GET /baan", bnHdr.FindAll) + // r.SetHandler("GET /baan/:id", bnHdr.FindOne) + // r.SetHandler("GET /group", gHdr.FindOne) + // r.SetHandler("GET /group/:token", gHdr.FindByToken) + // r.SetHandler("POST /group/:token", gHdr.Join) + // r.SetHandler("DELETE /group/leave", gHdr.Leave) + // r.SetHandler("PUT /group/select", gHdr.SelectBaan) + // r.SetHandler("DELETE /members/:member_id", gHdr.DeleteMember) + // r.SetHandler("POST /qr/checkin/verify", ciHandler.CheckinVerify) + // r.SetHandler("POST /qr/checkin/confirm", ciHandler.CheckinConfirm) + // r.SetHandler("POST /qr/estamp/verify", estampHdr.VerifyEstamp) + // r.SetHandler("POST /qr/estamp/confirm", userHdr.ConfirmEstamp) + // r.SetHandler("POST /qr/ticket", userHdr.VerifyTicket) + // r.SetHandler("GET /estamp/:id", estampHdr.FindEventByID) + // r.SetHandler("GET /estamp", estampHdr.FindAllEventWithType) + // r.SetHandler("GET /estamp/user", userHdr.GetUserEstamp) + // r.SetHandler("GET /user/:id", userHdr.FindOne) + // r.SetHandler("POST /user", userHdr.Create) + // r.SetHandler("DELETE /user/:id", userHdr.Delete) server := http.Server{ Addr: fmt.Sprintf(":%v", conf.App.Port), diff --git a/go.mod b/go.mod index 52bb5be..7925d23 100644 --- a/go.mod +++ b/go.mod @@ -9,6 +9,7 @@ require ( github.com/go-playground/locales v0.14.1 github.com/go-playground/universal-translator v0.18.1 github.com/google/uuid v1.3.0 + github.com/isd-sgcu/rpkm66-go-proto v0.0.0-20230630055326-ebe9af180145 github.com/pkg/errors v0.9.1 github.com/rs/zerolog v1.29.1 github.com/spf13/viper v1.16.0 diff --git a/go.sum b/go.sum index 89d264c..c9bd8dc 100644 --- a/go.sum +++ b/go.sum @@ -40,6 +40,8 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03 github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/KyleBanks/depth v1.2.1 h1:5h8fQADFrWtarTdtDudMmGsC7GPbOAu6RVB3ffsVFHc= github.com/KyleBanks/depth v1.2.1/go.mod h1:jzSb9d0L43HxTQfT+oSA1EEp2q+ne2uh6XgeJcm8brE= +github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/bxcodec/faker/v3 v3.8.0 h1:F59Qqnsh0BOtZRC+c4cXoB/VNYDMS3R5mlSpxIap1oU= github.com/bxcodec/faker/v3 v3.8.0/go.mod h1:gF31YgnMSMKgkvl+fyEo1xuSMbEuieyqfeslGYFjneM= github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM= @@ -179,6 +181,14 @@ github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/isd-sgcu/rpkm66-go-proto v0.0.0-20230627203936-ae1895fe6157 h1:mLuuY992iH6JFHQa0+ApsY9r/K02ryQzIvFDU7+r/Ic= +github.com/isd-sgcu/rpkm66-go-proto v0.0.0-20230627203936-ae1895fe6157/go.mod h1:eG1p2DVZixBxFze36PEyKFIZEQpfc6ZvYn+dTN6g6jk= +github.com/isd-sgcu/rpkm66-go-proto v0.0.0-20230630031453-328e11ffa092 h1:GtJspUXU0K8pDeWcMNuMiVkzD2QW6e2jhChOT5B+wyQ= +github.com/isd-sgcu/rpkm66-go-proto v0.0.0-20230630031453-328e11ffa092/go.mod h1:qxIb+IJeGg8MHhRfjs69b7/8+ZUfwrMkXBwu0TtfI1Q= +github.com/isd-sgcu/rpkm66-go-proto v0.0.0-20230630035718-638b93cad427 h1:3t+x45SrY/rdsd/Zxu6B4HLNlOMTZb80EVWSFsBOXOI= +github.com/isd-sgcu/rpkm66-go-proto v0.0.0-20230630035718-638b93cad427/go.mod h1:qxIb+IJeGg8MHhRfjs69b7/8+ZUfwrMkXBwu0TtfI1Q= +github.com/isd-sgcu/rpkm66-go-proto v0.0.0-20230630055326-ebe9af180145 h1:46wil4nkyWjk5DwJPrHwV+C/BnI4fR51fJ6co1ScFzQ= +github.com/isd-sgcu/rpkm66-go-proto v0.0.0-20230630055326-ebe9af180145/go.mod h1:qxIb+IJeGg8MHhRfjs69b7/8+ZUfwrMkXBwu0TtfI1Q= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= diff --git a/internal/handler/auth/auth.handler.go b/internal/handler/auth/auth.handler.go index 94e08ae..b319654 100644 --- a/internal/handler/auth/auth.handler.go +++ b/internal/handler/auth/auth.handler.go @@ -7,7 +7,7 @@ import ( validate "github.com/isd-sgcu/rpkm66-gateway/internal/validator" "github.com/isd-sgcu/rpkm66-gateway/pkg/rctx" "github.com/isd-sgcu/rpkm66-gateway/pkg/service/auth" - "github.com/isd-sgcu/rpkm66-gateway/proto" + usrProto "github.com/isd-sgcu/rpkm66-go-proto/rpkm66/backend/user/v1" ) type Handler struct { @@ -17,7 +17,7 @@ type Handler struct { } type IUserService interface { - FindOne(string) (*proto.User, *dto.ResponseErr) + FindOne(string) (*usrProto.User, *dto.ResponseErr) } func NewHandler(service auth.Service, usrService IUserService, validate *validate.DtoValidator) *Handler { diff --git a/internal/handler/auth/auth.handler_test.go b/internal/handler/auth/auth.handler_test.go index ecd7943..543139a 100644 --- a/internal/handler/auth/auth.handler_test.go +++ b/internal/handler/auth/auth.handler_test.go @@ -10,14 +10,15 @@ import ( mock "github.com/isd-sgcu/rpkm66-gateway/mocks/auth" "github.com/isd-sgcu/rpkm66-gateway/mocks/rctx" "github.com/isd-sgcu/rpkm66-gateway/mocks/user" - "github.com/isd-sgcu/rpkm66-gateway/proto" + proto "github.com/isd-sgcu/rpkm66-go-proto/rpkm66/auth/auth/v1" + userProto "github.com/isd-sgcu/rpkm66-go-proto/rpkm66/backend/user/v1" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/suite" ) type AuthHandlerTest struct { suite.Suite - UserDto *proto.User + UserDto *userProto.User Credential *proto.Credential Payload *dto.TokenPayloadAuth BadRequestErr *dto.ResponseErr @@ -31,7 +32,7 @@ func TestAuthHandler(t *testing.T) { } func (t *AuthHandlerTest) SetupTest() { - t.UserDto = &proto.User{ + t.UserDto = &userProto.User{ Id: faker.UUIDDigit(), Firstname: faker.FirstName(), Lastname: faker.LastName(), diff --git a/internal/handler/baan/baan.handler.go b/internal/handler/baan/baan.handler.go index 0c57e38..7a341b4 100644 --- a/internal/handler/baan/baan.handler.go +++ b/internal/handler/baan/baan.handler.go @@ -6,7 +6,7 @@ import ( "github.com/isd-sgcu/rpkm66-gateway/internal/dto" "github.com/isd-sgcu/rpkm66-gateway/pkg/rctx" "github.com/isd-sgcu/rpkm66-gateway/pkg/service/baan" - "github.com/isd-sgcu/rpkm66-gateway/proto" + userProto "github.com/isd-sgcu/rpkm66-go-proto/rpkm66/backend/user/v1" ) type Handler struct { @@ -15,7 +15,7 @@ type Handler struct { } type IUserService interface { - FindOne(string) (*proto.User, *dto.ResponseErr) + FindOne(string) (*userProto.User, *dto.ResponseErr) } func NewHandler(service baan.Service, userService IUserService) *Handler { diff --git a/internal/handler/baan/baan.handler_test.go b/internal/handler/baan/baan.handler_test.go index d8b1dc6..73f0700 100644 --- a/internal/handler/baan/baan.handler_test.go +++ b/internal/handler/baan/baan.handler_test.go @@ -9,7 +9,8 @@ import ( mock "github.com/isd-sgcu/rpkm66-gateway/mocks/baan" "github.com/isd-sgcu/rpkm66-gateway/mocks/rctx" mockUsr "github.com/isd-sgcu/rpkm66-gateway/mocks/user" - "github.com/isd-sgcu/rpkm66-gateway/proto" + baanProto "github.com/isd-sgcu/rpkm66-go-proto/rpkm66/backend/baan/v1" + userProto "github.com/isd-sgcu/rpkm66-go-proto/rpkm66/backend/user/v1" "github.com/pkg/errors" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/suite" @@ -17,8 +18,8 @@ import ( type BaanHandlerTest struct { suite.Suite - Baan *proto.Baan - User *proto.User + Baan *baanProto.Baan + User *userProto.User userId string BindErr *dto.ResponseErr NotFoundErr *dto.ResponseErr @@ -30,13 +31,13 @@ func TestBaanHandler(t *testing.T) { } func (t *BaanHandlerTest) SetupTest() { - t.Baan = &proto.Baan{ + t.Baan = &baanProto.Baan{ Id: faker.UUIDDigit(), NameTH: faker.Word(), DescriptionTH: faker.Paragraph(), NameEN: faker.Word(), DescriptionEN: faker.Paragraph(), - Size: proto.BaanSize_M, + Size: baanProto.BaanSize_M, Facebook: faker.URL(), FacebookUrl: faker.URL(), Instagram: faker.URL(), @@ -46,7 +47,7 @@ func (t *BaanHandlerTest) SetupTest() { ImageUrl: faker.URL(), } - t.User = &proto.User{ + t.User = &userProto.User{ Id: faker.UUIDDigit(), Title: faker.Word(), Firstname: faker.FirstName(), @@ -86,18 +87,18 @@ func (t *BaanHandlerTest) SetupTest() { } } -func createBaans(baan *proto.Baan) []*proto.Baan { - var baans []*proto.Baan +func createBaans(baan *baanProto.Baan) []*baanProto.Baan { + var baans []*baanProto.Baan baans = append(baans, baan) for i := 0; i < 2; i++ { - b := proto.Baan{ + b := baanProto.Baan{ Id: faker.UUIDDigit(), NameTH: faker.Word(), DescriptionTH: faker.Paragraph(), NameEN: faker.Word(), DescriptionEN: faker.Paragraph(), - Size: proto.BaanSize_M, + Size: baanProto.BaanSize_M, Facebook: faker.URL(), FacebookUrl: faker.URL(), Instagram: faker.URL(), diff --git a/internal/handler/checkin/checkin.handler_test.go b/internal/handler/checkin/checkin.handler_test.go index ea5c996..d770b9b 100644 --- a/internal/handler/checkin/checkin.handler_test.go +++ b/internal/handler/checkin/checkin.handler_test.go @@ -11,14 +11,15 @@ import ( "github.com/isd-sgcu/rpkm66-gateway/internal/validator" cmock "github.com/isd-sgcu/rpkm66-gateway/mocks/checkin" "github.com/isd-sgcu/rpkm66-gateway/mocks/rctx" - "github.com/isd-sgcu/rpkm66-gateway/proto" + checkinProto "github.com/isd-sgcu/rpkm66-go-proto/rpkm66/backend/checkin/v1" + userProto "github.com/isd-sgcu/rpkm66-go-proto/rpkm66/backend/user/v1" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/suite" ) type CheckinHandlerTest struct { suite.Suite - User *proto.User + User *userProto.User BadRequestErr *dto.ResponseErr ServiceDownErr *dto.ResponseErr Token string @@ -31,7 +32,7 @@ func TestCheckinHandler(t *testing.T) { } func (t *CheckinHandlerTest) SetupTest() { - t.User = &proto.User{ + t.User = &userProto.User{ Id: faker.UUIDDigit(), Title: faker.Word(), Firstname: faker.FirstName(), @@ -69,13 +70,13 @@ func (t *CheckinHandlerTest) SetupTest() { } func (t *CheckinHandlerTest) TestCheckinVerifySuccess() { - want := &proto.CheckinVerifyResponse{ + want := &checkinProto.CheckinVerifyResponse{ CheckinToken: t.Token, CheckinType: t.CheckinType, } s := &cmock.ServiceMock{} - s.On("CheckinVerify", t.User.Id, t.EventType).Return(&proto.CheckinVerifyResponse{ + s.On("CheckinVerify", t.User.Id, t.EventType).Return(&checkinProto.CheckinVerifyResponse{ CheckinToken: t.Token, CheckinType: t.CheckinType, }, nil) @@ -98,7 +99,7 @@ func (t *CheckinHandlerTest) TestCheckinVerifySuccess() { func (t *CheckinHandlerTest) TestCheckinVerifyBadRequest() { s := &cmock.ServiceMock{} - s.On("CheckinVerify", t.User.Id, t.EventType).Return(&proto.CheckinVerifyResponse{ + s.On("CheckinVerify", t.User.Id, t.EventType).Return(&checkinProto.CheckinVerifyResponse{ CheckinToken: t.Token, CheckinType: t.CheckinType, }, nil) @@ -137,12 +138,12 @@ func (t *CheckinHandlerTest) TestCheckinVerifyThrowInnerError() { } func (t *CheckinHandlerTest) TestCheckinConfirmSuccess() { - want := &proto.CheckinConfirmResponse{ + want := &checkinProto.CheckinConfirmResponse{ Success: true, } s := &cmock.ServiceMock{} - s.On("CheckinConfirm", t.Token).Return(&proto.CheckinConfirmResponse{ + s.On("CheckinConfirm", t.Token).Return(&checkinProto.CheckinConfirmResponse{ Success: true, }, nil) @@ -164,7 +165,7 @@ func (t *CheckinHandlerTest) TestCheckinConfirmSuccess() { func (t *CheckinHandlerTest) TestCheckinConfirmBadRequest() { s := &cmock.ServiceMock{} - s.On("CheckinConfirm", t.Token).Return(&proto.CheckinConfirmResponse{ + s.On("CheckinConfirm", t.Token).Return(&checkinProto.CheckinConfirmResponse{ Success: true, }, nil) diff --git a/internal/handler/estamp/estamp.handler_test.go b/internal/handler/estamp/estamp.handler_test.go index 13bdcb6..7b0f21a 100644 --- a/internal/handler/estamp/estamp.handler_test.go +++ b/internal/handler/estamp/estamp.handler_test.go @@ -10,7 +10,7 @@ import ( "github.com/isd-sgcu/rpkm66-gateway/internal/validator" mock "github.com/isd-sgcu/rpkm66-gateway/mocks/estamp" "github.com/isd-sgcu/rpkm66-gateway/mocks/rctx" - "github.com/isd-sgcu/rpkm66-gateway/proto" + proto "github.com/isd-sgcu/rpkm66-go-proto/rpkm66/backend/event/v1" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/suite" ) diff --git a/internal/handler/file/file.handler.go b/internal/handler/file/file.handler.go index 7157ab4..d35345e 100644 --- a/internal/handler/file/file.handler.go +++ b/internal/handler/file/file.handler.go @@ -8,7 +8,7 @@ import ( "github.com/isd-sgcu/rpkm66-gateway/internal/dto" "github.com/isd-sgcu/rpkm66-gateway/pkg/rctx" fileSvc "github.com/isd-sgcu/rpkm66-gateway/pkg/service/file" - "github.com/isd-sgcu/rpkm66-gateway/proto" + userProto "github.com/isd-sgcu/rpkm66-go-proto/rpkm66/backend/user/v1" "github.com/rs/zerolog/log" ) @@ -19,7 +19,7 @@ type Handler struct { } type IUserService interface { - FindOne(string) (*proto.User, *dto.ResponseErr) + FindOne(string) (*userProto.User, *dto.ResponseErr) } func NewHandler(service fileSvc.Service, usrService IUserService, maxFileSize int) *Handler { diff --git a/internal/handler/file/file.handler_test.go b/internal/handler/file/file.handler_test.go index 8f85f46..2b64653 100644 --- a/internal/handler/file/file.handler_test.go +++ b/internal/handler/file/file.handler_test.go @@ -10,7 +10,7 @@ import ( mock "github.com/isd-sgcu/rpkm66-gateway/mocks/file" "github.com/isd-sgcu/rpkm66-gateway/mocks/rctx" mockUsr "github.com/isd-sgcu/rpkm66-gateway/mocks/user" - "github.com/isd-sgcu/rpkm66-gateway/proto" + proto "github.com/isd-sgcu/rpkm66-go-proto/rpkm66/backend/user/v1" "github.com/pkg/errors" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/suite" diff --git a/internal/handler/group/group.handler_test.go b/internal/handler/group/group.handler_test.go index 8cfd92b..4a194c4 100644 --- a/internal/handler/group/group.handler_test.go +++ b/internal/handler/group/group.handler_test.go @@ -10,7 +10,7 @@ import ( "github.com/isd-sgcu/rpkm66-gateway/internal/validator" mock "github.com/isd-sgcu/rpkm66-gateway/mocks/group" "github.com/isd-sgcu/rpkm66-gateway/mocks/rctx" - "github.com/isd-sgcu/rpkm66-gateway/proto" + proto "github.com/isd-sgcu/rpkm66-go-proto/rpkm66/backend/group/v1" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/suite" ) diff --git a/internal/handler/user/user.handler_test.go b/internal/handler/user/user.handler_test.go index 8a4656c..2d4836e 100644 --- a/internal/handler/user/user.handler_test.go +++ b/internal/handler/user/user.handler_test.go @@ -10,7 +10,8 @@ import ( "github.com/isd-sgcu/rpkm66-gateway/internal/validator" "github.com/isd-sgcu/rpkm66-gateway/mocks/rctx" mock "github.com/isd-sgcu/rpkm66-gateway/mocks/user" - "github.com/isd-sgcu/rpkm66-gateway/proto" + eventProto "github.com/isd-sgcu/rpkm66-go-proto/rpkm66/backend/event/v1" + userProto "github.com/isd-sgcu/rpkm66-go-proto/rpkm66/backend/user/v1" "github.com/pkg/errors" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/suite" @@ -18,8 +19,8 @@ import ( type UserHandlerTest struct { suite.Suite - User *proto.User - Events []*proto.Event + User *userProto.User + Events []*eventProto.Event UserDto *dto.UserDto UpdateUserDto *dto.UpdateUserDto BindErr *dto.ResponseErr @@ -33,7 +34,7 @@ func TestUserHandler(t *testing.T) { } func (t *UserHandlerTest) SetupTest() { - t.User = &proto.User{ + t.User = &userProto.User{ Id: faker.UUIDDigit(), Title: faker.Word(), Firstname: faker.FirstName(), @@ -54,9 +55,9 @@ func (t *UserHandlerTest) SetupTest() { BaanId: faker.UUIDDigit(), } - t.Events = make([]*proto.Event, 3) + t.Events = make([]*eventProto.Event, 3) - t.Events[0] = &proto.Event{ + t.Events[0] = &eventProto.Event{ Id: faker.UUIDDigit(), NameTH: faker.Word(), DescriptionTH: faker.Word(), @@ -65,7 +66,7 @@ func (t *UserHandlerTest) SetupTest() { Code: faker.Word(), } - t.Events[1] = &proto.Event{ + t.Events[1] = &eventProto.Event{ Id: faker.UUIDDigit(), NameTH: faker.Word(), DescriptionTH: faker.Word(), @@ -74,7 +75,7 @@ func (t *UserHandlerTest) SetupTest() { Code: faker.Word(), } - t.Events[2] = &proto.Event{ + t.Events[2] = &eventProto.Event{ Id: faker.UUIDDigit(), NameTH: faker.Word(), DescriptionTH: faker.Word(), @@ -479,8 +480,8 @@ func (t *UserHandlerTest) TestDeleteGrpcErr() { } func (t *UserHandlerTest) TestGetUserEstampSuccess() { - want := &proto.GetUserEstampResponse{ - EventList: []*proto.Event{ + want := &userProto.GetUserEstampResponse{ + EventList: []*eventProto.Event{ t.Events[0], t.Events[1], }, @@ -537,7 +538,7 @@ func (t *UserHandlerTest) TestFindUserUnavailable() { } func (t *UserHandlerTest) TestConfirmEstampSuccess() { - want := &proto.ConfirmEstampResponse{} + want := &userProto.ConfirmEstampResponse{} s := &mock.ServiceMock{} s.On("ConfirmEstamp", t.User.Id, t.Events[0].Id).Return(want, nil) diff --git a/internal/service/auth/auth.service.go b/internal/service/auth/auth.service.go index 9cebda7..8f40e1b 100644 --- a/internal/service/auth/auth.service.go +++ b/internal/service/auth/auth.service.go @@ -6,7 +6,7 @@ import ( "github.com/isd-sgcu/rpkm66-gateway/internal/dto" "github.com/isd-sgcu/rpkm66-gateway/internal/utils" - "github.com/isd-sgcu/rpkm66-gateway/proto" + proto "github.com/isd-sgcu/rpkm66-go-proto/rpkm66/auth/auth/v1" "github.com/rs/zerolog/log" ) diff --git a/internal/service/auth/auth.service_test.go b/internal/service/auth/auth.service_test.go index 66d32ae..be46546 100644 --- a/internal/service/auth/auth.service_test.go +++ b/internal/service/auth/auth.service_test.go @@ -7,7 +7,7 @@ import ( "github.com/bxcodec/faker/v3" "github.com/isd-sgcu/rpkm66-gateway/internal/dto" mock "github.com/isd-sgcu/rpkm66-gateway/mocks/auth" - "github.com/isd-sgcu/rpkm66-gateway/proto" + proto "github.com/isd-sgcu/rpkm66-go-proto/rpkm66/auth/auth/v1" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/suite" "google.golang.org/grpc/codes" diff --git a/internal/service/baan/baan.service.go b/internal/service/baan/baan.service.go index 034f444..8cce3ef 100644 --- a/internal/service/baan/baan.service.go +++ b/internal/service/baan/baan.service.go @@ -6,7 +6,7 @@ import ( "github.com/isd-sgcu/rpkm66-gateway/internal/dto" "github.com/isd-sgcu/rpkm66-gateway/internal/utils" - "github.com/isd-sgcu/rpkm66-gateway/proto" + proto "github.com/isd-sgcu/rpkm66-go-proto/rpkm66/backend/baan/v1" "github.com/rs/zerolog/log" ) diff --git a/internal/service/baan/baan.service_test.go b/internal/service/baan/baan.service_test.go index bb88c3d..e96b0ca 100644 --- a/internal/service/baan/baan.service_test.go +++ b/internal/service/baan/baan.service_test.go @@ -7,7 +7,7 @@ import ( "github.com/bxcodec/faker/v3" "github.com/isd-sgcu/rpkm66-gateway/internal/dto" "github.com/isd-sgcu/rpkm66-gateway/mocks/baan" - "github.com/isd-sgcu/rpkm66-gateway/proto" + proto "github.com/isd-sgcu/rpkm66-go-proto/rpkm66/backend/baan/v1" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/suite" "google.golang.org/grpc/codes" diff --git a/internal/service/checkin/checkin.service.go b/internal/service/checkin/checkin.service.go index acc0b59..9412833 100644 --- a/internal/service/checkin/checkin.service.go +++ b/internal/service/checkin/checkin.service.go @@ -6,7 +6,7 @@ import ( "github.com/isd-sgcu/rpkm66-gateway/internal/dto" "github.com/isd-sgcu/rpkm66-gateway/internal/utils" - "github.com/isd-sgcu/rpkm66-gateway/proto" + proto "github.com/isd-sgcu/rpkm66-go-proto/rpkm66/backend/checkin/v1" "github.com/rs/zerolog/log" ) diff --git a/internal/service/checkin/checkin.service_test.go b/internal/service/checkin/checkin.service_test.go index c6207d8..8745951 100644 --- a/internal/service/checkin/checkin.service_test.go +++ b/internal/service/checkin/checkin.service_test.go @@ -8,7 +8,8 @@ import ( cst "github.com/isd-sgcu/rpkm66-gateway/constant/checkin" "github.com/isd-sgcu/rpkm66-gateway/internal/dto" "github.com/isd-sgcu/rpkm66-gateway/mocks/checkin" - "github.com/isd-sgcu/rpkm66-gateway/proto" + proto "github.com/isd-sgcu/rpkm66-go-proto/rpkm66/backend/checkin/v1" + usrProto "github.com/isd-sgcu/rpkm66-go-proto/rpkm66/backend/user/v1" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/suite" "google.golang.org/grpc/codes" @@ -17,7 +18,7 @@ import ( type CheckinServiceTest struct { suite.Suite - User *proto.User + User *usrProto.User Token string ServiceDownErr *dto.ResponseErr BadRequestErr *dto.ResponseErr @@ -29,7 +30,7 @@ func TestCheckin(t *testing.T) { } func (t *CheckinServiceTest) SetupTest() { - t.User = &proto.User{ + t.User = &usrProto.User{ Id: faker.UUIDDigit(), Title: faker.Word(), Firstname: faker.FirstName(), diff --git a/internal/service/estamp/estamp.service.go b/internal/service/estamp/estamp.service.go index 60ab30f..46b92e2 100644 --- a/internal/service/estamp/estamp.service.go +++ b/internal/service/estamp/estamp.service.go @@ -6,7 +6,7 @@ import ( "github.com/isd-sgcu/rpkm66-gateway/internal/dto" "github.com/isd-sgcu/rpkm66-gateway/internal/utils" - "github.com/isd-sgcu/rpkm66-gateway/proto" + proto "github.com/isd-sgcu/rpkm66-go-proto/rpkm66/backend/event/v1" "github.com/rs/zerolog/log" ) diff --git a/internal/service/estamp/estamp.service_test.go b/internal/service/estamp/estamp.service_test.go index 10bac08..bf00171 100644 --- a/internal/service/estamp/estamp.service_test.go +++ b/internal/service/estamp/estamp.service_test.go @@ -7,7 +7,9 @@ import ( "github.com/bxcodec/faker/v3" "github.com/isd-sgcu/rpkm66-gateway/internal/dto" mock "github.com/isd-sgcu/rpkm66-gateway/mocks/estamp" - "github.com/isd-sgcu/rpkm66-gateway/proto" + eventProto "github.com/isd-sgcu/rpkm66-go-proto/rpkm66/backend/event/v1" + proto "github.com/isd-sgcu/rpkm66-go-proto/rpkm66/backend/event/v1" + userProto "github.com/isd-sgcu/rpkm66-go-proto/rpkm66/backend/user/v1" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/suite" "google.golang.org/grpc/codes" @@ -17,10 +19,10 @@ import ( type EStampServiceTest struct { suite.Suite UId string - Event1 *proto.Event - Event2 *proto.Event - Event3 *proto.Event - User *proto.User + Event1 *eventProto.Event + Event2 *eventProto.Event + Event3 *eventProto.Event + User *userProto.User EventType string NotFoundErr *dto.ResponseErr ServiceDownErr *dto.ResponseErr @@ -34,7 +36,7 @@ func TestEStampService(t *testing.T) { func (t *EStampServiceTest) SetupTest() { t.UId = faker.UUIDDigit() - t.User = &proto.User{ + t.User = &userProto.User{ Id: faker.UUIDDigit(), Firstname: faker.FirstName(), Lastname: faker.LastName(), @@ -52,7 +54,7 @@ func (t *EStampServiceTest) SetupTest() { CanSelectBaan: true, } - t.Event1 = &proto.Event{ + t.Event1 = &eventProto.Event{ Id: faker.UUIDDigit(), NameTH: faker.Word(), DescriptionTH: faker.Word(), @@ -62,7 +64,7 @@ func (t *EStampServiceTest) SetupTest() { ImageURL: faker.URL(), } - t.Event2 = &proto.Event{ + t.Event2 = &eventProto.Event{ Id: faker.UUIDDigit(), NameTH: faker.Word(), DescriptionTH: faker.Word(), @@ -72,7 +74,7 @@ func (t *EStampServiceTest) SetupTest() { ImageURL: faker.URL(), } - t.Event3 = &proto.Event{ + t.Event3 = &eventProto.Event{ Id: faker.UUIDDigit(), NameTH: faker.Word(), DescriptionTH: faker.Word(), @@ -165,7 +167,7 @@ func (t *EStampServiceTest) TestFindByIdInternal() { func (t *EStampServiceTest) TestFindAllEventWithTypeSuccess() { want := &proto.FindAllEventWithTypeResponse{ - Event: []*proto.Event{ + Event: []*eventProto.Event{ t.Event1, t.Event2, }, diff --git a/internal/service/file/file.service.go b/internal/service/file/file.service.go index 614f290..9180b8c 100644 --- a/internal/service/file/file.service.go +++ b/internal/service/file/file.service.go @@ -7,7 +7,7 @@ import ( "github.com/isd-sgcu/rpkm66-gateway/constant/file" "github.com/isd-sgcu/rpkm66-gateway/internal/dto" "github.com/isd-sgcu/rpkm66-gateway/internal/utils" - "github.com/isd-sgcu/rpkm66-gateway/proto" + proto "github.com/isd-sgcu/rpkm66-go-proto/rpkm66/file/file/v1" "github.com/rs/zerolog/log" ) diff --git a/internal/service/file/file.service_test.go b/internal/service/file/file.service_test.go index 9436c7d..68e169f 100644 --- a/internal/service/file/file.service_test.go +++ b/internal/service/file/file.service_test.go @@ -8,7 +8,7 @@ import ( "github.com/isd-sgcu/rpkm66-gateway/constant/file" "github.com/isd-sgcu/rpkm66-gateway/internal/dto" mock "github.com/isd-sgcu/rpkm66-gateway/mocks/file" - "github.com/isd-sgcu/rpkm66-gateway/proto" + proto "github.com/isd-sgcu/rpkm66-go-proto/rpkm66/file/file/v1" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/suite" "google.golang.org/grpc/codes" diff --git a/internal/service/group/group.service.go b/internal/service/group/group.service.go index f831306..d52d797 100644 --- a/internal/service/group/group.service.go +++ b/internal/service/group/group.service.go @@ -6,7 +6,7 @@ import ( "github.com/isd-sgcu/rpkm66-gateway/internal/dto" "github.com/isd-sgcu/rpkm66-gateway/internal/utils" - "github.com/isd-sgcu/rpkm66-gateway/proto" + proto "github.com/isd-sgcu/rpkm66-go-proto/rpkm66/backend/group/v1" "github.com/rs/zerolog/log" ) diff --git a/internal/service/group/group.service_test.go b/internal/service/group/group.service_test.go index 10fba3e..a3bf187 100644 --- a/internal/service/group/group.service_test.go +++ b/internal/service/group/group.service_test.go @@ -9,7 +9,8 @@ import ( constant "github.com/isd-sgcu/rpkm66-gateway/constant/baan" "github.com/isd-sgcu/rpkm66-gateway/internal/dto" "github.com/isd-sgcu/rpkm66-gateway/mocks/group" - "github.com/isd-sgcu/rpkm66-gateway/proto" + baanProto "github.com/isd-sgcu/rpkm66-go-proto/rpkm66/backend/baan/v1" + proto "github.com/isd-sgcu/rpkm66-go-proto/rpkm66/backend/group/v1" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/suite" "google.golang.org/grpc/codes" @@ -472,12 +473,12 @@ func (t *GroupServiceTest) TestLeaveGrpcErr() { assert.Equal(t.T(), want, err) } -func createBaanSlices() ([]*proto.Baan, []string) { - var result []*proto.Baan +func createBaanSlices() ([]*baanProto.Baan, []string) { + var result []*baanProto.Baan var baanIds []string for i := 0; i < 3; i++ { - b := &proto.Baan{ + b := &baanProto.Baan{ Id: uuid.New().String(), NameTH: faker.Word(), DescriptionTH: faker.Paragraph(), diff --git a/internal/service/user/user.service.go b/internal/service/user/user.service.go index bd1e8bd..9935501 100644 --- a/internal/service/user/user.service.go +++ b/internal/service/user/user.service.go @@ -6,7 +6,7 @@ import ( "github.com/isd-sgcu/rpkm66-gateway/internal/dto" "github.com/isd-sgcu/rpkm66-gateway/internal/utils" - "github.com/isd-sgcu/rpkm66-gateway/proto" + proto "github.com/isd-sgcu/rpkm66-go-proto/rpkm66/backend/user/v1" "github.com/rs/zerolog/log" ) diff --git a/internal/service/user/user.service_test.go b/internal/service/user/user.service_test.go index 3795910..0c9d65c 100644 --- a/internal/service/user/user.service_test.go +++ b/internal/service/user/user.service_test.go @@ -8,7 +8,8 @@ import ( "github.com/isd-sgcu/rpkm66-gateway/internal/dto" "github.com/isd-sgcu/rpkm66-gateway/internal/utils" "github.com/isd-sgcu/rpkm66-gateway/mocks/user" - "github.com/isd-sgcu/rpkm66-gateway/proto" + eventProto "github.com/isd-sgcu/rpkm66-go-proto/rpkm66/backend/event/v1" + userProto "github.com/isd-sgcu/rpkm66-go-proto/rpkm66/backend/user/v1" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/suite" "google.golang.org/grpc/codes" @@ -17,12 +18,12 @@ import ( type UserServiceTest struct { suite.Suite - User *proto.User - UserReq *proto.User - Events []*proto.Event + User *userProto.User + UserReq *userProto.User + Events []*eventProto.Event UserDto *dto.UserDto UpdateUserDto *dto.UpdateUserDto - UpdateUserReq *proto.UpdateUserRequest + UpdateUserReq *userProto.UpdateUserRequest NotFoundErr *dto.ResponseErr ServiceDownErr *dto.ResponseErr InternalErr *dto.ResponseErr @@ -33,7 +34,7 @@ func TestUserService(t *testing.T) { } func (t *UserServiceTest) SetupTest() { - t.User = &proto.User{ + t.User = &userProto.User{ Id: faker.UUIDDigit(), Firstname: faker.FirstName(), Lastname: faker.LastName(), @@ -52,7 +53,7 @@ func (t *UserServiceTest) SetupTest() { BaanId: faker.UUIDDigit(), } - t.UserReq = &proto.User{ + t.UserReq = &userProto.User{ Firstname: t.User.Firstname, Lastname: t.User.Lastname, Nickname: t.User.Nickname, @@ -67,9 +68,9 @@ func (t *UserServiceTest) SetupTest() { CanSelectBaan: t.User.CanSelectBaan, } - t.Events = make([]*proto.Event, 3) + t.Events = make([]*eventProto.Event, 3) - t.Events[0] = &proto.Event{ + t.Events[0] = &eventProto.Event{ Id: faker.UUIDDigit(), NameTH: faker.Word(), DescriptionTH: faker.Word(), @@ -78,7 +79,7 @@ func (t *UserServiceTest) SetupTest() { Code: faker.Word(), } - t.Events[1] = &proto.Event{ + t.Events[1] = &eventProto.Event{ Id: faker.UUIDDigit(), NameTH: faker.Word(), DescriptionTH: faker.Word(), @@ -87,7 +88,7 @@ func (t *UserServiceTest) SetupTest() { Code: faker.Word(), } - t.Events[2] = &proto.Event{ + t.Events[2] = &eventProto.Event{ Id: faker.UUIDDigit(), NameTH: faker.Word(), DescriptionTH: faker.Word(), @@ -125,7 +126,7 @@ func (t *UserServiceTest) SetupTest() { Disease: t.User.Disease, } - t.UpdateUserReq = &proto.UpdateUserRequest{ + t.UpdateUserReq = &userProto.UpdateUserRequest{ Id: t.User.Id, Title: t.User.Title, Firstname: t.User.Firstname, @@ -164,7 +165,7 @@ func (t *UserServiceTest) TestFindOneSuccess() { want := t.User c := &user.ClientMock{} - c.On("FindOne", &proto.FindOneUserRequest{Id: t.User.Id}).Return(&proto.FindOneUserResponse{User: want}, nil) + c.On("FindOne", &userProto.FindOneUserRequest{Id: t.User.Id}).Return(&userProto.FindOneUserResponse{User: want}, nil) srv := NewService(c) actual, err := srv.FindOne(t.User.Id) @@ -177,7 +178,7 @@ func (t *UserServiceTest) TestFindOneNotFound() { want := t.NotFoundErr c := &user.ClientMock{} - c.On("FindOne", &proto.FindOneUserRequest{Id: t.User.Id}).Return(nil, status.Error(codes.NotFound, "User not found")) + c.On("FindOne", &userProto.FindOneUserRequest{Id: t.User.Id}).Return(nil, status.Error(codes.NotFound, "User not found")) srv := NewService(c) @@ -191,7 +192,7 @@ func (t *UserServiceTest) TestFindOneGrpcErr() { want := t.ServiceDownErr c := &user.ClientMock{} - c.On("FindOne", &proto.FindOneUserRequest{Id: t.User.Id}).Return(nil, status.Error(codes.Unavailable, "")) + c.On("FindOne", &userProto.FindOneUserRequest{Id: t.User.Id}).Return(nil, status.Error(codes.Unavailable, "")) srv := NewService(c) actual, err := srv.FindOne(t.User.Id) @@ -204,7 +205,7 @@ func (t *UserServiceTest) TestCreateSuccess() { want := t.User c := &user.ClientMock{} - c.On("Create", t.UserReq).Return(&proto.CreateUserResponse{User: want}, nil) + c.On("Create", t.UserReq).Return(&userProto.CreateUserResponse{User: want}, nil) srv := NewService(c) @@ -230,7 +231,7 @@ func (t *UserServiceTest) TestCreateGrpcErr() { func (t *UserServiceTest) TestVerifySuccess() { c := &user.ClientMock{} - c.On("Verify", &proto.VerifyUserRequest{StudentId: t.User.StudentID, VerifyType: "vaccine"}).Return(&proto.VerifyUserResponse{Success: true}, nil) + c.On("Verify", &userProto.VerifyUserRequest{StudentId: t.User.StudentID, VerifyType: "vaccine"}).Return(&userProto.VerifyUserResponse{Success: true}, nil) srv := NewService(c) @@ -244,7 +245,7 @@ func (t *UserServiceTest) TestVerifyFailed() { want := t.NotFoundErr c := &user.ClientMock{} - c.On("Verify", &proto.VerifyUserRequest{StudentId: t.User.StudentID, VerifyType: "vaccine"}).Return(&proto.VerifyUserResponse{Success: true}, status.Error(codes.NotFound, "User not found")) + c.On("Verify", &userProto.VerifyUserRequest{StudentId: t.User.StudentID, VerifyType: "vaccine"}).Return(&userProto.VerifyUserResponse{Success: true}, status.Error(codes.NotFound, "User not found")) srv := NewService(c) @@ -258,7 +259,7 @@ func (t *UserServiceTest) TestUpdateSuccess() { want := t.User c := &user.ClientMock{} - c.On("Update", t.UpdateUserReq).Return(&proto.UpdateUserResponse{User: t.User}, nil) + c.On("Update", t.UpdateUserReq).Return(&userProto.UpdateUserResponse{User: t.User}, nil) srv := NewService(c) @@ -302,7 +303,7 @@ func (t *UserServiceTest) TestCreateOrUpdateSuccess() { t.UserReq.Id = t.User.Id c := &user.ClientMock{} - c.On("CreateOrUpdate", &proto.CreateOrUpdateUserRequest{User: t.UserReq}).Return(&proto.CreateOrUpdateUserResponse{User: t.User}, nil) + c.On("CreateOrUpdate", &userProto.CreateOrUpdateUserRequest{User: t.UserReq}).Return(&userProto.CreateOrUpdateUserResponse{User: t.User}, nil) srv := NewService(c) @@ -318,7 +319,7 @@ func (t *UserServiceTest) TestCreateOrUpdateGrpcErr() { t.UserReq.Id = t.User.Id c := &user.ClientMock{} - c.On("CreateOrUpdate", &proto.CreateOrUpdateUserRequest{User: t.UserReq}).Return(nil, status.Error(codes.Unavailable, "")) + c.On("CreateOrUpdate", &userProto.CreateOrUpdateUserRequest{User: t.UserReq}).Return(nil, status.Error(codes.Unavailable, "")) srv := NewService(c) @@ -330,7 +331,7 @@ func (t *UserServiceTest) TestCreateOrUpdateGrpcErr() { func (t *UserServiceTest) TestDeleteSuccess() { c := &user.ClientMock{} - c.On("Delete", &proto.DeleteUserRequest{Id: t.User.Id}).Return(&proto.DeleteUserResponse{Success: true}, nil) + c.On("Delete", &userProto.DeleteUserRequest{Id: t.User.Id}).Return(&userProto.DeleteUserResponse{Success: true}, nil) srv := NewService(c) @@ -344,7 +345,7 @@ func (t *UserServiceTest) TestDeleteNotFound() { want := t.NotFoundErr c := &user.ClientMock{} - c.On("Delete", &proto.DeleteUserRequest{Id: t.User.Id}).Return(nil, status.Error(codes.NotFound, "User not found")) + c.On("Delete", &userProto.DeleteUserRequest{Id: t.User.Id}).Return(nil, status.Error(codes.NotFound, "User not found")) srv := NewService(c) @@ -358,7 +359,7 @@ func (t *UserServiceTest) TestDeleteGrpcErr() { want := t.ServiceDownErr c := &user.ClientMock{} - c.On("Delete", &proto.DeleteUserRequest{Id: t.User.Id}).Return(nil, status.Error(codes.Unavailable, "")) + c.On("Delete", &userProto.DeleteUserRequest{Id: t.User.Id}).Return(nil, status.Error(codes.Unavailable, "")) srv := NewService(c) @@ -369,11 +370,11 @@ func (t *UserServiceTest) TestDeleteGrpcErr() { } func (t *UserServiceTest) TestConfirmEstampSuccess() { - want := &proto.ConfirmEstampResponse{} + want := &userProto.ConfirmEstampResponse{} c := &user.ClientMock{} - c.On("ConfirmEstamp", &proto.ConfirmEstampRequest{ + c.On("ConfirmEstamp", &userProto.ConfirmEstampRequest{ UId: t.User.Id, EId: t.Events[0].Id, }).Return(want, nil) @@ -388,7 +389,7 @@ func (t *UserServiceTest) TestConfirmEstampSuccess() { func (t *UserServiceTest) TestConfirmEstampNotFound() { c := &user.ClientMock{} - c.On("ConfirmEstamp", &proto.ConfirmEstampRequest{ + c.On("ConfirmEstamp", &userProto.ConfirmEstampRequest{ UId: t.User.Id, EId: t.Events[0].Id, }).Return(nil, status.Error(codes.NotFound, "User not found")) @@ -403,7 +404,7 @@ func (t *UserServiceTest) TestConfirmEstampNotFound() { func (t *UserServiceTest) TestConfirmEstampInternal() { c := &user.ClientMock{} - c.On("ConfirmEstamp", &proto.ConfirmEstampRequest{ + c.On("ConfirmEstamp", &userProto.ConfirmEstampRequest{ UId: t.User.Id, EId: t.Events[0].Id, }).Return(nil, status.Error(codes.Internal, "Internal Server Error")) @@ -418,7 +419,7 @@ func (t *UserServiceTest) TestConfirmEstampInternal() { func (t *UserServiceTest) TestConfirmEstampUnavailable() { c := &user.ClientMock{} - c.On("ConfirmEstamp", &proto.ConfirmEstampRequest{ + c.On("ConfirmEstamp", &userProto.ConfirmEstampRequest{ UId: t.User.Id, EId: t.Events[0].Id, }).Return(nil, status.Error(codes.Unavailable, "Service is down")) @@ -431,8 +432,8 @@ func (t *UserServiceTest) TestConfirmEstampUnavailable() { } func (t *UserServiceTest) TestGetUserEstampSuccess() { - want := &proto.GetUserEstampResponse{ - EventList: []*proto.Event{ + want := &userProto.GetUserEstampResponse{ + EventList: []*eventProto.Event{ t.Events[0], t.Events[1], }, @@ -440,7 +441,7 @@ func (t *UserServiceTest) TestGetUserEstampSuccess() { c := &user.ClientMock{} - c.On("GetUserEstamp", &proto.GetUserEstampRequest{ + c.On("GetUserEstamp", &userProto.GetUserEstampRequest{ UId: t.User.Id, }).Return(want, nil) @@ -454,7 +455,7 @@ func (t *UserServiceTest) TestGetUserEstampSuccess() { func (t *UserServiceTest) TestGetUserEstampUnavailable() { c := &user.ClientMock{} - c.On("GetUserEstamp", &proto.GetUserEstampRequest{ + c.On("GetUserEstamp", &userProto.GetUserEstampRequest{ UId: t.User.Id, }).Return(nil, status.Error(codes.Unavailable, "Service is down")) @@ -468,7 +469,7 @@ func (t *UserServiceTest) TestGetUserEstampUnavailable() { func (t *UserServiceTest) TestGetUserEstampNotFound() { c := &user.ClientMock{} - c.On("GetUserEstamp", &proto.GetUserEstampRequest{ + c.On("GetUserEstamp", &userProto.GetUserEstampRequest{ UId: t.User.Id, }).Return(nil, status.Error(codes.NotFound, "User not found")) @@ -482,7 +483,7 @@ func (t *UserServiceTest) TestGetUserEstampNotFound() { func (t *UserServiceTest) TestGetUserEstampInternal() { c := &user.ClientMock{} - c.On("GetUserEstamp", &proto.GetUserEstampRequest{ + c.On("GetUserEstamp", &userProto.GetUserEstampRequest{ UId: t.User.Id, }).Return(nil, status.Error(codes.Internal, "Internal Server Error")) diff --git a/mocks/auth/auth.mock.go b/mocks/auth/auth.mock.go index c67c2a8..e034229 100644 --- a/mocks/auth/auth.mock.go +++ b/mocks/auth/auth.mock.go @@ -4,7 +4,7 @@ import ( "context" "github.com/isd-sgcu/rpkm66-gateway/internal/dto" - "github.com/isd-sgcu/rpkm66-gateway/proto" + proto "github.com/isd-sgcu/rpkm66-go-proto/rpkm66/auth/auth/v1" "github.com/stretchr/testify/mock" "google.golang.org/grpc" ) diff --git a/mocks/baan/baan.mock.go b/mocks/baan/baan.mock.go index c5bd076..a8f14ec 100644 --- a/mocks/baan/baan.mock.go +++ b/mocks/baan/baan.mock.go @@ -4,7 +4,7 @@ import ( "context" "github.com/isd-sgcu/rpkm66-gateway/internal/dto" - "github.com/isd-sgcu/rpkm66-gateway/proto" + proto "github.com/isd-sgcu/rpkm66-go-proto/rpkm66/backend/baan/v1" "github.com/stretchr/testify/mock" "google.golang.org/grpc" ) diff --git a/mocks/checkin/checkin.mock.go b/mocks/checkin/checkin.mock.go index 850d733..51c6348 100644 --- a/mocks/checkin/checkin.mock.go +++ b/mocks/checkin/checkin.mock.go @@ -4,7 +4,7 @@ import ( "context" "github.com/isd-sgcu/rpkm66-gateway/internal/dto" - "github.com/isd-sgcu/rpkm66-gateway/proto" + proto "github.com/isd-sgcu/rpkm66-go-proto/rpkm66/backend/checkin/v1" "github.com/stretchr/testify/mock" "google.golang.org/grpc" ) diff --git a/mocks/estamp/estamp.mock.go b/mocks/estamp/estamp.mock.go index fd17b85..f709d75 100644 --- a/mocks/estamp/estamp.mock.go +++ b/mocks/estamp/estamp.mock.go @@ -4,7 +4,7 @@ import ( "context" "github.com/isd-sgcu/rpkm66-gateway/internal/dto" - "github.com/isd-sgcu/rpkm66-gateway/proto" + proto "github.com/isd-sgcu/rpkm66-go-proto/rpkm66/backend/event/v1" "github.com/stretchr/testify/mock" "google.golang.org/grpc" ) diff --git a/mocks/file/file.mock.go b/mocks/file/file.mock.go index 001c59d..3e0692d 100644 --- a/mocks/file/file.mock.go +++ b/mocks/file/file.mock.go @@ -5,7 +5,7 @@ import ( "github.com/isd-sgcu/rpkm66-gateway/constant/file" "github.com/isd-sgcu/rpkm66-gateway/internal/dto" - "github.com/isd-sgcu/rpkm66-gateway/proto" + proto "github.com/isd-sgcu/rpkm66-go-proto/rpkm66/file/file/v1" "github.com/stretchr/testify/mock" "google.golang.org/grpc" ) diff --git a/mocks/group/group.mock.go b/mocks/group/group.mock.go index f666d02..8ea7524 100644 --- a/mocks/group/group.mock.go +++ b/mocks/group/group.mock.go @@ -4,7 +4,7 @@ import ( "context" "github.com/isd-sgcu/rpkm66-gateway/internal/dto" - "github.com/isd-sgcu/rpkm66-gateway/proto" + proto "github.com/isd-sgcu/rpkm66-go-proto/rpkm66/backend/group/v1" "github.com/stretchr/testify/mock" "google.golang.org/grpc" ) diff --git a/mocks/user/user.mock.go b/mocks/user/user.mock.go index 246abd1..326cc77 100644 --- a/mocks/user/user.mock.go +++ b/mocks/user/user.mock.go @@ -4,7 +4,7 @@ import ( "context" "github.com/isd-sgcu/rpkm66-gateway/internal/dto" - "github.com/isd-sgcu/rpkm66-gateway/proto" + proto "github.com/isd-sgcu/rpkm66-go-proto/rpkm66/backend/user/v1" "github.com/stretchr/testify/mock" "google.golang.org/grpc" ) diff --git a/pkg/service/auth/auth.service.go b/pkg/service/auth/auth.service.go index d040d73..f3dbee6 100644 --- a/pkg/service/auth/auth.service.go +++ b/pkg/service/auth/auth.service.go @@ -3,7 +3,7 @@ package auth import ( "github.com/isd-sgcu/rpkm66-gateway/internal/dto" "github.com/isd-sgcu/rpkm66-gateway/internal/service/auth" - "github.com/isd-sgcu/rpkm66-gateway/proto" + proto "github.com/isd-sgcu/rpkm66-go-proto/rpkm66/auth/auth/v1" ) type Service interface { diff --git a/pkg/service/baan/baan.service.go b/pkg/service/baan/baan.service.go index d3abb5d..ff336e8 100644 --- a/pkg/service/baan/baan.service.go +++ b/pkg/service/baan/baan.service.go @@ -3,7 +3,7 @@ package baan import ( "github.com/isd-sgcu/rpkm66-gateway/internal/dto" "github.com/isd-sgcu/rpkm66-gateway/internal/service/baan" - "github.com/isd-sgcu/rpkm66-gateway/proto" + proto "github.com/isd-sgcu/rpkm66-go-proto/rpkm66/backend/baan/v1" ) type Service interface { diff --git a/pkg/service/checkin/checkin.service.go b/pkg/service/checkin/checkin.service.go index 0f692f8..18d531b 100644 --- a/pkg/service/checkin/checkin.service.go +++ b/pkg/service/checkin/checkin.service.go @@ -3,7 +3,7 @@ package checkin import ( "github.com/isd-sgcu/rpkm66-gateway/internal/dto" "github.com/isd-sgcu/rpkm66-gateway/internal/service/checkin" - "github.com/isd-sgcu/rpkm66-gateway/proto" + proto "github.com/isd-sgcu/rpkm66-go-proto/rpkm66/backend/checkin/v1" ) type Service interface { diff --git a/pkg/service/estamp/estamp.service.go b/pkg/service/estamp/estamp.service.go index 3b3c202..c2135a2 100644 --- a/pkg/service/estamp/estamp.service.go +++ b/pkg/service/estamp/estamp.service.go @@ -3,7 +3,7 @@ package estamp import ( "github.com/isd-sgcu/rpkm66-gateway/internal/dto" "github.com/isd-sgcu/rpkm66-gateway/internal/service/estamp" - "github.com/isd-sgcu/rpkm66-gateway/proto" + proto "github.com/isd-sgcu/rpkm66-go-proto/rpkm66/backend/event/v1" ) type Service interface { diff --git a/pkg/service/file/file.service.go b/pkg/service/file/file.service.go index c943448..6c3e437 100644 --- a/pkg/service/file/file.service.go +++ b/pkg/service/file/file.service.go @@ -4,7 +4,7 @@ import ( fileConst "github.com/isd-sgcu/rpkm66-gateway/constant/file" "github.com/isd-sgcu/rpkm66-gateway/internal/dto" "github.com/isd-sgcu/rpkm66-gateway/internal/service/file" - "github.com/isd-sgcu/rpkm66-gateway/proto" + proto "github.com/isd-sgcu/rpkm66-go-proto/rpkm66/file/file/v1" ) type Service interface { diff --git a/pkg/service/group/group.service.go b/pkg/service/group/group.service.go index bb566d1..654f34b 100644 --- a/pkg/service/group/group.service.go +++ b/pkg/service/group/group.service.go @@ -3,7 +3,7 @@ package group import ( "github.com/isd-sgcu/rpkm66-gateway/internal/dto" "github.com/isd-sgcu/rpkm66-gateway/internal/service/group" - "github.com/isd-sgcu/rpkm66-gateway/proto" + proto "github.com/isd-sgcu/rpkm66-go-proto/rpkm66/backend/group/v1" ) type Service interface { diff --git a/pkg/service/user/user.service.go b/pkg/service/user/user.service.go index 1fbc713..f977f32 100644 --- a/pkg/service/user/user.service.go +++ b/pkg/service/user/user.service.go @@ -3,7 +3,7 @@ package user import ( "github.com/isd-sgcu/rpkm66-gateway/internal/dto" "github.com/isd-sgcu/rpkm66-gateway/internal/service/user" - "github.com/isd-sgcu/rpkm66-gateway/proto" + proto "github.com/isd-sgcu/rpkm66-go-proto/rpkm66/backend/user/v1" ) type Service interface { diff --git a/proto/auth.pb.go b/proto/auth.pb.go deleted file mode 100644 index 9468556..0000000 --- a/proto/auth.pb.go +++ /dev/null @@ -1,574 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.0 -// protoc v3.19.4 -// source: auth.proto - -package proto - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type Credential struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - AccessToken string `protobuf:"bytes,1,opt,name=accessToken,proto3" json:"accessToken,omitempty"` - RefreshToken string `protobuf:"bytes,2,opt,name=refreshToken,proto3" json:"refreshToken,omitempty"` - ExpiresIn int32 `protobuf:"varint,3,opt,name=expiresIn,proto3" json:"expiresIn,omitempty"` -} - -func (x *Credential) Reset() { - *x = Credential{} - if protoimpl.UnsafeEnabled { - mi := &file_auth_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Credential) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Credential) ProtoMessage() {} - -func (x *Credential) ProtoReflect() protoreflect.Message { - mi := &file_auth_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Credential.ProtoReflect.Descriptor instead. -func (*Credential) Descriptor() ([]byte, []int) { - return file_auth_proto_rawDescGZIP(), []int{0} -} - -func (x *Credential) GetAccessToken() string { - if x != nil { - return x.AccessToken - } - return "" -} - -func (x *Credential) GetRefreshToken() string { - if x != nil { - return x.RefreshToken - } - return "" -} - -func (x *Credential) GetExpiresIn() int32 { - if x != nil { - return x.ExpiresIn - } - return 0 -} - -type VerifyTicketRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Ticket string `protobuf:"bytes,1,opt,name=ticket,proto3" json:"ticket,omitempty"` -} - -func (x *VerifyTicketRequest) Reset() { - *x = VerifyTicketRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_auth_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *VerifyTicketRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*VerifyTicketRequest) ProtoMessage() {} - -func (x *VerifyTicketRequest) ProtoReflect() protoreflect.Message { - mi := &file_auth_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use VerifyTicketRequest.ProtoReflect.Descriptor instead. -func (*VerifyTicketRequest) Descriptor() ([]byte, []int) { - return file_auth_proto_rawDescGZIP(), []int{1} -} - -func (x *VerifyTicketRequest) GetTicket() string { - if x != nil { - return x.Ticket - } - return "" -} - -type VerifyTicketResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Credential *Credential `protobuf:"bytes,1,opt,name=credential,proto3" json:"credential,omitempty"` -} - -func (x *VerifyTicketResponse) Reset() { - *x = VerifyTicketResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_auth_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *VerifyTicketResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*VerifyTicketResponse) ProtoMessage() {} - -func (x *VerifyTicketResponse) ProtoReflect() protoreflect.Message { - mi := &file_auth_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use VerifyTicketResponse.ProtoReflect.Descriptor instead. -func (*VerifyTicketResponse) Descriptor() ([]byte, []int) { - return file_auth_proto_rawDescGZIP(), []int{2} -} - -func (x *VerifyTicketResponse) GetCredential() *Credential { - if x != nil { - return x.Credential - } - return nil -} - -type ValidateRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` -} - -func (x *ValidateRequest) Reset() { - *x = ValidateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_auth_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ValidateRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ValidateRequest) ProtoMessage() {} - -func (x *ValidateRequest) ProtoReflect() protoreflect.Message { - mi := &file_auth_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ValidateRequest.ProtoReflect.Descriptor instead. -func (*ValidateRequest) Descriptor() ([]byte, []int) { - return file_auth_proto_rawDescGZIP(), []int{3} -} - -func (x *ValidateRequest) GetToken() string { - if x != nil { - return x.Token - } - return "" -} - -type ValidateResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - UserId string `protobuf:"bytes,1,opt,name=userId,proto3" json:"userId,omitempty"` - Role string `protobuf:"bytes,2,opt,name=role,proto3" json:"role,omitempty"` -} - -func (x *ValidateResponse) Reset() { - *x = ValidateResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_auth_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ValidateResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ValidateResponse) ProtoMessage() {} - -func (x *ValidateResponse) ProtoReflect() protoreflect.Message { - mi := &file_auth_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ValidateResponse.ProtoReflect.Descriptor instead. -func (*ValidateResponse) Descriptor() ([]byte, []int) { - return file_auth_proto_rawDescGZIP(), []int{4} -} - -func (x *ValidateResponse) GetUserId() string { - if x != nil { - return x.UserId - } - return "" -} - -func (x *ValidateResponse) GetRole() string { - if x != nil { - return x.Role - } - return "" -} - -type RefreshTokenRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - RefreshToken string `protobuf:"bytes,1,opt,name=refreshToken,proto3" json:"refreshToken,omitempty"` -} - -func (x *RefreshTokenRequest) Reset() { - *x = RefreshTokenRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_auth_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RefreshTokenRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RefreshTokenRequest) ProtoMessage() {} - -func (x *RefreshTokenRequest) ProtoReflect() protoreflect.Message { - mi := &file_auth_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RefreshTokenRequest.ProtoReflect.Descriptor instead. -func (*RefreshTokenRequest) Descriptor() ([]byte, []int) { - return file_auth_proto_rawDescGZIP(), []int{5} -} - -func (x *RefreshTokenRequest) GetRefreshToken() string { - if x != nil { - return x.RefreshToken - } - return "" -} - -type RefreshTokenResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Credential *Credential `protobuf:"bytes,1,opt,name=credential,proto3" json:"credential,omitempty"` -} - -func (x *RefreshTokenResponse) Reset() { - *x = RefreshTokenResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_auth_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RefreshTokenResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RefreshTokenResponse) ProtoMessage() {} - -func (x *RefreshTokenResponse) ProtoReflect() protoreflect.Message { - mi := &file_auth_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RefreshTokenResponse.ProtoReflect.Descriptor instead. -func (*RefreshTokenResponse) Descriptor() ([]byte, []int) { - return file_auth_proto_rawDescGZIP(), []int{6} -} - -func (x *RefreshTokenResponse) GetCredential() *Credential { - if x != nil { - return x.Credential - } - return nil -} - -var File_auth_proto protoreflect.FileDescriptor - -var file_auth_proto_rawDesc = []byte{ - 0x0a, 0x0a, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x04, 0x61, 0x75, - 0x74, 0x68, 0x22, 0x70, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, - 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, - 0x65, 0x6e, 0x12, 0x22, 0x0a, 0x0c, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x6f, 0x6b, - 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, - 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, - 0x73, 0x49, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, - 0x65, 0x73, 0x49, 0x6e, 0x22, 0x2d, 0x0a, 0x13, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x54, 0x69, - 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x74, - 0x69, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x69, 0x63, - 0x6b, 0x65, 0x74, 0x22, 0x48, 0x0a, 0x14, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x54, 0x69, 0x63, - 0x6b, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x0a, 0x63, - 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x10, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, - 0x6c, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x22, 0x27, 0x0a, - 0x0f, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x3e, 0x0a, 0x10, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, - 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, - 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x22, 0x39, 0x0a, 0x13, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, - 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x22, 0x0a, - 0x0c, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65, - 0x6e, 0x22, 0x48, 0x0a, 0x14, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65, - 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x0a, 0x63, 0x72, 0x65, - 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, - 0x61, 0x75, 0x74, 0x68, 0x2e, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x52, - 0x0a, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x32, 0xdc, 0x01, 0x0a, 0x0b, - 0x41, 0x75, 0x74, 0x68, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x47, 0x0a, 0x0c, 0x56, - 0x65, 0x72, 0x69, 0x66, 0x79, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x19, 0x2e, 0x61, 0x75, - 0x74, 0x68, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x56, 0x65, - 0x72, 0x69, 0x66, 0x79, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x12, 0x3b, 0x0a, 0x08, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, - 0x12, 0x15, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x56, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x12, 0x47, 0x0a, 0x0c, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65, - 0x6e, 0x12, 0x19, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, - 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x61, - 0x75, 0x74, 0x68, 0x2e, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x0b, 0x5a, 0x09, 0x73, 0x72, - 0x63, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_auth_proto_rawDescOnce sync.Once - file_auth_proto_rawDescData = file_auth_proto_rawDesc -) - -func file_auth_proto_rawDescGZIP() []byte { - file_auth_proto_rawDescOnce.Do(func() { - file_auth_proto_rawDescData = protoimpl.X.CompressGZIP(file_auth_proto_rawDescData) - }) - return file_auth_proto_rawDescData -} - -var file_auth_proto_msgTypes = make([]protoimpl.MessageInfo, 7) -var file_auth_proto_goTypes = []interface{}{ - (*Credential)(nil), // 0: auth.Credential - (*VerifyTicketRequest)(nil), // 1: auth.VerifyTicketRequest - (*VerifyTicketResponse)(nil), // 2: auth.VerifyTicketResponse - (*ValidateRequest)(nil), // 3: auth.ValidateRequest - (*ValidateResponse)(nil), // 4: auth.ValidateResponse - (*RefreshTokenRequest)(nil), // 5: auth.RefreshTokenRequest - (*RefreshTokenResponse)(nil), // 6: auth.RefreshTokenResponse -} -var file_auth_proto_depIdxs = []int32{ - 0, // 0: auth.VerifyTicketResponse.credential:type_name -> auth.Credential - 0, // 1: auth.RefreshTokenResponse.credential:type_name -> auth.Credential - 1, // 2: auth.AuthService.VerifyTicket:input_type -> auth.VerifyTicketRequest - 3, // 3: auth.AuthService.Validate:input_type -> auth.ValidateRequest - 5, // 4: auth.AuthService.RefreshToken:input_type -> auth.RefreshTokenRequest - 2, // 5: auth.AuthService.VerifyTicket:output_type -> auth.VerifyTicketResponse - 4, // 6: auth.AuthService.Validate:output_type -> auth.ValidateResponse - 6, // 7: auth.AuthService.RefreshToken:output_type -> auth.RefreshTokenResponse - 5, // [5:8] is the sub-list for method output_type - 2, // [2:5] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_auth_proto_init() } -func file_auth_proto_init() { - if File_auth_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_auth_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Credential); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_auth_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VerifyTicketRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_auth_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VerifyTicketResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_auth_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ValidateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_auth_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ValidateResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_auth_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RefreshTokenRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_auth_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RefreshTokenResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_auth_proto_rawDesc, - NumEnums: 0, - NumMessages: 7, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_auth_proto_goTypes, - DependencyIndexes: file_auth_proto_depIdxs, - MessageInfos: file_auth_proto_msgTypes, - }.Build() - File_auth_proto = out.File - file_auth_proto_rawDesc = nil - file_auth_proto_goTypes = nil - file_auth_proto_depIdxs = nil -} diff --git a/proto/auth.proto b/proto/auth.proto deleted file mode 100644 index d606cb5..0000000 --- a/proto/auth.proto +++ /dev/null @@ -1,48 +0,0 @@ -syntax = "proto3"; - -package auth; - -option go_package = "proto"; - -service AuthService { - rpc VerifyTicket(VerifyTicketRequest) returns (VerifyTicketResponse){} - rpc Validate(ValidateRequest) returns (ValidateResponse){} - rpc RefreshToken(RefreshTokenRequest) returns (RefreshTokenResponse){} -} - -message Credential{ - string accessToken = 1; - string refreshToken = 2; - int32 expiresIn = 3; -} - -// Verify - -message VerifyTicketRequest{ - string ticket = 1; -} - -message VerifyTicketResponse{ - Credential credential = 1; -} - -// Validate - -message ValidateRequest{ - string token = 1; -} - -message ValidateResponse{ - string userId = 1; - string role = 2; -} - -// Redeem Refresh Token - -message RefreshTokenRequest{ - string refreshToken = 1; -} - -message RefreshTokenResponse{ - Credential credential = 1; -} diff --git a/proto/auth_grpc.pb.go b/proto/auth_grpc.pb.go deleted file mode 100644 index 5f3ff0d..0000000 --- a/proto/auth_grpc.pb.go +++ /dev/null @@ -1,177 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc v3.19.4 -// source: auth.proto - -package proto - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -// AuthServiceClient is the client API for AuthService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type AuthServiceClient interface { - VerifyTicket(ctx context.Context, in *VerifyTicketRequest, opts ...grpc.CallOption) (*VerifyTicketResponse, error) - Validate(ctx context.Context, in *ValidateRequest, opts ...grpc.CallOption) (*ValidateResponse, error) - RefreshToken(ctx context.Context, in *RefreshTokenRequest, opts ...grpc.CallOption) (*RefreshTokenResponse, error) -} - -type authServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewAuthServiceClient(cc grpc.ClientConnInterface) AuthServiceClient { - return &authServiceClient{cc} -} - -func (c *authServiceClient) VerifyTicket(ctx context.Context, in *VerifyTicketRequest, opts ...grpc.CallOption) (*VerifyTicketResponse, error) { - out := new(VerifyTicketResponse) - err := c.cc.Invoke(ctx, "/auth.AuthService/VerifyTicket", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *authServiceClient) Validate(ctx context.Context, in *ValidateRequest, opts ...grpc.CallOption) (*ValidateResponse, error) { - out := new(ValidateResponse) - err := c.cc.Invoke(ctx, "/auth.AuthService/Validate", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *authServiceClient) RefreshToken(ctx context.Context, in *RefreshTokenRequest, opts ...grpc.CallOption) (*RefreshTokenResponse, error) { - out := new(RefreshTokenResponse) - err := c.cc.Invoke(ctx, "/auth.AuthService/RefreshToken", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// AuthServiceServer is the server API for AuthService service. -// All implementations must embed UnimplementedAuthServiceServer -// for forward compatibility -type AuthServiceServer interface { - VerifyTicket(context.Context, *VerifyTicketRequest) (*VerifyTicketResponse, error) - Validate(context.Context, *ValidateRequest) (*ValidateResponse, error) - RefreshToken(context.Context, *RefreshTokenRequest) (*RefreshTokenResponse, error) - mustEmbedUnimplementedAuthServiceServer() -} - -// UnimplementedAuthServiceServer must be embedded to have forward compatible implementations. -type UnimplementedAuthServiceServer struct { -} - -func (UnimplementedAuthServiceServer) VerifyTicket(context.Context, *VerifyTicketRequest) (*VerifyTicketResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method VerifyTicket not implemented") -} -func (UnimplementedAuthServiceServer) Validate(context.Context, *ValidateRequest) (*ValidateResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Validate not implemented") -} -func (UnimplementedAuthServiceServer) RefreshToken(context.Context, *RefreshTokenRequest) (*RefreshTokenResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RefreshToken not implemented") -} -func (UnimplementedAuthServiceServer) mustEmbedUnimplementedAuthServiceServer() {} - -// UnsafeAuthServiceServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to AuthServiceServer will -// result in compilation errors. -type UnsafeAuthServiceServer interface { - mustEmbedUnimplementedAuthServiceServer() -} - -func RegisterAuthServiceServer(s grpc.ServiceRegistrar, srv AuthServiceServer) { - s.RegisterService(&AuthService_ServiceDesc, srv) -} - -func _AuthService_VerifyTicket_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(VerifyTicketRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AuthServiceServer).VerifyTicket(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/auth.AuthService/VerifyTicket", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthServiceServer).VerifyTicket(ctx, req.(*VerifyTicketRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AuthService_Validate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ValidateRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AuthServiceServer).Validate(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/auth.AuthService/Validate", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthServiceServer).Validate(ctx, req.(*ValidateRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AuthService_RefreshToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RefreshTokenRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AuthServiceServer).RefreshToken(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/auth.AuthService/RefreshToken", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthServiceServer).RefreshToken(ctx, req.(*RefreshTokenRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// AuthService_ServiceDesc is the grpc.ServiceDesc for AuthService service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var AuthService_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "auth.AuthService", - HandlerType: (*AuthServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "VerifyTicket", - Handler: _AuthService_VerifyTicket_Handler, - }, - { - MethodName: "Validate", - Handler: _AuthService_Validate_Handler, - }, - { - MethodName: "RefreshToken", - Handler: _AuthService_RefreshToken_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "auth.proto", -} diff --git a/proto/baan.pb.go b/proto/baan.pb.go deleted file mode 100644 index 58f4a4e..0000000 --- a/proto/baan.pb.go +++ /dev/null @@ -1,673 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.0 -// protoc v3.19.4 -// source: baan.proto - -package proto - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type BaanSize int32 - -const ( - BaanSize_UNKNOWN BaanSize = 0 - BaanSize_S BaanSize = 1 - BaanSize_M BaanSize = 2 - BaanSize_L BaanSize = 3 - BaanSize_XL BaanSize = 4 - BaanSize_XXL BaanSize = 5 -) - -// Enum value maps for BaanSize. -var ( - BaanSize_name = map[int32]string{ - 0: "UNKNOWN", - 1: "S", - 2: "M", - 3: "L", - 4: "XL", - 5: "XXL", - } - BaanSize_value = map[string]int32{ - "UNKNOWN": 0, - "S": 1, - "M": 2, - "L": 3, - "XL": 4, - "XXL": 5, - } -) - -func (x BaanSize) Enum() *BaanSize { - p := new(BaanSize) - *p = x - return p -} - -func (x BaanSize) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (BaanSize) Descriptor() protoreflect.EnumDescriptor { - return file_baan_proto_enumTypes[0].Descriptor() -} - -func (BaanSize) Type() protoreflect.EnumType { - return &file_baan_proto_enumTypes[0] -} - -func (x BaanSize) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use BaanSize.Descriptor instead. -func (BaanSize) EnumDescriptor() ([]byte, []int) { - return file_baan_proto_rawDescGZIP(), []int{0} -} - -type Baan struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - NameTH string `protobuf:"bytes,2,opt,name=nameTH,proto3" json:"nameTH,omitempty"` - DescriptionTH string `protobuf:"bytes,3,opt,name=descriptionTH,proto3" json:"descriptionTH,omitempty"` - NameEN string `protobuf:"bytes,4,opt,name=nameEN,proto3" json:"nameEN,omitempty"` - DescriptionEN string `protobuf:"bytes,5,opt,name=descriptionEN,proto3" json:"descriptionEN,omitempty"` - Size BaanSize `protobuf:"varint,6,opt,name=size,proto3,enum=baan.BaanSize" json:"size,omitempty"` - Facebook string `protobuf:"bytes,7,opt,name=facebook,proto3" json:"facebook,omitempty"` - FacebookUrl string `protobuf:"bytes,8,opt,name=facebookUrl,proto3" json:"facebookUrl,omitempty"` - Instagram string `protobuf:"bytes,9,opt,name=instagram,proto3" json:"instagram,omitempty"` - InstagramUrl string `protobuf:"bytes,10,opt,name=instagramUrl,proto3" json:"instagramUrl,omitempty"` - Line string `protobuf:"bytes,11,opt,name=line,proto3" json:"line,omitempty"` - LineUrl string `protobuf:"bytes,12,opt,name=lineUrl,proto3" json:"lineUrl,omitempty"` - ImageUrl string `protobuf:"bytes,13,opt,name=imageUrl,proto3" json:"imageUrl,omitempty"` -} - -func (x *Baan) Reset() { - *x = Baan{} - if protoimpl.UnsafeEnabled { - mi := &file_baan_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Baan) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Baan) ProtoMessage() {} - -func (x *Baan) ProtoReflect() protoreflect.Message { - mi := &file_baan_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Baan.ProtoReflect.Descriptor instead. -func (*Baan) Descriptor() ([]byte, []int) { - return file_baan_proto_rawDescGZIP(), []int{0} -} - -func (x *Baan) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *Baan) GetNameTH() string { - if x != nil { - return x.NameTH - } - return "" -} - -func (x *Baan) GetDescriptionTH() string { - if x != nil { - return x.DescriptionTH - } - return "" -} - -func (x *Baan) GetNameEN() string { - if x != nil { - return x.NameEN - } - return "" -} - -func (x *Baan) GetDescriptionEN() string { - if x != nil { - return x.DescriptionEN - } - return "" -} - -func (x *Baan) GetSize() BaanSize { - if x != nil { - return x.Size - } - return BaanSize_UNKNOWN -} - -func (x *Baan) GetFacebook() string { - if x != nil { - return x.Facebook - } - return "" -} - -func (x *Baan) GetFacebookUrl() string { - if x != nil { - return x.FacebookUrl - } - return "" -} - -func (x *Baan) GetInstagram() string { - if x != nil { - return x.Instagram - } - return "" -} - -func (x *Baan) GetInstagramUrl() string { - if x != nil { - return x.InstagramUrl - } - return "" -} - -func (x *Baan) GetLine() string { - if x != nil { - return x.Line - } - return "" -} - -func (x *Baan) GetLineUrl() string { - if x != nil { - return x.LineUrl - } - return "" -} - -func (x *Baan) GetImageUrl() string { - if x != nil { - return x.ImageUrl - } - return "" -} - -type BaanInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - NameTH string `protobuf:"bytes,2,opt,name=nameTH,proto3" json:"nameTH,omitempty"` - NameEN string `protobuf:"bytes,3,opt,name=nameEN,proto3" json:"nameEN,omitempty"` - ImageUrl string `protobuf:"bytes,4,opt,name=imageUrl,proto3" json:"imageUrl,omitempty"` -} - -func (x *BaanInfo) Reset() { - *x = BaanInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_baan_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *BaanInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BaanInfo) ProtoMessage() {} - -func (x *BaanInfo) ProtoReflect() protoreflect.Message { - mi := &file_baan_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use BaanInfo.ProtoReflect.Descriptor instead. -func (*BaanInfo) Descriptor() ([]byte, []int) { - return file_baan_proto_rawDescGZIP(), []int{1} -} - -func (x *BaanInfo) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *BaanInfo) GetNameTH() string { - if x != nil { - return x.NameTH - } - return "" -} - -func (x *BaanInfo) GetNameEN() string { - if x != nil { - return x.NameEN - } - return "" -} - -func (x *BaanInfo) GetImageUrl() string { - if x != nil { - return x.ImageUrl - } - return "" -} - -type FindAllBaanRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *FindAllBaanRequest) Reset() { - *x = FindAllBaanRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_baan_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FindAllBaanRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FindAllBaanRequest) ProtoMessage() {} - -func (x *FindAllBaanRequest) ProtoReflect() protoreflect.Message { - mi := &file_baan_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FindAllBaanRequest.ProtoReflect.Descriptor instead. -func (*FindAllBaanRequest) Descriptor() ([]byte, []int) { - return file_baan_proto_rawDescGZIP(), []int{2} -} - -type FindAllBaanResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Baans []*Baan `protobuf:"bytes,1,rep,name=baans,proto3" json:"baans,omitempty"` -} - -func (x *FindAllBaanResponse) Reset() { - *x = FindAllBaanResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_baan_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FindAllBaanResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FindAllBaanResponse) ProtoMessage() {} - -func (x *FindAllBaanResponse) ProtoReflect() protoreflect.Message { - mi := &file_baan_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FindAllBaanResponse.ProtoReflect.Descriptor instead. -func (*FindAllBaanResponse) Descriptor() ([]byte, []int) { - return file_baan_proto_rawDescGZIP(), []int{3} -} - -func (x *FindAllBaanResponse) GetBaans() []*Baan { - if x != nil { - return x.Baans - } - return nil -} - -type FindOneBaanRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` -} - -func (x *FindOneBaanRequest) Reset() { - *x = FindOneBaanRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_baan_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FindOneBaanRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FindOneBaanRequest) ProtoMessage() {} - -func (x *FindOneBaanRequest) ProtoReflect() protoreflect.Message { - mi := &file_baan_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FindOneBaanRequest.ProtoReflect.Descriptor instead. -func (*FindOneBaanRequest) Descriptor() ([]byte, []int) { - return file_baan_proto_rawDescGZIP(), []int{4} -} - -func (x *FindOneBaanRequest) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -type FindOneBaanResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Baan *Baan `protobuf:"bytes,1,opt,name=baan,proto3" json:"baan,omitempty"` -} - -func (x *FindOneBaanResponse) Reset() { - *x = FindOneBaanResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_baan_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FindOneBaanResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FindOneBaanResponse) ProtoMessage() {} - -func (x *FindOneBaanResponse) ProtoReflect() protoreflect.Message { - mi := &file_baan_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FindOneBaanResponse.ProtoReflect.Descriptor instead. -func (*FindOneBaanResponse) Descriptor() ([]byte, []int) { - return file_baan_proto_rawDescGZIP(), []int{5} -} - -func (x *FindOneBaanResponse) GetBaan() *Baan { - if x != nil { - return x.Baan - } - return nil -} - -var File_baan_proto protoreflect.FileDescriptor - -var file_baan_proto_rawDesc = []byte{ - 0x0a, 0x0a, 0x62, 0x61, 0x61, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x04, 0x62, 0x61, - 0x61, 0x6e, 0x22, 0x80, 0x03, 0x0a, 0x04, 0x42, 0x61, 0x61, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6e, - 0x61, 0x6d, 0x65, 0x54, 0x48, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6e, 0x61, 0x6d, - 0x65, 0x54, 0x48, 0x12, 0x24, 0x0a, 0x0d, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x54, 0x48, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x64, 0x65, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x48, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x61, 0x6d, - 0x65, 0x45, 0x4e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6e, 0x61, 0x6d, 0x65, 0x45, - 0x4e, 0x12, 0x24, 0x0a, 0x0d, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x45, 0x4e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x4e, 0x12, 0x22, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0e, 0x2e, 0x62, 0x61, 0x61, 0x6e, 0x2e, 0x42, 0x61, 0x61, - 0x6e, 0x53, 0x69, 0x7a, 0x65, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x66, - 0x61, 0x63, 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, - 0x61, 0x63, 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x12, 0x20, 0x0a, 0x0b, 0x66, 0x61, 0x63, 0x65, 0x62, - 0x6f, 0x6f, 0x6b, 0x55, 0x72, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x66, 0x61, - 0x63, 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x55, 0x72, 0x6c, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x6e, 0x73, - 0x74, 0x61, 0x67, 0x72, 0x61, 0x6d, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x69, 0x6e, - 0x73, 0x74, 0x61, 0x67, 0x72, 0x61, 0x6d, 0x12, 0x22, 0x0a, 0x0c, 0x69, 0x6e, 0x73, 0x74, 0x61, - 0x67, 0x72, 0x61, 0x6d, 0x55, 0x72, 0x6c, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x69, - 0x6e, 0x73, 0x74, 0x61, 0x67, 0x72, 0x61, 0x6d, 0x55, 0x72, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x6c, - 0x69, 0x6e, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x12, - 0x18, 0x0a, 0x07, 0x6c, 0x69, 0x6e, 0x65, 0x55, 0x72, 0x6c, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x6c, 0x69, 0x6e, 0x65, 0x55, 0x72, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6d, 0x61, - 0x67, 0x65, 0x55, 0x72, 0x6c, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, 0x6d, 0x61, - 0x67, 0x65, 0x55, 0x72, 0x6c, 0x22, 0x66, 0x0a, 0x08, 0x42, 0x61, 0x61, 0x6e, 0x49, 0x6e, 0x66, - 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, - 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x61, 0x6d, 0x65, 0x54, 0x48, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x6e, 0x61, 0x6d, 0x65, 0x54, 0x48, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x61, 0x6d, - 0x65, 0x45, 0x4e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6e, 0x61, 0x6d, 0x65, 0x45, - 0x4e, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x55, 0x72, 0x6c, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x55, 0x72, 0x6c, 0x22, 0x14, 0x0a, - 0x12, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x42, 0x61, 0x61, 0x6e, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x22, 0x37, 0x0a, 0x13, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x42, 0x61, - 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x20, 0x0a, 0x05, 0x62, 0x61, - 0x61, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x62, 0x61, 0x61, 0x6e, - 0x2e, 0x42, 0x61, 0x61, 0x6e, 0x52, 0x05, 0x62, 0x61, 0x61, 0x6e, 0x73, 0x22, 0x24, 0x0a, 0x12, - 0x46, 0x69, 0x6e, 0x64, 0x4f, 0x6e, 0x65, 0x42, 0x61, 0x61, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, - 0x69, 0x64, 0x22, 0x35, 0x0a, 0x13, 0x46, 0x69, 0x6e, 0x64, 0x4f, 0x6e, 0x65, 0x42, 0x61, 0x61, - 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x04, 0x62, 0x61, 0x61, - 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x62, 0x61, 0x61, 0x6e, 0x2e, 0x42, - 0x61, 0x61, 0x6e, 0x52, 0x04, 0x62, 0x61, 0x61, 0x6e, 0x2a, 0x3d, 0x0a, 0x08, 0x42, 0x61, 0x61, - 0x6e, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, - 0x10, 0x00, 0x12, 0x05, 0x0a, 0x01, 0x53, 0x10, 0x01, 0x12, 0x05, 0x0a, 0x01, 0x4d, 0x10, 0x02, - 0x12, 0x05, 0x0a, 0x01, 0x4c, 0x10, 0x03, 0x12, 0x06, 0x0a, 0x02, 0x58, 0x4c, 0x10, 0x04, 0x12, - 0x07, 0x0a, 0x03, 0x58, 0x58, 0x4c, 0x10, 0x05, 0x32, 0x99, 0x01, 0x0a, 0x0b, 0x42, 0x61, 0x61, - 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x44, 0x0a, 0x0b, 0x46, 0x69, 0x6e, 0x64, - 0x41, 0x6c, 0x6c, 0x42, 0x61, 0x61, 0x6e, 0x12, 0x18, 0x2e, 0x62, 0x61, 0x61, 0x6e, 0x2e, 0x46, - 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x42, 0x61, 0x61, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x19, 0x2e, 0x62, 0x61, 0x61, 0x6e, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, - 0x42, 0x61, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x44, - 0x0a, 0x0b, 0x46, 0x69, 0x6e, 0x64, 0x4f, 0x6e, 0x65, 0x42, 0x61, 0x61, 0x6e, 0x12, 0x18, 0x2e, - 0x62, 0x61, 0x61, 0x6e, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x4f, 0x6e, 0x65, 0x42, 0x61, 0x61, 0x6e, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x62, 0x61, 0x61, 0x6e, 0x2e, 0x46, - 0x69, 0x6e, 0x64, 0x4f, 0x6e, 0x65, 0x42, 0x61, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x42, 0x0b, 0x5a, 0x09, 0x73, 0x72, 0x63, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_baan_proto_rawDescOnce sync.Once - file_baan_proto_rawDescData = file_baan_proto_rawDesc -) - -func file_baan_proto_rawDescGZIP() []byte { - file_baan_proto_rawDescOnce.Do(func() { - file_baan_proto_rawDescData = protoimpl.X.CompressGZIP(file_baan_proto_rawDescData) - }) - return file_baan_proto_rawDescData -} - -var file_baan_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_baan_proto_msgTypes = make([]protoimpl.MessageInfo, 6) -var file_baan_proto_goTypes = []interface{}{ - (BaanSize)(0), // 0: baan.BaanSize - (*Baan)(nil), // 1: baan.Baan - (*BaanInfo)(nil), // 2: baan.BaanInfo - (*FindAllBaanRequest)(nil), // 3: baan.FindAllBaanRequest - (*FindAllBaanResponse)(nil), // 4: baan.FindAllBaanResponse - (*FindOneBaanRequest)(nil), // 5: baan.FindOneBaanRequest - (*FindOneBaanResponse)(nil), // 6: baan.FindOneBaanResponse -} -var file_baan_proto_depIdxs = []int32{ - 0, // 0: baan.Baan.size:type_name -> baan.BaanSize - 1, // 1: baan.FindAllBaanResponse.baans:type_name -> baan.Baan - 1, // 2: baan.FindOneBaanResponse.baan:type_name -> baan.Baan - 3, // 3: baan.BaanService.FindAllBaan:input_type -> baan.FindAllBaanRequest - 5, // 4: baan.BaanService.FindOneBaan:input_type -> baan.FindOneBaanRequest - 4, // 5: baan.BaanService.FindAllBaan:output_type -> baan.FindAllBaanResponse - 6, // 6: baan.BaanService.FindOneBaan:output_type -> baan.FindOneBaanResponse - 5, // [5:7] is the sub-list for method output_type - 3, // [3:5] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name -} - -func init() { file_baan_proto_init() } -func file_baan_proto_init() { - if File_baan_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_baan_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Baan); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_baan_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BaanInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_baan_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FindAllBaanRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_baan_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FindAllBaanResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_baan_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FindOneBaanRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_baan_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FindOneBaanResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_baan_proto_rawDesc, - NumEnums: 1, - NumMessages: 6, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_baan_proto_goTypes, - DependencyIndexes: file_baan_proto_depIdxs, - EnumInfos: file_baan_proto_enumTypes, - MessageInfos: file_baan_proto_msgTypes, - }.Build() - File_baan_proto = out.File - file_baan_proto_rawDesc = nil - file_baan_proto_goTypes = nil - file_baan_proto_depIdxs = nil -} diff --git a/proto/baan.proto b/proto/baan.proto deleted file mode 100644 index 77d6c6a..0000000 --- a/proto/baan.proto +++ /dev/null @@ -1,61 +0,0 @@ -syntax = "proto3"; - -package baan; - -option go_package = "proto"; - -service BaanService { - rpc FindAllBaan(FindAllBaanRequest) returns (FindAllBaanResponse) {} - rpc FindOneBaan(FindOneBaanRequest) returns (FindOneBaanResponse) {} -} - -enum BaanSize{ - UNKNOWN = 0; - S = 1; - M = 2; - L = 3; - XL = 4; - XXL = 5; -} - -message Baan{ - string id = 1; - string nameTH = 2; - string descriptionTH = 3; - string nameEN = 4; - string descriptionEN = 5; - BaanSize size = 6; - string facebook = 7; - string facebookUrl = 8; - string instagram = 9; - string instagramUrl = 10; - string line = 11; - string lineUrl = 12; - string imageUrl = 13; -} - -message BaanInfo{ - string id = 1; - string nameTH = 2; - string nameEN = 3; - string imageUrl = 4; -} - -// Find All Baan - -message FindAllBaanRequest{ -} - -message FindAllBaanResponse{ - repeated Baan baans = 1; -} - -// Find Baan - -message FindOneBaanRequest{ - string id = 1; -} - -message FindOneBaanResponse{ - Baan baan = 1; -} diff --git a/proto/baan_grpc.pb.go b/proto/baan_grpc.pb.go deleted file mode 100644 index b9fbacc..0000000 --- a/proto/baan_grpc.pb.go +++ /dev/null @@ -1,141 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc v3.19.4 -// source: baan.proto - -package proto - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -// BaanServiceClient is the client API for BaanService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type BaanServiceClient interface { - FindAllBaan(ctx context.Context, in *FindAllBaanRequest, opts ...grpc.CallOption) (*FindAllBaanResponse, error) - FindOneBaan(ctx context.Context, in *FindOneBaanRequest, opts ...grpc.CallOption) (*FindOneBaanResponse, error) -} - -type baanServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewBaanServiceClient(cc grpc.ClientConnInterface) BaanServiceClient { - return &baanServiceClient{cc} -} - -func (c *baanServiceClient) FindAllBaan(ctx context.Context, in *FindAllBaanRequest, opts ...grpc.CallOption) (*FindAllBaanResponse, error) { - out := new(FindAllBaanResponse) - err := c.cc.Invoke(ctx, "/baan.BaanService/FindAllBaan", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *baanServiceClient) FindOneBaan(ctx context.Context, in *FindOneBaanRequest, opts ...grpc.CallOption) (*FindOneBaanResponse, error) { - out := new(FindOneBaanResponse) - err := c.cc.Invoke(ctx, "/baan.BaanService/FindOneBaan", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// BaanServiceServer is the server API for BaanService service. -// All implementations must embed UnimplementedBaanServiceServer -// for forward compatibility -type BaanServiceServer interface { - FindAllBaan(context.Context, *FindAllBaanRequest) (*FindAllBaanResponse, error) - FindOneBaan(context.Context, *FindOneBaanRequest) (*FindOneBaanResponse, error) - mustEmbedUnimplementedBaanServiceServer() -} - -// UnimplementedBaanServiceServer must be embedded to have forward compatible implementations. -type UnimplementedBaanServiceServer struct { -} - -func (UnimplementedBaanServiceServer) FindAllBaan(context.Context, *FindAllBaanRequest) (*FindAllBaanResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method FindAllBaan not implemented") -} -func (UnimplementedBaanServiceServer) FindOneBaan(context.Context, *FindOneBaanRequest) (*FindOneBaanResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method FindOneBaan not implemented") -} -func (UnimplementedBaanServiceServer) mustEmbedUnimplementedBaanServiceServer() {} - -// UnsafeBaanServiceServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to BaanServiceServer will -// result in compilation errors. -type UnsafeBaanServiceServer interface { - mustEmbedUnimplementedBaanServiceServer() -} - -func RegisterBaanServiceServer(s grpc.ServiceRegistrar, srv BaanServiceServer) { - s.RegisterService(&BaanService_ServiceDesc, srv) -} - -func _BaanService_FindAllBaan_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(FindAllBaanRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(BaanServiceServer).FindAllBaan(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/baan.BaanService/FindAllBaan", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BaanServiceServer).FindAllBaan(ctx, req.(*FindAllBaanRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _BaanService_FindOneBaan_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(FindOneBaanRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(BaanServiceServer).FindOneBaan(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/baan.BaanService/FindOneBaan", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BaanServiceServer).FindOneBaan(ctx, req.(*FindOneBaanRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// BaanService_ServiceDesc is the grpc.ServiceDesc for BaanService service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var BaanService_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "baan.BaanService", - HandlerType: (*BaanServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "FindAllBaan", - Handler: _BaanService_FindAllBaan_Handler, - }, - { - MethodName: "FindOneBaan", - Handler: _BaanService_FindOneBaan_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "baan.proto", -} diff --git a/proto/checkin.pb.go b/proto/checkin.pb.go deleted file mode 100644 index 8e24ab2..0000000 --- a/proto/checkin.pb.go +++ /dev/null @@ -1,367 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.0 -// protoc v3.19.4 -// source: checkin.proto - -package proto - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type CheckinVerifyRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - EventType int32 `protobuf:"varint,2,opt,name=event_type,json=eventType,proto3" json:"event_type,omitempty"` -} - -func (x *CheckinVerifyRequest) Reset() { - *x = CheckinVerifyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_checkin_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CheckinVerifyRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CheckinVerifyRequest) ProtoMessage() {} - -func (x *CheckinVerifyRequest) ProtoReflect() protoreflect.Message { - mi := &file_checkin_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CheckinVerifyRequest.ProtoReflect.Descriptor instead. -func (*CheckinVerifyRequest) Descriptor() ([]byte, []int) { - return file_checkin_proto_rawDescGZIP(), []int{0} -} - -func (x *CheckinVerifyRequest) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *CheckinVerifyRequest) GetEventType() int32 { - if x != nil { - return x.EventType - } - return 0 -} - -type CheckinVerifyResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - CheckinToken string `protobuf:"bytes,1,opt,name=checkin_token,json=checkinToken,proto3" json:"checkin_token,omitempty"` - CheckinType int32 `protobuf:"varint,2,opt,name=checkin_type,json=checkinType,proto3" json:"checkin_type,omitempty"` -} - -func (x *CheckinVerifyResponse) Reset() { - *x = CheckinVerifyResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_checkin_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CheckinVerifyResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CheckinVerifyResponse) ProtoMessage() {} - -func (x *CheckinVerifyResponse) ProtoReflect() protoreflect.Message { - mi := &file_checkin_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CheckinVerifyResponse.ProtoReflect.Descriptor instead. -func (*CheckinVerifyResponse) Descriptor() ([]byte, []int) { - return file_checkin_proto_rawDescGZIP(), []int{1} -} - -func (x *CheckinVerifyResponse) GetCheckinToken() string { - if x != nil { - return x.CheckinToken - } - return "" -} - -func (x *CheckinVerifyResponse) GetCheckinType() int32 { - if x != nil { - return x.CheckinType - } - return 0 -} - -type CheckinConfirmRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` -} - -func (x *CheckinConfirmRequest) Reset() { - *x = CheckinConfirmRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_checkin_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CheckinConfirmRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CheckinConfirmRequest) ProtoMessage() {} - -func (x *CheckinConfirmRequest) ProtoReflect() protoreflect.Message { - mi := &file_checkin_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CheckinConfirmRequest.ProtoReflect.Descriptor instead. -func (*CheckinConfirmRequest) Descriptor() ([]byte, []int) { - return file_checkin_proto_rawDescGZIP(), []int{2} -} - -func (x *CheckinConfirmRequest) GetToken() string { - if x != nil { - return x.Token - } - return "" -} - -type CheckinConfirmResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` -} - -func (x *CheckinConfirmResponse) Reset() { - *x = CheckinConfirmResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_checkin_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CheckinConfirmResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CheckinConfirmResponse) ProtoMessage() {} - -func (x *CheckinConfirmResponse) ProtoReflect() protoreflect.Message { - mi := &file_checkin_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CheckinConfirmResponse.ProtoReflect.Descriptor instead. -func (*CheckinConfirmResponse) Descriptor() ([]byte, []int) { - return file_checkin_proto_rawDescGZIP(), []int{3} -} - -func (x *CheckinConfirmResponse) GetSuccess() bool { - if x != nil { - return x.Success - } - return false -} - -var File_checkin_proto protoreflect.FileDescriptor - -var file_checkin_proto_rawDesc = []byte{ - 0x0a, 0x0d, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, - 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, 0x45, 0x0a, 0x14, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x69, 0x6e, - 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, - 0x0a, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x09, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x22, 0x5f, 0x0a, 0x15, - 0x43, 0x68, 0x65, 0x63, 0x6b, 0x69, 0x6e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x69, 0x6e, - 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x68, - 0x65, 0x63, 0x6b, 0x69, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x68, - 0x65, 0x63, 0x6b, 0x69, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x0b, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x69, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x22, 0x2d, 0x0a, - 0x15, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x32, 0x0a, 0x16, - 0x43, 0x68, 0x65, 0x63, 0x6b, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, - 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, - 0x32, 0xab, 0x01, 0x0a, 0x0e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x69, 0x6e, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x12, 0x4a, 0x0a, 0x0d, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x69, 0x6e, 0x56, 0x65, - 0x72, 0x69, 0x66, 0x79, 0x12, 0x1a, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x43, 0x68, 0x65, 0x63, - 0x6b, 0x69, 0x6e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x1b, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x69, 0x6e, 0x56, - 0x65, 0x72, 0x69, 0x66, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, - 0x4d, 0x0a, 0x0e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, - 0x6d, 0x12, 0x1b, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x69, 0x6e, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, - 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x69, 0x6e, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x72, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x0b, - 0x5a, 0x09, 0x73, 0x72, 0x63, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, -} - -var ( - file_checkin_proto_rawDescOnce sync.Once - file_checkin_proto_rawDescData = file_checkin_proto_rawDesc -) - -func file_checkin_proto_rawDescGZIP() []byte { - file_checkin_proto_rawDescOnce.Do(func() { - file_checkin_proto_rawDescData = protoimpl.X.CompressGZIP(file_checkin_proto_rawDescData) - }) - return file_checkin_proto_rawDescData -} - -var file_checkin_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_checkin_proto_goTypes = []interface{}{ - (*CheckinVerifyRequest)(nil), // 0: user.CheckinVerifyRequest - (*CheckinVerifyResponse)(nil), // 1: user.CheckinVerifyResponse - (*CheckinConfirmRequest)(nil), // 2: user.CheckinConfirmRequest - (*CheckinConfirmResponse)(nil), // 3: user.CheckinConfirmResponse -} -var file_checkin_proto_depIdxs = []int32{ - 0, // 0: user.CheckinService.CheckinVerify:input_type -> user.CheckinVerifyRequest - 2, // 1: user.CheckinService.CheckinConfirm:input_type -> user.CheckinConfirmRequest - 1, // 2: user.CheckinService.CheckinVerify:output_type -> user.CheckinVerifyResponse - 3, // 3: user.CheckinService.CheckinConfirm:output_type -> user.CheckinConfirmResponse - 2, // [2:4] is the sub-list for method output_type - 0, // [0:2] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_checkin_proto_init() } -func file_checkin_proto_init() { - if File_checkin_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_checkin_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CheckinVerifyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_checkin_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CheckinVerifyResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_checkin_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CheckinConfirmRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_checkin_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CheckinConfirmResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_checkin_proto_rawDesc, - NumEnums: 0, - NumMessages: 4, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_checkin_proto_goTypes, - DependencyIndexes: file_checkin_proto_depIdxs, - MessageInfos: file_checkin_proto_msgTypes, - }.Build() - File_checkin_proto = out.File - file_checkin_proto_rawDesc = nil - file_checkin_proto_goTypes = nil - file_checkin_proto_depIdxs = nil -} diff --git a/proto/checkin.proto b/proto/checkin.proto deleted file mode 100644 index 26ee18a..0000000 --- a/proto/checkin.proto +++ /dev/null @@ -1,32 +0,0 @@ -syntax = "proto3"; - -package user; - -option go_package = "proto"; - -service CheckinService { - rpc CheckinVerify(CheckinVerifyRequest) returns (CheckinVerifyResponse){} - rpc CheckinConfirm(CheckinConfirmRequest) returns (CheckinConfirmResponse){} -} - -// Checkin verify - -message CheckinVerifyRequest{ - string id = 1; - int32 event_type = 2; -} - -message CheckinVerifyResponse{ - string checkin_token = 1; - int32 checkin_type = 2; -} - -// Checkin Confirm - -message CheckinConfirmRequest{ - string token = 1; -} - -message CheckinConfirmResponse{ - bool success = 1; -} \ No newline at end of file diff --git a/proto/checkin_grpc.pb.go b/proto/checkin_grpc.pb.go deleted file mode 100644 index 82118d3..0000000 --- a/proto/checkin_grpc.pb.go +++ /dev/null @@ -1,141 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc v3.19.4 -// source: checkin.proto - -package proto - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -// CheckinServiceClient is the client API for CheckinService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type CheckinServiceClient interface { - CheckinVerify(ctx context.Context, in *CheckinVerifyRequest, opts ...grpc.CallOption) (*CheckinVerifyResponse, error) - CheckinConfirm(ctx context.Context, in *CheckinConfirmRequest, opts ...grpc.CallOption) (*CheckinConfirmResponse, error) -} - -type checkinServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewCheckinServiceClient(cc grpc.ClientConnInterface) CheckinServiceClient { - return &checkinServiceClient{cc} -} - -func (c *checkinServiceClient) CheckinVerify(ctx context.Context, in *CheckinVerifyRequest, opts ...grpc.CallOption) (*CheckinVerifyResponse, error) { - out := new(CheckinVerifyResponse) - err := c.cc.Invoke(ctx, "/user.CheckinService/CheckinVerify", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *checkinServiceClient) CheckinConfirm(ctx context.Context, in *CheckinConfirmRequest, opts ...grpc.CallOption) (*CheckinConfirmResponse, error) { - out := new(CheckinConfirmResponse) - err := c.cc.Invoke(ctx, "/user.CheckinService/CheckinConfirm", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// CheckinServiceServer is the server API for CheckinService service. -// All implementations must embed UnimplementedCheckinServiceServer -// for forward compatibility -type CheckinServiceServer interface { - CheckinVerify(context.Context, *CheckinVerifyRequest) (*CheckinVerifyResponse, error) - CheckinConfirm(context.Context, *CheckinConfirmRequest) (*CheckinConfirmResponse, error) - mustEmbedUnimplementedCheckinServiceServer() -} - -// UnimplementedCheckinServiceServer must be embedded to have forward compatible implementations. -type UnimplementedCheckinServiceServer struct { -} - -func (UnimplementedCheckinServiceServer) CheckinVerify(context.Context, *CheckinVerifyRequest) (*CheckinVerifyResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CheckinVerify not implemented") -} -func (UnimplementedCheckinServiceServer) CheckinConfirm(context.Context, *CheckinConfirmRequest) (*CheckinConfirmResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CheckinConfirm not implemented") -} -func (UnimplementedCheckinServiceServer) mustEmbedUnimplementedCheckinServiceServer() {} - -// UnsafeCheckinServiceServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to CheckinServiceServer will -// result in compilation errors. -type UnsafeCheckinServiceServer interface { - mustEmbedUnimplementedCheckinServiceServer() -} - -func RegisterCheckinServiceServer(s grpc.ServiceRegistrar, srv CheckinServiceServer) { - s.RegisterService(&CheckinService_ServiceDesc, srv) -} - -func _CheckinService_CheckinVerify_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CheckinVerifyRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CheckinServiceServer).CheckinVerify(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/user.CheckinService/CheckinVerify", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CheckinServiceServer).CheckinVerify(ctx, req.(*CheckinVerifyRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _CheckinService_CheckinConfirm_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CheckinConfirmRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CheckinServiceServer).CheckinConfirm(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/user.CheckinService/CheckinConfirm", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CheckinServiceServer).CheckinConfirm(ctx, req.(*CheckinConfirmRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// CheckinService_ServiceDesc is the grpc.ServiceDesc for CheckinService service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var CheckinService_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "user.CheckinService", - HandlerType: (*CheckinServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "CheckinVerify", - Handler: _CheckinService_CheckinVerify_Handler, - }, - { - MethodName: "CheckinConfirm", - Handler: _CheckinService_CheckinConfirm_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "checkin.proto", -} diff --git a/proto/event.pb.go b/proto/event.pb.go deleted file mode 100644 index 228916e..0000000 --- a/proto/event.pb.go +++ /dev/null @@ -1,1008 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.0 -// protoc v3.19.4 -// source: event.proto - -package proto - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type Event struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - NameTH string `protobuf:"bytes,2,opt,name=nameTH,proto3" json:"nameTH,omitempty"` - DescriptionTH string `protobuf:"bytes,3,opt,name=descriptionTH,proto3" json:"descriptionTH,omitempty"` - NameEN string `protobuf:"bytes,4,opt,name=nameEN,proto3" json:"nameEN,omitempty"` - DescriptionEN string `protobuf:"bytes,5,opt,name=descriptionEN,proto3" json:"descriptionEN,omitempty"` - Code string `protobuf:"bytes,6,opt,name=code,proto3" json:"code,omitempty"` - ImageURL string `protobuf:"bytes,7,opt,name=imageURL,proto3" json:"imageURL,omitempty"` -} - -func (x *Event) Reset() { - *x = Event{} - if protoimpl.UnsafeEnabled { - mi := &file_event_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Event) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Event) ProtoMessage() {} - -func (x *Event) ProtoReflect() protoreflect.Message { - mi := &file_event_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Event.ProtoReflect.Descriptor instead. -func (*Event) Descriptor() ([]byte, []int) { - return file_event_proto_rawDescGZIP(), []int{0} -} - -func (x *Event) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *Event) GetNameTH() string { - if x != nil { - return x.NameTH - } - return "" -} - -func (x *Event) GetDescriptionTH() string { - if x != nil { - return x.DescriptionTH - } - return "" -} - -func (x *Event) GetNameEN() string { - if x != nil { - return x.NameEN - } - return "" -} - -func (x *Event) GetDescriptionEN() string { - if x != nil { - return x.DescriptionEN - } - return "" -} - -func (x *Event) GetCode() string { - if x != nil { - return x.Code - } - return "" -} - -func (x *Event) GetImageURL() string { - if x != nil { - return x.ImageURL - } - return "" -} - -type FindAllEventRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` -} - -func (x *FindAllEventRequest) Reset() { - *x = FindAllEventRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_event_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FindAllEventRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FindAllEventRequest) ProtoMessage() {} - -func (x *FindAllEventRequest) ProtoReflect() protoreflect.Message { - mi := &file_event_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FindAllEventRequest.ProtoReflect.Descriptor instead. -func (*FindAllEventRequest) Descriptor() ([]byte, []int) { - return file_event_proto_rawDescGZIP(), []int{1} -} - -func (x *FindAllEventRequest) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -type FindAllEventResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Event []*Event `protobuf:"bytes,1,rep,name=event,proto3" json:"event,omitempty"` -} - -func (x *FindAllEventResponse) Reset() { - *x = FindAllEventResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_event_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FindAllEventResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FindAllEventResponse) ProtoMessage() {} - -func (x *FindAllEventResponse) ProtoReflect() protoreflect.Message { - mi := &file_event_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FindAllEventResponse.ProtoReflect.Descriptor instead. -func (*FindAllEventResponse) Descriptor() ([]byte, []int) { - return file_event_proto_rawDescGZIP(), []int{2} -} - -func (x *FindAllEventResponse) GetEvent() []*Event { - if x != nil { - return x.Event - } - return nil -} - -type FindEventByIDRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` -} - -func (x *FindEventByIDRequest) Reset() { - *x = FindEventByIDRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_event_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FindEventByIDRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FindEventByIDRequest) ProtoMessage() {} - -func (x *FindEventByIDRequest) ProtoReflect() protoreflect.Message { - mi := &file_event_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FindEventByIDRequest.ProtoReflect.Descriptor instead. -func (*FindEventByIDRequest) Descriptor() ([]byte, []int) { - return file_event_proto_rawDescGZIP(), []int{3} -} - -func (x *FindEventByIDRequest) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -type FindEventByIDResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Event *Event `protobuf:"bytes,1,opt,name=event,proto3" json:"event,omitempty"` -} - -func (x *FindEventByIDResponse) Reset() { - *x = FindEventByIDResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_event_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FindEventByIDResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FindEventByIDResponse) ProtoMessage() {} - -func (x *FindEventByIDResponse) ProtoReflect() protoreflect.Message { - mi := &file_event_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FindEventByIDResponse.ProtoReflect.Descriptor instead. -func (*FindEventByIDResponse) Descriptor() ([]byte, []int) { - return file_event_proto_rawDescGZIP(), []int{4} -} - -func (x *FindEventByIDResponse) GetEvent() *Event { - if x != nil { - return x.Event - } - return nil -} - -type CreateEventRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Event *Event `protobuf:"bytes,1,opt,name=event,proto3" json:"event,omitempty"` -} - -func (x *CreateEventRequest) Reset() { - *x = CreateEventRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_event_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CreateEventRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateEventRequest) ProtoMessage() {} - -func (x *CreateEventRequest) ProtoReflect() protoreflect.Message { - mi := &file_event_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateEventRequest.ProtoReflect.Descriptor instead. -func (*CreateEventRequest) Descriptor() ([]byte, []int) { - return file_event_proto_rawDescGZIP(), []int{5} -} - -func (x *CreateEventRequest) GetEvent() *Event { - if x != nil { - return x.Event - } - return nil -} - -type CreateEventResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Event *Event `protobuf:"bytes,1,opt,name=event,proto3" json:"event,omitempty"` -} - -func (x *CreateEventResponse) Reset() { - *x = CreateEventResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_event_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CreateEventResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateEventResponse) ProtoMessage() {} - -func (x *CreateEventResponse) ProtoReflect() protoreflect.Message { - mi := &file_event_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateEventResponse.ProtoReflect.Descriptor instead. -func (*CreateEventResponse) Descriptor() ([]byte, []int) { - return file_event_proto_rawDescGZIP(), []int{6} -} - -func (x *CreateEventResponse) GetEvent() *Event { - if x != nil { - return x.Event - } - return nil -} - -type UpdateEventRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Event *Event `protobuf:"bytes,1,opt,name=event,proto3" json:"event,omitempty"` -} - -func (x *UpdateEventRequest) Reset() { - *x = UpdateEventRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_event_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpdateEventRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateEventRequest) ProtoMessage() {} - -func (x *UpdateEventRequest) ProtoReflect() protoreflect.Message { - mi := &file_event_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpdateEventRequest.ProtoReflect.Descriptor instead. -func (*UpdateEventRequest) Descriptor() ([]byte, []int) { - return file_event_proto_rawDescGZIP(), []int{7} -} - -func (x *UpdateEventRequest) GetEvent() *Event { - if x != nil { - return x.Event - } - return nil -} - -type UpdateEventResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Event *Event `protobuf:"bytes,1,opt,name=event,proto3" json:"event,omitempty"` -} - -func (x *UpdateEventResponse) Reset() { - *x = UpdateEventResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_event_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpdateEventResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateEventResponse) ProtoMessage() {} - -func (x *UpdateEventResponse) ProtoReflect() protoreflect.Message { - mi := &file_event_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpdateEventResponse.ProtoReflect.Descriptor instead. -func (*UpdateEventResponse) Descriptor() ([]byte, []int) { - return file_event_proto_rawDescGZIP(), []int{8} -} - -func (x *UpdateEventResponse) GetEvent() *Event { - if x != nil { - return x.Event - } - return nil -} - -type DeleteEventRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` -} - -func (x *DeleteEventRequest) Reset() { - *x = DeleteEventRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_event_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeleteEventRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteEventRequest) ProtoMessage() {} - -func (x *DeleteEventRequest) ProtoReflect() protoreflect.Message { - mi := &file_event_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteEventRequest.ProtoReflect.Descriptor instead. -func (*DeleteEventRequest) Descriptor() ([]byte, []int) { - return file_event_proto_rawDescGZIP(), []int{9} -} - -func (x *DeleteEventRequest) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -type DeleteEventResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` -} - -func (x *DeleteEventResponse) Reset() { - *x = DeleteEventResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_event_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeleteEventResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteEventResponse) ProtoMessage() {} - -func (x *DeleteEventResponse) ProtoReflect() protoreflect.Message { - mi := &file_event_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteEventResponse.ProtoReflect.Descriptor instead. -func (*DeleteEventResponse) Descriptor() ([]byte, []int) { - return file_event_proto_rawDescGZIP(), []int{10} -} - -func (x *DeleteEventResponse) GetSuccess() bool { - if x != nil { - return x.Success - } - return false -} - -type FindAllEventWithTypeRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - EventType string `protobuf:"bytes,1,opt,name=eventType,proto3" json:"eventType,omitempty"` -} - -func (x *FindAllEventWithTypeRequest) Reset() { - *x = FindAllEventWithTypeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_event_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FindAllEventWithTypeRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FindAllEventWithTypeRequest) ProtoMessage() {} - -func (x *FindAllEventWithTypeRequest) ProtoReflect() protoreflect.Message { - mi := &file_event_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FindAllEventWithTypeRequest.ProtoReflect.Descriptor instead. -func (*FindAllEventWithTypeRequest) Descriptor() ([]byte, []int) { - return file_event_proto_rawDescGZIP(), []int{11} -} - -func (x *FindAllEventWithTypeRequest) GetEventType() string { - if x != nil { - return x.EventType - } - return "" -} - -type FindAllEventWithTypeResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Event []*Event `protobuf:"bytes,1,rep,name=event,proto3" json:"event,omitempty"` -} - -func (x *FindAllEventWithTypeResponse) Reset() { - *x = FindAllEventWithTypeResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_event_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FindAllEventWithTypeResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FindAllEventWithTypeResponse) ProtoMessage() {} - -func (x *FindAllEventWithTypeResponse) ProtoReflect() protoreflect.Message { - mi := &file_event_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FindAllEventWithTypeResponse.ProtoReflect.Descriptor instead. -func (*FindAllEventWithTypeResponse) Descriptor() ([]byte, []int) { - return file_event_proto_rawDescGZIP(), []int{12} -} - -func (x *FindAllEventWithTypeResponse) GetEvent() []*Event { - if x != nil { - return x.Event - } - return nil -} - -var File_event_proto protoreflect.FileDescriptor - -var file_event_proto_rawDesc = []byte{ - 0x0a, 0x0b, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x65, - 0x76, 0x65, 0x6e, 0x74, 0x22, 0xc3, 0x01, 0x0a, 0x05, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x0e, - 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, - 0x0a, 0x06, 0x6e, 0x61, 0x6d, 0x65, 0x54, 0x48, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x6e, 0x61, 0x6d, 0x65, 0x54, 0x48, 0x12, 0x24, 0x0a, 0x0d, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x48, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x64, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x48, 0x12, 0x16, 0x0a, 0x06, - 0x6e, 0x61, 0x6d, 0x65, 0x45, 0x4e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6e, 0x61, - 0x6d, 0x65, 0x45, 0x4e, 0x12, 0x24, 0x0a, 0x0d, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x45, 0x4e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x64, 0x65, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x4e, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, - 0x64, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x1a, - 0x0a, 0x08, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x55, 0x52, 0x4c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x55, 0x52, 0x4c, 0x22, 0x25, 0x0a, 0x13, 0x46, 0x69, - 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, - 0x64, 0x22, 0x3a, 0x0a, 0x14, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, 0x76, 0x65, 0x6e, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x05, 0x65, 0x76, 0x65, - 0x6e, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, - 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x22, 0x26, 0x0a, - 0x14, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x3b, 0x0a, 0x15, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x76, 0x65, - 0x6e, 0x74, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x22, - 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, - 0x65, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x65, 0x76, 0x65, - 0x6e, 0x74, 0x22, 0x38, 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x76, 0x65, 0x6e, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x22, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x2e, - 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x22, 0x39, 0x0a, 0x13, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, - 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x22, 0x38, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x22, 0x0a, - 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x65, - 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, - 0x74, 0x22, 0x39, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x2e, - 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x22, 0x24, 0x0a, 0x12, - 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, - 0x69, 0x64, 0x22, 0x2f, 0x0a, 0x13, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x45, 0x76, 0x65, 0x6e, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, - 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, - 0x65, 0x73, 0x73, 0x22, 0x3b, 0x0a, 0x1b, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, 0x76, - 0x65, 0x6e, 0x74, 0x57, 0x69, 0x74, 0x68, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, - 0x22, 0x42, 0x0a, 0x1c, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, 0x76, 0x65, 0x6e, 0x74, - 0x57, 0x69, 0x74, 0x68, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x22, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x0c, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x65, - 0x76, 0x65, 0x6e, 0x74, 0x32, 0xd3, 0x03, 0x0a, 0x0c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x49, 0x0a, 0x0c, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, - 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x1a, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x46, 0x69, - 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x1b, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, - 0x6c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, - 0x12, 0x4c, 0x0a, 0x0d, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x42, 0x79, 0x49, - 0x44, 0x12, 0x1b, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x76, - 0x65, 0x6e, 0x74, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, - 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, - 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x41, - 0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x19, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, - 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x12, 0x41, 0x0a, 0x06, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x19, 0x2e, 0x65, 0x76, - 0x65, 0x6e, 0x74, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x12, 0x41, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x19, - 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x45, 0x76, 0x65, - 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x65, 0x76, 0x65, 0x6e, - 0x74, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x61, 0x0a, 0x14, 0x46, 0x69, 0x6e, 0x64, 0x41, - 0x6c, 0x6c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x57, 0x69, 0x74, 0x68, 0x54, 0x79, 0x70, 0x65, 0x12, - 0x22, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, - 0x76, 0x65, 0x6e, 0x74, 0x57, 0x69, 0x74, 0x68, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x46, 0x69, 0x6e, 0x64, - 0x41, 0x6c, 0x6c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x57, 0x69, 0x74, 0x68, 0x54, 0x79, 0x70, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x0b, 0x5a, 0x09, 0x73, 0x72, - 0x63, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_event_proto_rawDescOnce sync.Once - file_event_proto_rawDescData = file_event_proto_rawDesc -) - -func file_event_proto_rawDescGZIP() []byte { - file_event_proto_rawDescOnce.Do(func() { - file_event_proto_rawDescData = protoimpl.X.CompressGZIP(file_event_proto_rawDescData) - }) - return file_event_proto_rawDescData -} - -var file_event_proto_msgTypes = make([]protoimpl.MessageInfo, 13) -var file_event_proto_goTypes = []interface{}{ - (*Event)(nil), // 0: event.Event - (*FindAllEventRequest)(nil), // 1: event.FindAllEventRequest - (*FindAllEventResponse)(nil), // 2: event.FindAllEventResponse - (*FindEventByIDRequest)(nil), // 3: event.FindEventByIDRequest - (*FindEventByIDResponse)(nil), // 4: event.FindEventByIDResponse - (*CreateEventRequest)(nil), // 5: event.CreateEventRequest - (*CreateEventResponse)(nil), // 6: event.CreateEventResponse - (*UpdateEventRequest)(nil), // 7: event.UpdateEventRequest - (*UpdateEventResponse)(nil), // 8: event.UpdateEventResponse - (*DeleteEventRequest)(nil), // 9: event.DeleteEventRequest - (*DeleteEventResponse)(nil), // 10: event.DeleteEventResponse - (*FindAllEventWithTypeRequest)(nil), // 11: event.FindAllEventWithTypeRequest - (*FindAllEventWithTypeResponse)(nil), // 12: event.FindAllEventWithTypeResponse -} -var file_event_proto_depIdxs = []int32{ - 0, // 0: event.FindAllEventResponse.event:type_name -> event.Event - 0, // 1: event.FindEventByIDResponse.event:type_name -> event.Event - 0, // 2: event.CreateEventRequest.event:type_name -> event.Event - 0, // 3: event.CreateEventResponse.event:type_name -> event.Event - 0, // 4: event.UpdateEventRequest.event:type_name -> event.Event - 0, // 5: event.UpdateEventResponse.event:type_name -> event.Event - 0, // 6: event.FindAllEventWithTypeResponse.event:type_name -> event.Event - 1, // 7: event.EventService.FindAllEvent:input_type -> event.FindAllEventRequest - 3, // 8: event.EventService.FindEventByID:input_type -> event.FindEventByIDRequest - 5, // 9: event.EventService.Create:input_type -> event.CreateEventRequest - 7, // 10: event.EventService.Update:input_type -> event.UpdateEventRequest - 9, // 11: event.EventService.Delete:input_type -> event.DeleteEventRequest - 11, // 12: event.EventService.FindAllEventWithType:input_type -> event.FindAllEventWithTypeRequest - 2, // 13: event.EventService.FindAllEvent:output_type -> event.FindAllEventResponse - 4, // 14: event.EventService.FindEventByID:output_type -> event.FindEventByIDResponse - 6, // 15: event.EventService.Create:output_type -> event.CreateEventResponse - 8, // 16: event.EventService.Update:output_type -> event.UpdateEventResponse - 10, // 17: event.EventService.Delete:output_type -> event.DeleteEventResponse - 12, // 18: event.EventService.FindAllEventWithType:output_type -> event.FindAllEventWithTypeResponse - 13, // [13:19] is the sub-list for method output_type - 7, // [7:13] is the sub-list for method input_type - 7, // [7:7] is the sub-list for extension type_name - 7, // [7:7] is the sub-list for extension extendee - 0, // [0:7] is the sub-list for field type_name -} - -func init() { file_event_proto_init() } -func file_event_proto_init() { - if File_event_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_event_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Event); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_event_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FindAllEventRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_event_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FindAllEventResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_event_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FindEventByIDRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_event_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FindEventByIDResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_event_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateEventRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_event_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateEventResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_event_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateEventRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_event_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateEventResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_event_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteEventRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_event_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteEventResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_event_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FindAllEventWithTypeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_event_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FindAllEventWithTypeResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_event_proto_rawDesc, - NumEnums: 0, - NumMessages: 13, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_event_proto_goTypes, - DependencyIndexes: file_event_proto_depIdxs, - MessageInfos: file_event_proto_msgTypes, - }.Build() - File_event_proto = out.File - file_event_proto_rawDesc = nil - file_event_proto_goTypes = nil - file_event_proto_depIdxs = nil -} diff --git a/proto/event.proto b/proto/event.proto deleted file mode 100644 index 33017a5..0000000 --- a/proto/event.proto +++ /dev/null @@ -1,85 +0,0 @@ -syntax = "proto3"; - -package event; - -option go_package = "proto"; - -service EventService { - rpc FindAllEvent(FindAllEventRequest) returns (FindAllEventResponse){} - rpc FindEventByID(FindEventByIDRequest) returns(FindEventByIDResponse) {} - rpc Create(CreateEventRequest) returns (CreateEventResponse){} - rpc Update(UpdateEventRequest) returns (UpdateEventResponse){} - rpc Delete(DeleteEventRequest) returns (DeleteEventResponse){} - rpc FindAllEventWithType(FindAllEventWithTypeRequest) returns (FindAllEventWithTypeResponse){} -} - -message Event{ - string id = 1; - string nameTH = 2; - string descriptionTH = 3; - string nameEN = 4; - string descriptionEN = 5; - string code = 6; - string imageURL = 7; -} - -//FindAll - -message FindAllEventRequest{ - string id = 1; -} - -message FindAllEventResponse { - repeated Event event = 1; -} - - -// Find By Event ID - -message FindEventByIDRequest{ - string id = 1; -} - -message FindEventByIDResponse{ - Event event = 1; -} - -// Create - -message CreateEventRequest{ - Event event = 1; -} - -message CreateEventResponse{ - Event event = 1; -} - -// Update - -message UpdateEventRequest{ - Event event = 1; -} - -message UpdateEventResponse{ - Event event = 1; -} - -// Delete - -message DeleteEventRequest{ - string id = 1; -} - -message DeleteEventResponse{ - bool success = 1; -} - -// FindAllEventWithType - -message FindAllEventWithTypeRequest{ - string eventType = 1; -} - -message FindAllEventWithTypeResponse{ - repeated Event event = 1; -} \ No newline at end of file diff --git a/proto/event_grpc.pb.go b/proto/event_grpc.pb.go deleted file mode 100644 index 61d27c9..0000000 --- a/proto/event_grpc.pb.go +++ /dev/null @@ -1,285 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc v3.19.4 -// source: event.proto - -package proto - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -// EventServiceClient is the client API for EventService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type EventServiceClient interface { - FindAllEvent(ctx context.Context, in *FindAllEventRequest, opts ...grpc.CallOption) (*FindAllEventResponse, error) - FindEventByID(ctx context.Context, in *FindEventByIDRequest, opts ...grpc.CallOption) (*FindEventByIDResponse, error) - Create(ctx context.Context, in *CreateEventRequest, opts ...grpc.CallOption) (*CreateEventResponse, error) - Update(ctx context.Context, in *UpdateEventRequest, opts ...grpc.CallOption) (*UpdateEventResponse, error) - Delete(ctx context.Context, in *DeleteEventRequest, opts ...grpc.CallOption) (*DeleteEventResponse, error) - FindAllEventWithType(ctx context.Context, in *FindAllEventWithTypeRequest, opts ...grpc.CallOption) (*FindAllEventWithTypeResponse, error) -} - -type eventServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewEventServiceClient(cc grpc.ClientConnInterface) EventServiceClient { - return &eventServiceClient{cc} -} - -func (c *eventServiceClient) FindAllEvent(ctx context.Context, in *FindAllEventRequest, opts ...grpc.CallOption) (*FindAllEventResponse, error) { - out := new(FindAllEventResponse) - err := c.cc.Invoke(ctx, "/event.EventService/FindAllEvent", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *eventServiceClient) FindEventByID(ctx context.Context, in *FindEventByIDRequest, opts ...grpc.CallOption) (*FindEventByIDResponse, error) { - out := new(FindEventByIDResponse) - err := c.cc.Invoke(ctx, "/event.EventService/FindEventByID", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *eventServiceClient) Create(ctx context.Context, in *CreateEventRequest, opts ...grpc.CallOption) (*CreateEventResponse, error) { - out := new(CreateEventResponse) - err := c.cc.Invoke(ctx, "/event.EventService/Create", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *eventServiceClient) Update(ctx context.Context, in *UpdateEventRequest, opts ...grpc.CallOption) (*UpdateEventResponse, error) { - out := new(UpdateEventResponse) - err := c.cc.Invoke(ctx, "/event.EventService/Update", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *eventServiceClient) Delete(ctx context.Context, in *DeleteEventRequest, opts ...grpc.CallOption) (*DeleteEventResponse, error) { - out := new(DeleteEventResponse) - err := c.cc.Invoke(ctx, "/event.EventService/Delete", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *eventServiceClient) FindAllEventWithType(ctx context.Context, in *FindAllEventWithTypeRequest, opts ...grpc.CallOption) (*FindAllEventWithTypeResponse, error) { - out := new(FindAllEventWithTypeResponse) - err := c.cc.Invoke(ctx, "/event.EventService/FindAllEventWithType", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// EventServiceServer is the server API for EventService service. -// All implementations must embed UnimplementedEventServiceServer -// for forward compatibility -type EventServiceServer interface { - FindAllEvent(context.Context, *FindAllEventRequest) (*FindAllEventResponse, error) - FindEventByID(context.Context, *FindEventByIDRequest) (*FindEventByIDResponse, error) - Create(context.Context, *CreateEventRequest) (*CreateEventResponse, error) - Update(context.Context, *UpdateEventRequest) (*UpdateEventResponse, error) - Delete(context.Context, *DeleteEventRequest) (*DeleteEventResponse, error) - FindAllEventWithType(context.Context, *FindAllEventWithTypeRequest) (*FindAllEventWithTypeResponse, error) - mustEmbedUnimplementedEventServiceServer() -} - -// UnimplementedEventServiceServer must be embedded to have forward compatible implementations. -type UnimplementedEventServiceServer struct { -} - -func (UnimplementedEventServiceServer) FindAllEvent(context.Context, *FindAllEventRequest) (*FindAllEventResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method FindAllEvent not implemented") -} -func (UnimplementedEventServiceServer) FindEventByID(context.Context, *FindEventByIDRequest) (*FindEventByIDResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method FindEventByID not implemented") -} -func (UnimplementedEventServiceServer) Create(context.Context, *CreateEventRequest) (*CreateEventResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Create not implemented") -} -func (UnimplementedEventServiceServer) Update(context.Context, *UpdateEventRequest) (*UpdateEventResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Update not implemented") -} -func (UnimplementedEventServiceServer) Delete(context.Context, *DeleteEventRequest) (*DeleteEventResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") -} -func (UnimplementedEventServiceServer) FindAllEventWithType(context.Context, *FindAllEventWithTypeRequest) (*FindAllEventWithTypeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method FindAllEventWithType not implemented") -} -func (UnimplementedEventServiceServer) mustEmbedUnimplementedEventServiceServer() {} - -// UnsafeEventServiceServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to EventServiceServer will -// result in compilation errors. -type UnsafeEventServiceServer interface { - mustEmbedUnimplementedEventServiceServer() -} - -func RegisterEventServiceServer(s grpc.ServiceRegistrar, srv EventServiceServer) { - s.RegisterService(&EventService_ServiceDesc, srv) -} - -func _EventService_FindAllEvent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(FindAllEventRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(EventServiceServer).FindAllEvent(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/event.EventService/FindAllEvent", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(EventServiceServer).FindAllEvent(ctx, req.(*FindAllEventRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _EventService_FindEventByID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(FindEventByIDRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(EventServiceServer).FindEventByID(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/event.EventService/FindEventByID", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(EventServiceServer).FindEventByID(ctx, req.(*FindEventByIDRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _EventService_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateEventRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(EventServiceServer).Create(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/event.EventService/Create", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(EventServiceServer).Create(ctx, req.(*CreateEventRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _EventService_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateEventRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(EventServiceServer).Update(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/event.EventService/Update", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(EventServiceServer).Update(ctx, req.(*UpdateEventRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _EventService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteEventRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(EventServiceServer).Delete(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/event.EventService/Delete", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(EventServiceServer).Delete(ctx, req.(*DeleteEventRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _EventService_FindAllEventWithType_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(FindAllEventWithTypeRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(EventServiceServer).FindAllEventWithType(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/event.EventService/FindAllEventWithType", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(EventServiceServer).FindAllEventWithType(ctx, req.(*FindAllEventWithTypeRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// EventService_ServiceDesc is the grpc.ServiceDesc for EventService service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var EventService_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "event.EventService", - HandlerType: (*EventServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "FindAllEvent", - Handler: _EventService_FindAllEvent_Handler, - }, - { - MethodName: "FindEventByID", - Handler: _EventService_FindEventByID_Handler, - }, - { - MethodName: "Create", - Handler: _EventService_Create_Handler, - }, - { - MethodName: "Update", - Handler: _EventService_Update_Handler, - }, - { - MethodName: "Delete", - Handler: _EventService_Delete_Handler, - }, - { - MethodName: "FindAllEventWithType", - Handler: _EventService_FindAllEventWithType_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "event.proto", -} diff --git a/proto/file.pb.go b/proto/file.pb.go deleted file mode 100644 index b4eac70..0000000 --- a/proto/file.pb.go +++ /dev/null @@ -1,380 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.0 -// protoc v3.19.4 -// source: file.proto - -package proto - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type UploadRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Filename string `protobuf:"bytes,1,opt,name=filename,proto3" json:"filename,omitempty"` - Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` - UserId string `protobuf:"bytes,3,opt,name=userId,proto3" json:"userId,omitempty"` - Tag int32 `protobuf:"varint,4,opt,name=tag,proto3" json:"tag,omitempty"` - Type int32 `protobuf:"varint,5,opt,name=type,proto3" json:"type,omitempty"` -} - -func (x *UploadRequest) Reset() { - *x = UploadRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_file_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UploadRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UploadRequest) ProtoMessage() {} - -func (x *UploadRequest) ProtoReflect() protoreflect.Message { - mi := &file_file_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UploadRequest.ProtoReflect.Descriptor instead. -func (*UploadRequest) Descriptor() ([]byte, []int) { - return file_file_proto_rawDescGZIP(), []int{0} -} - -func (x *UploadRequest) GetFilename() string { - if x != nil { - return x.Filename - } - return "" -} - -func (x *UploadRequest) GetData() []byte { - if x != nil { - return x.Data - } - return nil -} - -func (x *UploadRequest) GetUserId() string { - if x != nil { - return x.UserId - } - return "" -} - -func (x *UploadRequest) GetTag() int32 { - if x != nil { - return x.Tag - } - return 0 -} - -func (x *UploadRequest) GetType() int32 { - if x != nil { - return x.Type - } - return 0 -} - -type UploadResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` -} - -func (x *UploadResponse) Reset() { - *x = UploadResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_file_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UploadResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UploadResponse) ProtoMessage() {} - -func (x *UploadResponse) ProtoReflect() protoreflect.Message { - mi := &file_file_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UploadResponse.ProtoReflect.Descriptor instead. -func (*UploadResponse) Descriptor() ([]byte, []int) { - return file_file_proto_rawDescGZIP(), []int{1} -} - -func (x *UploadResponse) GetUrl() string { - if x != nil { - return x.Url - } - return "" -} - -type GetSignedUrlRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - UserId string `protobuf:"bytes,1,opt,name=userId,proto3" json:"userId,omitempty"` -} - -func (x *GetSignedUrlRequest) Reset() { - *x = GetSignedUrlRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_file_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetSignedUrlRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetSignedUrlRequest) ProtoMessage() {} - -func (x *GetSignedUrlRequest) ProtoReflect() protoreflect.Message { - mi := &file_file_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetSignedUrlRequest.ProtoReflect.Descriptor instead. -func (*GetSignedUrlRequest) Descriptor() ([]byte, []int) { - return file_file_proto_rawDescGZIP(), []int{2} -} - -func (x *GetSignedUrlRequest) GetUserId() string { - if x != nil { - return x.UserId - } - return "" -} - -type GetSignedUrlResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` -} - -func (x *GetSignedUrlResponse) Reset() { - *x = GetSignedUrlResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_file_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetSignedUrlResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetSignedUrlResponse) ProtoMessage() {} - -func (x *GetSignedUrlResponse) ProtoReflect() protoreflect.Message { - mi := &file_file_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetSignedUrlResponse.ProtoReflect.Descriptor instead. -func (*GetSignedUrlResponse) Descriptor() ([]byte, []int) { - return file_file_proto_rawDescGZIP(), []int{3} -} - -func (x *GetSignedUrlResponse) GetUrl() string { - if x != nil { - return x.Url - } - return "" -} - -var File_file_proto protoreflect.FileDescriptor - -var file_file_proto_rawDesc = []byte{ - 0x0a, 0x0a, 0x66, 0x69, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x04, 0x66, 0x69, - 0x6c, 0x65, 0x22, 0x7d, 0x0a, 0x0d, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x12, - 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, - 0x61, 0x74, 0x61, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x74, - 0x61, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x74, 0x61, 0x67, 0x12, 0x12, 0x0a, - 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x74, 0x79, 0x70, - 0x65, 0x22, 0x22, 0x0a, 0x0e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x75, 0x72, 0x6c, 0x22, 0x2d, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x53, 0x69, 0x67, 0x6e, - 0x65, 0x64, 0x55, 0x72, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, - 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, - 0x65, 0x72, 0x49, 0x64, 0x22, 0x28, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x65, - 0x64, 0x55, 0x72, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x10, 0x0a, 0x03, - 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x32, 0x8d, - 0x01, 0x0a, 0x0b, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x35, - 0x0a, 0x06, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x13, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x2e, - 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, - 0x66, 0x69, 0x6c, 0x65, 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x47, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x53, 0x69, 0x67, 0x6e, - 0x65, 0x64, 0x55, 0x72, 0x6c, 0x12, 0x19, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x2e, 0x47, 0x65, 0x74, - 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x55, 0x72, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x1a, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x65, - 0x64, 0x55, 0x72, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x0b, - 0x5a, 0x09, 0x73, 0x72, 0x63, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, -} - -var ( - file_file_proto_rawDescOnce sync.Once - file_file_proto_rawDescData = file_file_proto_rawDesc -) - -func file_file_proto_rawDescGZIP() []byte { - file_file_proto_rawDescOnce.Do(func() { - file_file_proto_rawDescData = protoimpl.X.CompressGZIP(file_file_proto_rawDescData) - }) - return file_file_proto_rawDescData -} - -var file_file_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_file_proto_goTypes = []interface{}{ - (*UploadRequest)(nil), // 0: file.UploadRequest - (*UploadResponse)(nil), // 1: file.UploadResponse - (*GetSignedUrlRequest)(nil), // 2: file.GetSignedUrlRequest - (*GetSignedUrlResponse)(nil), // 3: file.GetSignedUrlResponse -} -var file_file_proto_depIdxs = []int32{ - 0, // 0: file.FileService.Upload:input_type -> file.UploadRequest - 2, // 1: file.FileService.GetSignedUrl:input_type -> file.GetSignedUrlRequest - 1, // 2: file.FileService.Upload:output_type -> file.UploadResponse - 3, // 3: file.FileService.GetSignedUrl:output_type -> file.GetSignedUrlResponse - 2, // [2:4] is the sub-list for method output_type - 0, // [0:2] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_file_proto_init() } -func file_file_proto_init() { - if File_file_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_file_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UploadRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_file_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UploadResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_file_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetSignedUrlRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_file_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetSignedUrlResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_file_proto_rawDesc, - NumEnums: 0, - NumMessages: 4, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_file_proto_goTypes, - DependencyIndexes: file_file_proto_depIdxs, - MessageInfos: file_file_proto_msgTypes, - }.Build() - File_file_proto = out.File - file_file_proto_rawDesc = nil - file_file_proto_goTypes = nil - file_file_proto_depIdxs = nil -} diff --git a/proto/file.proto b/proto/file.proto deleted file mode 100644 index e1f2aa3..0000000 --- a/proto/file.proto +++ /dev/null @@ -1,34 +0,0 @@ -syntax = "proto3"; - -package file; - -option go_package = "proto"; - -service FileService { - rpc Upload(UploadRequest) returns (UploadResponse){} - rpc GetSignedUrl(GetSignedUrlRequest) returns (GetSignedUrlResponse) {} -} - -// Upload - -message UploadRequest{ - string filename = 1; - bytes data = 2; - string userId = 3; - int32 tag = 4; - int32 type = 5; -} - -message UploadResponse{ - string url = 1; -} - -// Get Signed Url - -message GetSignedUrlRequest{ - string userId = 1; -} - -message GetSignedUrlResponse{ - string url = 1; -} diff --git a/proto/file_grpc.pb.go b/proto/file_grpc.pb.go deleted file mode 100644 index 2b57b0a..0000000 --- a/proto/file_grpc.pb.go +++ /dev/null @@ -1,141 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc v3.19.4 -// source: file.proto - -package proto - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -// FileServiceClient is the client API for FileService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type FileServiceClient interface { - Upload(ctx context.Context, in *UploadRequest, opts ...grpc.CallOption) (*UploadResponse, error) - GetSignedUrl(ctx context.Context, in *GetSignedUrlRequest, opts ...grpc.CallOption) (*GetSignedUrlResponse, error) -} - -type fileServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewFileServiceClient(cc grpc.ClientConnInterface) FileServiceClient { - return &fileServiceClient{cc} -} - -func (c *fileServiceClient) Upload(ctx context.Context, in *UploadRequest, opts ...grpc.CallOption) (*UploadResponse, error) { - out := new(UploadResponse) - err := c.cc.Invoke(ctx, "/file.FileService/Upload", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *fileServiceClient) GetSignedUrl(ctx context.Context, in *GetSignedUrlRequest, opts ...grpc.CallOption) (*GetSignedUrlResponse, error) { - out := new(GetSignedUrlResponse) - err := c.cc.Invoke(ctx, "/file.FileService/GetSignedUrl", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// FileServiceServer is the server API for FileService service. -// All implementations must embed UnimplementedFileServiceServer -// for forward compatibility -type FileServiceServer interface { - Upload(context.Context, *UploadRequest) (*UploadResponse, error) - GetSignedUrl(context.Context, *GetSignedUrlRequest) (*GetSignedUrlResponse, error) - mustEmbedUnimplementedFileServiceServer() -} - -// UnimplementedFileServiceServer must be embedded to have forward compatible implementations. -type UnimplementedFileServiceServer struct { -} - -func (UnimplementedFileServiceServer) Upload(context.Context, *UploadRequest) (*UploadResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Upload not implemented") -} -func (UnimplementedFileServiceServer) GetSignedUrl(context.Context, *GetSignedUrlRequest) (*GetSignedUrlResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetSignedUrl not implemented") -} -func (UnimplementedFileServiceServer) mustEmbedUnimplementedFileServiceServer() {} - -// UnsafeFileServiceServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to FileServiceServer will -// result in compilation errors. -type UnsafeFileServiceServer interface { - mustEmbedUnimplementedFileServiceServer() -} - -func RegisterFileServiceServer(s grpc.ServiceRegistrar, srv FileServiceServer) { - s.RegisterService(&FileService_ServiceDesc, srv) -} - -func _FileService_Upload_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UploadRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(FileServiceServer).Upload(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/file.FileService/Upload", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(FileServiceServer).Upload(ctx, req.(*UploadRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _FileService_GetSignedUrl_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetSignedUrlRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(FileServiceServer).GetSignedUrl(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/file.FileService/GetSignedUrl", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(FileServiceServer).GetSignedUrl(ctx, req.(*GetSignedUrlRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// FileService_ServiceDesc is the grpc.ServiceDesc for FileService service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var FileService_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "file.FileService", - HandlerType: (*FileServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Upload", - Handler: _FileService_Upload_Handler, - }, - { - MethodName: "GetSignedUrl", - Handler: _FileService_GetSignedUrl_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "file.proto", -} diff --git a/proto/group.pb.go b/proto/group.pb.go deleted file mode 100644 index 7909752..0000000 --- a/proto/group.pb.go +++ /dev/null @@ -1,1275 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.0 -// protoc v3.19.4 -// source: group.proto - -package proto - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type Group struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - LeaderID string `protobuf:"bytes,2,opt,name=leaderID,proto3" json:"leaderID,omitempty"` - Token string `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"` - Members []*UserInfo `protobuf:"bytes,4,rep,name=members,proto3" json:"members,omitempty"` - Baans []*BaanInfo `protobuf:"bytes,5,rep,name=baans,proto3" json:"baans,omitempty"` -} - -func (x *Group) Reset() { - *x = Group{} - if protoimpl.UnsafeEnabled { - mi := &file_group_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Group) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Group) ProtoMessage() {} - -func (x *Group) ProtoReflect() protoreflect.Message { - mi := &file_group_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Group.ProtoReflect.Descriptor instead. -func (*Group) Descriptor() ([]byte, []int) { - return file_group_proto_rawDescGZIP(), []int{0} -} - -func (x *Group) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *Group) GetLeaderID() string { - if x != nil { - return x.LeaderID - } - return "" -} - -func (x *Group) GetToken() string { - if x != nil { - return x.Token - } - return "" -} - -func (x *Group) GetMembers() []*UserInfo { - if x != nil { - return x.Members - } - return nil -} - -func (x *Group) GetBaans() []*BaanInfo { - if x != nil { - return x.Baans - } - return nil -} - -type UserInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Firstname string `protobuf:"bytes,2,opt,name=firstname,proto3" json:"firstname,omitempty"` - Lastname string `protobuf:"bytes,3,opt,name=lastname,proto3" json:"lastname,omitempty"` - ImageUrl string `protobuf:"bytes,4,opt,name=imageUrl,proto3" json:"imageUrl,omitempty"` -} - -func (x *UserInfo) Reset() { - *x = UserInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_group_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UserInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UserInfo) ProtoMessage() {} - -func (x *UserInfo) ProtoReflect() protoreflect.Message { - mi := &file_group_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UserInfo.ProtoReflect.Descriptor instead. -func (*UserInfo) Descriptor() ([]byte, []int) { - return file_group_proto_rawDescGZIP(), []int{1} -} - -func (x *UserInfo) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *UserInfo) GetFirstname() string { - if x != nil { - return x.Firstname - } - return "" -} - -func (x *UserInfo) GetLastname() string { - if x != nil { - return x.Lastname - } - return "" -} - -func (x *UserInfo) GetImageUrl() string { - if x != nil { - return x.ImageUrl - } - return "" -} - -//Find One -type FindOneGroupRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - UserId string `protobuf:"bytes,1,opt,name=userId,proto3" json:"userId,omitempty"` -} - -func (x *FindOneGroupRequest) Reset() { - *x = FindOneGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_group_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FindOneGroupRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FindOneGroupRequest) ProtoMessage() {} - -func (x *FindOneGroupRequest) ProtoReflect() protoreflect.Message { - mi := &file_group_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FindOneGroupRequest.ProtoReflect.Descriptor instead. -func (*FindOneGroupRequest) Descriptor() ([]byte, []int) { - return file_group_proto_rawDescGZIP(), []int{2} -} - -func (x *FindOneGroupRequest) GetUserId() string { - if x != nil { - return x.UserId - } - return "" -} - -type FindOneGroupResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Group *Group `protobuf:"bytes,1,opt,name=group,proto3" json:"group,omitempty"` -} - -func (x *FindOneGroupResponse) Reset() { - *x = FindOneGroupResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_group_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FindOneGroupResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FindOneGroupResponse) ProtoMessage() {} - -func (x *FindOneGroupResponse) ProtoReflect() protoreflect.Message { - mi := &file_group_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FindOneGroupResponse.ProtoReflect.Descriptor instead. -func (*FindOneGroupResponse) Descriptor() ([]byte, []int) { - return file_group_proto_rawDescGZIP(), []int{3} -} - -func (x *FindOneGroupResponse) GetGroup() *Group { - if x != nil { - return x.Group - } - return nil -} - -type FindByTokenGroupRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` -} - -func (x *FindByTokenGroupRequest) Reset() { - *x = FindByTokenGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_group_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FindByTokenGroupRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FindByTokenGroupRequest) ProtoMessage() {} - -func (x *FindByTokenGroupRequest) ProtoReflect() protoreflect.Message { - mi := &file_group_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FindByTokenGroupRequest.ProtoReflect.Descriptor instead. -func (*FindByTokenGroupRequest) Descriptor() ([]byte, []int) { - return file_group_proto_rawDescGZIP(), []int{4} -} - -func (x *FindByTokenGroupRequest) GetToken() string { - if x != nil { - return x.Token - } - return "" -} - -type FindByTokenGroupResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"` - Leader *UserInfo `protobuf:"bytes,3,opt,name=leader,proto3" json:"leader,omitempty"` -} - -func (x *FindByTokenGroupResponse) Reset() { - *x = FindByTokenGroupResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_group_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FindByTokenGroupResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FindByTokenGroupResponse) ProtoMessage() {} - -func (x *FindByTokenGroupResponse) ProtoReflect() protoreflect.Message { - mi := &file_group_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FindByTokenGroupResponse.ProtoReflect.Descriptor instead. -func (*FindByTokenGroupResponse) Descriptor() ([]byte, []int) { - return file_group_proto_rawDescGZIP(), []int{5} -} - -func (x *FindByTokenGroupResponse) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *FindByTokenGroupResponse) GetToken() string { - if x != nil { - return x.Token - } - return "" -} - -func (x *FindByTokenGroupResponse) GetLeader() *UserInfo { - if x != nil { - return x.Leader - } - return nil -} - -type UpdateGroupRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Group *Group `protobuf:"bytes,1,opt,name=group,proto3" json:"group,omitempty"` - LeaderId string `protobuf:"bytes,2,opt,name=leaderId,proto3" json:"leaderId,omitempty"` -} - -func (x *UpdateGroupRequest) Reset() { - *x = UpdateGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_group_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpdateGroupRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateGroupRequest) ProtoMessage() {} - -func (x *UpdateGroupRequest) ProtoReflect() protoreflect.Message { - mi := &file_group_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpdateGroupRequest.ProtoReflect.Descriptor instead. -func (*UpdateGroupRequest) Descriptor() ([]byte, []int) { - return file_group_proto_rawDescGZIP(), []int{6} -} - -func (x *UpdateGroupRequest) GetGroup() *Group { - if x != nil { - return x.Group - } - return nil -} - -func (x *UpdateGroupRequest) GetLeaderId() string { - if x != nil { - return x.LeaderId - } - return "" -} - -type UpdateGroupResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Group *Group `protobuf:"bytes,1,opt,name=group,proto3" json:"group,omitempty"` -} - -func (x *UpdateGroupResponse) Reset() { - *x = UpdateGroupResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_group_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpdateGroupResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateGroupResponse) ProtoMessage() {} - -func (x *UpdateGroupResponse) ProtoReflect() protoreflect.Message { - mi := &file_group_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpdateGroupResponse.ProtoReflect.Descriptor instead. -func (*UpdateGroupResponse) Descriptor() ([]byte, []int) { - return file_group_proto_rawDescGZIP(), []int{7} -} - -func (x *UpdateGroupResponse) GetGroup() *Group { - if x != nil { - return x.Group - } - return nil -} - -type JoinGroupRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` - UserId string `protobuf:"bytes,2,opt,name=userId,proto3" json:"userId,omitempty"` -} - -func (x *JoinGroupRequest) Reset() { - *x = JoinGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_group_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *JoinGroupRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*JoinGroupRequest) ProtoMessage() {} - -func (x *JoinGroupRequest) ProtoReflect() protoreflect.Message { - mi := &file_group_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use JoinGroupRequest.ProtoReflect.Descriptor instead. -func (*JoinGroupRequest) Descriptor() ([]byte, []int) { - return file_group_proto_rawDescGZIP(), []int{8} -} - -func (x *JoinGroupRequest) GetToken() string { - if x != nil { - return x.Token - } - return "" -} - -func (x *JoinGroupRequest) GetUserId() string { - if x != nil { - return x.UserId - } - return "" -} - -type JoinGroupResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Group *Group `protobuf:"bytes,1,opt,name=group,proto3" json:"group,omitempty"` -} - -func (x *JoinGroupResponse) Reset() { - *x = JoinGroupResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_group_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *JoinGroupResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*JoinGroupResponse) ProtoMessage() {} - -func (x *JoinGroupResponse) ProtoReflect() protoreflect.Message { - mi := &file_group_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use JoinGroupResponse.ProtoReflect.Descriptor instead. -func (*JoinGroupResponse) Descriptor() ([]byte, []int) { - return file_group_proto_rawDescGZIP(), []int{9} -} - -func (x *JoinGroupResponse) GetGroup() *Group { - if x != nil { - return x.Group - } - return nil -} - -type DeleteMemberGroupRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - UserId string `protobuf:"bytes,1,opt,name=userId,proto3" json:"userId,omitempty"` - LeaderId string `protobuf:"bytes,2,opt,name=leaderId,proto3" json:"leaderId,omitempty"` -} - -func (x *DeleteMemberGroupRequest) Reset() { - *x = DeleteMemberGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_group_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeleteMemberGroupRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteMemberGroupRequest) ProtoMessage() {} - -func (x *DeleteMemberGroupRequest) ProtoReflect() protoreflect.Message { - mi := &file_group_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteMemberGroupRequest.ProtoReflect.Descriptor instead. -func (*DeleteMemberGroupRequest) Descriptor() ([]byte, []int) { - return file_group_proto_rawDescGZIP(), []int{10} -} - -func (x *DeleteMemberGroupRequest) GetUserId() string { - if x != nil { - return x.UserId - } - return "" -} - -func (x *DeleteMemberGroupRequest) GetLeaderId() string { - if x != nil { - return x.LeaderId - } - return "" -} - -type DeleteMemberGroupResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Group *Group `protobuf:"bytes,1,opt,name=group,proto3" json:"group,omitempty"` -} - -func (x *DeleteMemberGroupResponse) Reset() { - *x = DeleteMemberGroupResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_group_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeleteMemberGroupResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteMemberGroupResponse) ProtoMessage() {} - -func (x *DeleteMemberGroupResponse) ProtoReflect() protoreflect.Message { - mi := &file_group_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteMemberGroupResponse.ProtoReflect.Descriptor instead. -func (*DeleteMemberGroupResponse) Descriptor() ([]byte, []int) { - return file_group_proto_rawDescGZIP(), []int{11} -} - -func (x *DeleteMemberGroupResponse) GetGroup() *Group { - if x != nil { - return x.Group - } - return nil -} - -type LeaveGroupRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - UserId string `protobuf:"bytes,1,opt,name=userId,proto3" json:"userId,omitempty"` -} - -func (x *LeaveGroupRequest) Reset() { - *x = LeaveGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_group_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *LeaveGroupRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LeaveGroupRequest) ProtoMessage() {} - -func (x *LeaveGroupRequest) ProtoReflect() protoreflect.Message { - mi := &file_group_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use LeaveGroupRequest.ProtoReflect.Descriptor instead. -func (*LeaveGroupRequest) Descriptor() ([]byte, []int) { - return file_group_proto_rawDescGZIP(), []int{12} -} - -func (x *LeaveGroupRequest) GetUserId() string { - if x != nil { - return x.UserId - } - return "" -} - -type LeaveGroupResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Group *Group `protobuf:"bytes,1,opt,name=group,proto3" json:"group,omitempty"` -} - -func (x *LeaveGroupResponse) Reset() { - *x = LeaveGroupResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_group_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *LeaveGroupResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LeaveGroupResponse) ProtoMessage() {} - -func (x *LeaveGroupResponse) ProtoReflect() protoreflect.Message { - mi := &file_group_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use LeaveGroupResponse.ProtoReflect.Descriptor instead. -func (*LeaveGroupResponse) Descriptor() ([]byte, []int) { - return file_group_proto_rawDescGZIP(), []int{13} -} - -func (x *LeaveGroupResponse) GetGroup() *Group { - if x != nil { - return x.Group - } - return nil -} - -type SelectBaanRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - UserId string `protobuf:"bytes,1,opt,name=userId,proto3" json:"userId,omitempty"` - Baans []string `protobuf:"bytes,2,rep,name=baans,proto3" json:"baans,omitempty"` -} - -func (x *SelectBaanRequest) Reset() { - *x = SelectBaanRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_group_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SelectBaanRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SelectBaanRequest) ProtoMessage() {} - -func (x *SelectBaanRequest) ProtoReflect() protoreflect.Message { - mi := &file_group_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SelectBaanRequest.ProtoReflect.Descriptor instead. -func (*SelectBaanRequest) Descriptor() ([]byte, []int) { - return file_group_proto_rawDescGZIP(), []int{14} -} - -func (x *SelectBaanRequest) GetUserId() string { - if x != nil { - return x.UserId - } - return "" -} - -func (x *SelectBaanRequest) GetBaans() []string { - if x != nil { - return x.Baans - } - return nil -} - -type SelectBaanResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` -} - -func (x *SelectBaanResponse) Reset() { - *x = SelectBaanResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_group_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SelectBaanResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SelectBaanResponse) ProtoMessage() {} - -func (x *SelectBaanResponse) ProtoReflect() protoreflect.Message { - mi := &file_group_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SelectBaanResponse.ProtoReflect.Descriptor instead. -func (*SelectBaanResponse) Descriptor() ([]byte, []int) { - return file_group_proto_rawDescGZIP(), []int{15} -} - -func (x *SelectBaanResponse) GetSuccess() bool { - if x != nil { - return x.Success - } - return false -} - -var File_group_proto protoreflect.FileDescriptor - -var file_group_proto_rawDesc = []byte{ - 0x0a, 0x0b, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x1a, 0x0a, 0x62, 0x61, 0x61, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x22, 0x9a, 0x01, 0x0a, 0x05, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x49, 0x44, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x29, 0x0a, 0x07, - 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, - 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x07, - 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12, 0x24, 0x0a, 0x05, 0x62, 0x61, 0x61, 0x6e, 0x73, - 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x62, 0x61, 0x61, 0x6e, 0x2e, 0x42, 0x61, - 0x61, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x62, 0x61, 0x61, 0x6e, 0x73, 0x22, 0x70, 0x0a, - 0x08, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x66, 0x69, 0x72, - 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x66, 0x69, - 0x72, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x73, 0x74, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x61, 0x73, 0x74, 0x6e, - 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x55, 0x72, 0x6c, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x55, 0x72, 0x6c, 0x22, - 0x2d, 0x0a, 0x13, 0x46, 0x69, 0x6e, 0x64, 0x4f, 0x6e, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x3a, - 0x0a, 0x14, 0x46, 0x69, 0x6e, 0x64, 0x4f, 0x6e, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x2f, 0x0a, 0x17, 0x46, 0x69, - 0x6e, 0x64, 0x42, 0x79, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x69, 0x0a, 0x18, 0x46, - 0x69, 0x6e, 0x64, 0x42, 0x79, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x27, 0x0a, - 0x06, 0x6c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, - 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, - 0x6c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x22, 0x54, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x22, 0x0a, 0x05, - 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x67, 0x72, - 0x6f, 0x75, 0x70, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, - 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x6c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x49, 0x64, 0x22, 0x39, 0x0a, 0x13, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x40, 0x0a, 0x10, 0x4a, 0x6f, 0x69, 0x6e, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x74, - 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, - 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x37, 0x0a, 0x11, 0x4a, 0x6f, 0x69, - 0x6e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x22, - 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, - 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x05, 0x67, 0x72, 0x6f, - 0x75, 0x70, 0x22, 0x4e, 0x0a, 0x18, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x62, - 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, - 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x49, 0x64, 0x22, 0x3f, 0x0a, 0x19, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x62, - 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x22, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, - 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x05, 0x67, 0x72, - 0x6f, 0x75, 0x70, 0x22, 0x2b, 0x0a, 0x11, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, - 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, - 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, - 0x22, 0x38, 0x0a, 0x12, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x41, 0x0a, 0x11, 0x53, 0x65, - 0x6c, 0x65, 0x63, 0x74, 0x42, 0x61, 0x61, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x61, 0x61, 0x6e, 0x73, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x62, 0x61, 0x61, 0x6e, 0x73, 0x22, 0x2e, 0x0a, - 0x12, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x42, 0x61, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x32, 0x80, 0x04, - 0x0a, 0x0c, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x44, - 0x0a, 0x07, 0x46, 0x69, 0x6e, 0x64, 0x4f, 0x6e, 0x65, 0x12, 0x1a, 0x2e, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x4f, 0x6e, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x46, 0x69, - 0x6e, 0x64, 0x4f, 0x6e, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x12, 0x50, 0x0a, 0x0b, 0x46, 0x69, 0x6e, 0x64, 0x42, 0x79, 0x54, 0x6f, - 0x6b, 0x65, 0x6e, 0x12, 0x1e, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x46, 0x69, 0x6e, 0x64, - 0x42, 0x79, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x46, 0x69, 0x6e, 0x64, - 0x42, 0x79, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x41, 0x0a, 0x06, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x12, 0x19, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x67, 0x72, - 0x6f, 0x75, 0x70, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3b, 0x0a, 0x04, 0x4a, 0x6f, 0x69, - 0x6e, 0x12, 0x17, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x4a, 0x6f, 0x69, 0x6e, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x67, 0x72, 0x6f, - 0x75, 0x70, 0x2e, 0x4a, 0x6f, 0x69, 0x6e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x53, 0x0a, 0x0c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1f, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x44, - 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, - 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, - 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3e, 0x0a, 0x05, 0x4c, - 0x65, 0x61, 0x76, 0x65, 0x12, 0x18, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x4c, 0x65, 0x61, - 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, - 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, - 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x43, 0x0a, 0x0a, 0x53, - 0x65, 0x6c, 0x65, 0x63, 0x74, 0x42, 0x61, 0x61, 0x6e, 0x12, 0x18, 0x2e, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x42, 0x61, 0x61, 0x6e, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x53, 0x65, 0x6c, 0x65, - 0x63, 0x74, 0x42, 0x61, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, - 0x42, 0x0b, 0x5a, 0x09, 0x73, 0x72, 0x63, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_group_proto_rawDescOnce sync.Once - file_group_proto_rawDescData = file_group_proto_rawDesc -) - -func file_group_proto_rawDescGZIP() []byte { - file_group_proto_rawDescOnce.Do(func() { - file_group_proto_rawDescData = protoimpl.X.CompressGZIP(file_group_proto_rawDescData) - }) - return file_group_proto_rawDescData -} - -var file_group_proto_msgTypes = make([]protoimpl.MessageInfo, 16) -var file_group_proto_goTypes = []interface{}{ - (*Group)(nil), // 0: group.Group - (*UserInfo)(nil), // 1: group.UserInfo - (*FindOneGroupRequest)(nil), // 2: group.FindOneGroupRequest - (*FindOneGroupResponse)(nil), // 3: group.FindOneGroupResponse - (*FindByTokenGroupRequest)(nil), // 4: group.FindByTokenGroupRequest - (*FindByTokenGroupResponse)(nil), // 5: group.FindByTokenGroupResponse - (*UpdateGroupRequest)(nil), // 6: group.UpdateGroupRequest - (*UpdateGroupResponse)(nil), // 7: group.UpdateGroupResponse - (*JoinGroupRequest)(nil), // 8: group.JoinGroupRequest - (*JoinGroupResponse)(nil), // 9: group.JoinGroupResponse - (*DeleteMemberGroupRequest)(nil), // 10: group.DeleteMemberGroupRequest - (*DeleteMemberGroupResponse)(nil), // 11: group.DeleteMemberGroupResponse - (*LeaveGroupRequest)(nil), // 12: group.LeaveGroupRequest - (*LeaveGroupResponse)(nil), // 13: group.LeaveGroupResponse - (*SelectBaanRequest)(nil), // 14: group.SelectBaanRequest - (*SelectBaanResponse)(nil), // 15: group.SelectBaanResponse - (*BaanInfo)(nil), // 16: baan.BaanInfo -} -var file_group_proto_depIdxs = []int32{ - 1, // 0: group.Group.members:type_name -> group.UserInfo - 16, // 1: group.Group.baans:type_name -> baan.BaanInfo - 0, // 2: group.FindOneGroupResponse.group:type_name -> group.Group - 1, // 3: group.FindByTokenGroupResponse.leader:type_name -> group.UserInfo - 0, // 4: group.UpdateGroupRequest.group:type_name -> group.Group - 0, // 5: group.UpdateGroupResponse.group:type_name -> group.Group - 0, // 6: group.JoinGroupResponse.group:type_name -> group.Group - 0, // 7: group.DeleteMemberGroupResponse.group:type_name -> group.Group - 0, // 8: group.LeaveGroupResponse.group:type_name -> group.Group - 2, // 9: group.GroupService.FindOne:input_type -> group.FindOneGroupRequest - 4, // 10: group.GroupService.FindByToken:input_type -> group.FindByTokenGroupRequest - 6, // 11: group.GroupService.Update:input_type -> group.UpdateGroupRequest - 8, // 12: group.GroupService.Join:input_type -> group.JoinGroupRequest - 10, // 13: group.GroupService.DeleteMember:input_type -> group.DeleteMemberGroupRequest - 12, // 14: group.GroupService.Leave:input_type -> group.LeaveGroupRequest - 14, // 15: group.GroupService.SelectBaan:input_type -> group.SelectBaanRequest - 3, // 16: group.GroupService.FindOne:output_type -> group.FindOneGroupResponse - 5, // 17: group.GroupService.FindByToken:output_type -> group.FindByTokenGroupResponse - 7, // 18: group.GroupService.Update:output_type -> group.UpdateGroupResponse - 9, // 19: group.GroupService.Join:output_type -> group.JoinGroupResponse - 11, // 20: group.GroupService.DeleteMember:output_type -> group.DeleteMemberGroupResponse - 13, // 21: group.GroupService.Leave:output_type -> group.LeaveGroupResponse - 15, // 22: group.GroupService.SelectBaan:output_type -> group.SelectBaanResponse - 16, // [16:23] is the sub-list for method output_type - 9, // [9:16] is the sub-list for method input_type - 9, // [9:9] is the sub-list for extension type_name - 9, // [9:9] is the sub-list for extension extendee - 0, // [0:9] is the sub-list for field type_name -} - -func init() { file_group_proto_init() } -func file_group_proto_init() { - if File_group_proto != nil { - return - } - file_baan_proto_init() - if !protoimpl.UnsafeEnabled { - file_group_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Group); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_group_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UserInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_group_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FindOneGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_group_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FindOneGroupResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_group_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FindByTokenGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_group_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FindByTokenGroupResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_group_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_group_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateGroupResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_group_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*JoinGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_group_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*JoinGroupResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_group_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteMemberGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_group_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteMemberGroupResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_group_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LeaveGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_group_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LeaveGroupResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_group_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SelectBaanRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_group_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SelectBaanResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_group_proto_rawDesc, - NumEnums: 0, - NumMessages: 16, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_group_proto_goTypes, - DependencyIndexes: file_group_proto_depIdxs, - MessageInfos: file_group_proto_msgTypes, - }.Build() - File_group_proto = out.File - file_group_proto_rawDesc = nil - file_group_proto_goTypes = nil - file_group_proto_depIdxs = nil -} diff --git a/proto/group.proto b/proto/group.proto deleted file mode 100644 index 3c9fb30..0000000 --- a/proto/group.proto +++ /dev/null @@ -1,107 +0,0 @@ -syntax = "proto3"; - -package group; - -import "baan.proto"; - -option go_package = "proto"; - -service GroupService { - rpc FindOne(FindOneGroupRequest) returns (FindOneGroupResponse) {} - rpc FindByToken(FindByTokenGroupRequest) returns (FindByTokenGroupResponse) {} - rpc Update(UpdateGroupRequest) returns (UpdateGroupResponse) {} - rpc Join(JoinGroupRequest) returns (JoinGroupResponse) {} - rpc DeleteMember(DeleteMemberGroupRequest) returns (DeleteMemberGroupResponse){} - rpc Leave(LeaveGroupRequest) returns (LeaveGroupResponse){} - rpc SelectBaan(SelectBaanRequest) returns (SelectBaanResponse) {} -} - -message Group{ - string id = 1; - string leaderID = 2; - string token = 3; - repeated UserInfo members = 4; - repeated baan.BaanInfo baans = 5; -} - -message UserInfo { - string id = 1; - string firstname = 2; - string lastname = 3; - string imageUrl = 4; -} - -//Find One -message FindOneGroupRequest{ - string userId = 1; -} - -message FindOneGroupResponse{ - Group group = 1; -} - -// Find By Token - -message FindByTokenGroupRequest{ - string token = 1; -} - -message FindByTokenGroupResponse{ - string id = 1; - string token = 2; - UserInfo leader = 3; -} - -// Update - -message UpdateGroupRequest{ - Group group = 1; - string leaderId = 2; -} - -message UpdateGroupResponse{ - Group group = 1; -} - -//Join - -message JoinGroupRequest{ - string token = 1; - string userId = 2; -} - -message JoinGroupResponse{ - Group group = 1; -} - -// Delete - -message DeleteMemberGroupRequest{ - string userId = 1; - string leaderId = 2; -} - -message DeleteMemberGroupResponse{ - Group group = 1; -} - -//Leave - -message LeaveGroupRequest{ - string userId = 1; -} - -message LeaveGroupResponse{ - Group group = 1; -} - -// Select Baan - -message SelectBaanRequest{ - string userId = 1; - repeated string baans = 2; -} - -message SelectBaanResponse{ - bool success = 1; -} \ No newline at end of file diff --git a/proto/group_grpc.pb.go b/proto/group_grpc.pb.go deleted file mode 100644 index 52b0142..0000000 --- a/proto/group_grpc.pb.go +++ /dev/null @@ -1,321 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc v3.19.4 -// source: group.proto - -package proto - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -// GroupServiceClient is the client API for GroupService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type GroupServiceClient interface { - FindOne(ctx context.Context, in *FindOneGroupRequest, opts ...grpc.CallOption) (*FindOneGroupResponse, error) - FindByToken(ctx context.Context, in *FindByTokenGroupRequest, opts ...grpc.CallOption) (*FindByTokenGroupResponse, error) - Update(ctx context.Context, in *UpdateGroupRequest, opts ...grpc.CallOption) (*UpdateGroupResponse, error) - Join(ctx context.Context, in *JoinGroupRequest, opts ...grpc.CallOption) (*JoinGroupResponse, error) - DeleteMember(ctx context.Context, in *DeleteMemberGroupRequest, opts ...grpc.CallOption) (*DeleteMemberGroupResponse, error) - Leave(ctx context.Context, in *LeaveGroupRequest, opts ...grpc.CallOption) (*LeaveGroupResponse, error) - SelectBaan(ctx context.Context, in *SelectBaanRequest, opts ...grpc.CallOption) (*SelectBaanResponse, error) -} - -type groupServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewGroupServiceClient(cc grpc.ClientConnInterface) GroupServiceClient { - return &groupServiceClient{cc} -} - -func (c *groupServiceClient) FindOne(ctx context.Context, in *FindOneGroupRequest, opts ...grpc.CallOption) (*FindOneGroupResponse, error) { - out := new(FindOneGroupResponse) - err := c.cc.Invoke(ctx, "/group.GroupService/FindOne", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *groupServiceClient) FindByToken(ctx context.Context, in *FindByTokenGroupRequest, opts ...grpc.CallOption) (*FindByTokenGroupResponse, error) { - out := new(FindByTokenGroupResponse) - err := c.cc.Invoke(ctx, "/group.GroupService/FindByToken", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *groupServiceClient) Update(ctx context.Context, in *UpdateGroupRequest, opts ...grpc.CallOption) (*UpdateGroupResponse, error) { - out := new(UpdateGroupResponse) - err := c.cc.Invoke(ctx, "/group.GroupService/Update", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *groupServiceClient) Join(ctx context.Context, in *JoinGroupRequest, opts ...grpc.CallOption) (*JoinGroupResponse, error) { - out := new(JoinGroupResponse) - err := c.cc.Invoke(ctx, "/group.GroupService/Join", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *groupServiceClient) DeleteMember(ctx context.Context, in *DeleteMemberGroupRequest, opts ...grpc.CallOption) (*DeleteMemberGroupResponse, error) { - out := new(DeleteMemberGroupResponse) - err := c.cc.Invoke(ctx, "/group.GroupService/DeleteMember", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *groupServiceClient) Leave(ctx context.Context, in *LeaveGroupRequest, opts ...grpc.CallOption) (*LeaveGroupResponse, error) { - out := new(LeaveGroupResponse) - err := c.cc.Invoke(ctx, "/group.GroupService/Leave", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *groupServiceClient) SelectBaan(ctx context.Context, in *SelectBaanRequest, opts ...grpc.CallOption) (*SelectBaanResponse, error) { - out := new(SelectBaanResponse) - err := c.cc.Invoke(ctx, "/group.GroupService/SelectBaan", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// GroupServiceServer is the server API for GroupService service. -// All implementations must embed UnimplementedGroupServiceServer -// for forward compatibility -type GroupServiceServer interface { - FindOne(context.Context, *FindOneGroupRequest) (*FindOneGroupResponse, error) - FindByToken(context.Context, *FindByTokenGroupRequest) (*FindByTokenGroupResponse, error) - Update(context.Context, *UpdateGroupRequest) (*UpdateGroupResponse, error) - Join(context.Context, *JoinGroupRequest) (*JoinGroupResponse, error) - DeleteMember(context.Context, *DeleteMemberGroupRequest) (*DeleteMemberGroupResponse, error) - Leave(context.Context, *LeaveGroupRequest) (*LeaveGroupResponse, error) - SelectBaan(context.Context, *SelectBaanRequest) (*SelectBaanResponse, error) - mustEmbedUnimplementedGroupServiceServer() -} - -// UnimplementedGroupServiceServer must be embedded to have forward compatible implementations. -type UnimplementedGroupServiceServer struct { -} - -func (UnimplementedGroupServiceServer) FindOne(context.Context, *FindOneGroupRequest) (*FindOneGroupResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method FindOne not implemented") -} -func (UnimplementedGroupServiceServer) FindByToken(context.Context, *FindByTokenGroupRequest) (*FindByTokenGroupResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method FindByToken not implemented") -} -func (UnimplementedGroupServiceServer) Update(context.Context, *UpdateGroupRequest) (*UpdateGroupResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Update not implemented") -} -func (UnimplementedGroupServiceServer) Join(context.Context, *JoinGroupRequest) (*JoinGroupResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Join not implemented") -} -func (UnimplementedGroupServiceServer) DeleteMember(context.Context, *DeleteMemberGroupRequest) (*DeleteMemberGroupResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteMember not implemented") -} -func (UnimplementedGroupServiceServer) Leave(context.Context, *LeaveGroupRequest) (*LeaveGroupResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Leave not implemented") -} -func (UnimplementedGroupServiceServer) SelectBaan(context.Context, *SelectBaanRequest) (*SelectBaanResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SelectBaan not implemented") -} -func (UnimplementedGroupServiceServer) mustEmbedUnimplementedGroupServiceServer() {} - -// UnsafeGroupServiceServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to GroupServiceServer will -// result in compilation errors. -type UnsafeGroupServiceServer interface { - mustEmbedUnimplementedGroupServiceServer() -} - -func RegisterGroupServiceServer(s grpc.ServiceRegistrar, srv GroupServiceServer) { - s.RegisterService(&GroupService_ServiceDesc, srv) -} - -func _GroupService_FindOne_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(FindOneGroupRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(GroupServiceServer).FindOne(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/group.GroupService/FindOne", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GroupServiceServer).FindOne(ctx, req.(*FindOneGroupRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _GroupService_FindByToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(FindByTokenGroupRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(GroupServiceServer).FindByToken(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/group.GroupService/FindByToken", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GroupServiceServer).FindByToken(ctx, req.(*FindByTokenGroupRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _GroupService_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateGroupRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(GroupServiceServer).Update(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/group.GroupService/Update", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GroupServiceServer).Update(ctx, req.(*UpdateGroupRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _GroupService_Join_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(JoinGroupRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(GroupServiceServer).Join(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/group.GroupService/Join", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GroupServiceServer).Join(ctx, req.(*JoinGroupRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _GroupService_DeleteMember_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteMemberGroupRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(GroupServiceServer).DeleteMember(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/group.GroupService/DeleteMember", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GroupServiceServer).DeleteMember(ctx, req.(*DeleteMemberGroupRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _GroupService_Leave_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(LeaveGroupRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(GroupServiceServer).Leave(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/group.GroupService/Leave", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GroupServiceServer).Leave(ctx, req.(*LeaveGroupRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _GroupService_SelectBaan_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SelectBaanRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(GroupServiceServer).SelectBaan(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/group.GroupService/SelectBaan", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GroupServiceServer).SelectBaan(ctx, req.(*SelectBaanRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// GroupService_ServiceDesc is the grpc.ServiceDesc for GroupService service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var GroupService_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "group.GroupService", - HandlerType: (*GroupServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "FindOne", - Handler: _GroupService_FindOne_Handler, - }, - { - MethodName: "FindByToken", - Handler: _GroupService_FindByToken_Handler, - }, - { - MethodName: "Update", - Handler: _GroupService_Update_Handler, - }, - { - MethodName: "Join", - Handler: _GroupService_Join_Handler, - }, - { - MethodName: "DeleteMember", - Handler: _GroupService_DeleteMember_Handler, - }, - { - MethodName: "Leave", - Handler: _GroupService_Leave_Handler, - }, - { - MethodName: "SelectBaan", - Handler: _GroupService_SelectBaan_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "group.proto", -} diff --git a/proto/user.pb.go b/proto/user.pb.go deleted file mode 100644 index f5d7876..0000000 --- a/proto/user.pb.go +++ /dev/null @@ -1,1653 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.0 -// protoc v3.19.4 -// source: user.proto - -package proto - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type User struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"` - Firstname string `protobuf:"bytes,3,opt,name=firstname,proto3" json:"firstname,omitempty"` - Lastname string `protobuf:"bytes,4,opt,name=lastname,proto3" json:"lastname,omitempty"` - Nickname string `protobuf:"bytes,5,opt,name=nickname,proto3" json:"nickname,omitempty"` - StudentID string `protobuf:"bytes,6,opt,name=studentID,proto3" json:"studentID,omitempty"` - Faculty string `protobuf:"bytes,7,opt,name=faculty,proto3" json:"faculty,omitempty"` - Year string `protobuf:"bytes,8,opt,name=year,proto3" json:"year,omitempty"` - Phone string `protobuf:"bytes,9,opt,name=phone,proto3" json:"phone,omitempty"` - LineID string `protobuf:"bytes,10,opt,name=lineID,proto3" json:"lineID,omitempty"` - Email string `protobuf:"bytes,11,opt,name=email,proto3" json:"email,omitempty"` - AllergyFood string `protobuf:"bytes,12,opt,name=allergyFood,proto3" json:"allergyFood,omitempty"` - FoodRestriction string `protobuf:"bytes,13,opt,name=foodRestriction,proto3" json:"foodRestriction,omitempty"` - AllergyMedicine string `protobuf:"bytes,14,opt,name=allergyMedicine,proto3" json:"allergyMedicine,omitempty"` - Disease string `protobuf:"bytes,15,opt,name=disease,proto3" json:"disease,omitempty"` - ImageUrl string `protobuf:"bytes,16,opt,name=imageUrl,proto3" json:"imageUrl,omitempty"` - CanSelectBaan bool `protobuf:"varint,17,opt,name=canSelectBaan,proto3" json:"canSelectBaan,omitempty"` - IsVerify bool `protobuf:"varint,18,opt,name=isVerify,proto3" json:"isVerify,omitempty"` - BaanId string `protobuf:"bytes,19,opt,name=baanId,proto3" json:"baanId,omitempty"` - IsGotTicket bool `protobuf:"varint,20,opt,name=isGotTicket,proto3" json:"isGotTicket,omitempty"` -} - -func (x *User) Reset() { - *x = User{} - if protoimpl.UnsafeEnabled { - mi := &file_user_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *User) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*User) ProtoMessage() {} - -func (x *User) ProtoReflect() protoreflect.Message { - mi := &file_user_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use User.ProtoReflect.Descriptor instead. -func (*User) Descriptor() ([]byte, []int) { - return file_user_proto_rawDescGZIP(), []int{0} -} - -func (x *User) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *User) GetTitle() string { - if x != nil { - return x.Title - } - return "" -} - -func (x *User) GetFirstname() string { - if x != nil { - return x.Firstname - } - return "" -} - -func (x *User) GetLastname() string { - if x != nil { - return x.Lastname - } - return "" -} - -func (x *User) GetNickname() string { - if x != nil { - return x.Nickname - } - return "" -} - -func (x *User) GetStudentID() string { - if x != nil { - return x.StudentID - } - return "" -} - -func (x *User) GetFaculty() string { - if x != nil { - return x.Faculty - } - return "" -} - -func (x *User) GetYear() string { - if x != nil { - return x.Year - } - return "" -} - -func (x *User) GetPhone() string { - if x != nil { - return x.Phone - } - return "" -} - -func (x *User) GetLineID() string { - if x != nil { - return x.LineID - } - return "" -} - -func (x *User) GetEmail() string { - if x != nil { - return x.Email - } - return "" -} - -func (x *User) GetAllergyFood() string { - if x != nil { - return x.AllergyFood - } - return "" -} - -func (x *User) GetFoodRestriction() string { - if x != nil { - return x.FoodRestriction - } - return "" -} - -func (x *User) GetAllergyMedicine() string { - if x != nil { - return x.AllergyMedicine - } - return "" -} - -func (x *User) GetDisease() string { - if x != nil { - return x.Disease - } - return "" -} - -func (x *User) GetImageUrl() string { - if x != nil { - return x.ImageUrl - } - return "" -} - -func (x *User) GetCanSelectBaan() bool { - if x != nil { - return x.CanSelectBaan - } - return false -} - -func (x *User) GetIsVerify() bool { - if x != nil { - return x.IsVerify - } - return false -} - -func (x *User) GetBaanId() string { - if x != nil { - return x.BaanId - } - return "" -} - -func (x *User) GetIsGotTicket() bool { - if x != nil { - return x.IsGotTicket - } - return false -} - -type FindOneUserRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` -} - -func (x *FindOneUserRequest) Reset() { - *x = FindOneUserRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_user_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FindOneUserRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FindOneUserRequest) ProtoMessage() {} - -func (x *FindOneUserRequest) ProtoReflect() protoreflect.Message { - mi := &file_user_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FindOneUserRequest.ProtoReflect.Descriptor instead. -func (*FindOneUserRequest) Descriptor() ([]byte, []int) { - return file_user_proto_rawDescGZIP(), []int{1} -} - -func (x *FindOneUserRequest) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -type FindOneUserResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` -} - -func (x *FindOneUserResponse) Reset() { - *x = FindOneUserResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_user_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FindOneUserResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FindOneUserResponse) ProtoMessage() {} - -func (x *FindOneUserResponse) ProtoReflect() protoreflect.Message { - mi := &file_user_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FindOneUserResponse.ProtoReflect.Descriptor instead. -func (*FindOneUserResponse) Descriptor() ([]byte, []int) { - return file_user_proto_rawDescGZIP(), []int{2} -} - -func (x *FindOneUserResponse) GetUser() *User { - if x != nil { - return x.User - } - return nil -} - -type FindByStudentIDUserRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - StudentId string `protobuf:"bytes,1,opt,name=studentId,proto3" json:"studentId,omitempty"` -} - -func (x *FindByStudentIDUserRequest) Reset() { - *x = FindByStudentIDUserRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_user_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FindByStudentIDUserRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FindByStudentIDUserRequest) ProtoMessage() {} - -func (x *FindByStudentIDUserRequest) ProtoReflect() protoreflect.Message { - mi := &file_user_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FindByStudentIDUserRequest.ProtoReflect.Descriptor instead. -func (*FindByStudentIDUserRequest) Descriptor() ([]byte, []int) { - return file_user_proto_rawDescGZIP(), []int{3} -} - -func (x *FindByStudentIDUserRequest) GetStudentId() string { - if x != nil { - return x.StudentId - } - return "" -} - -type FindByStudentIDUserResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` -} - -func (x *FindByStudentIDUserResponse) Reset() { - *x = FindByStudentIDUserResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_user_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FindByStudentIDUserResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FindByStudentIDUserResponse) ProtoMessage() {} - -func (x *FindByStudentIDUserResponse) ProtoReflect() protoreflect.Message { - mi := &file_user_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FindByStudentIDUserResponse.ProtoReflect.Descriptor instead. -func (*FindByStudentIDUserResponse) Descriptor() ([]byte, []int) { - return file_user_proto_rawDescGZIP(), []int{4} -} - -func (x *FindByStudentIDUserResponse) GetUser() *User { - if x != nil { - return x.User - } - return nil -} - -type CreateUserRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` -} - -func (x *CreateUserRequest) Reset() { - *x = CreateUserRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_user_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CreateUserRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateUserRequest) ProtoMessage() {} - -func (x *CreateUserRequest) ProtoReflect() protoreflect.Message { - mi := &file_user_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateUserRequest.ProtoReflect.Descriptor instead. -func (*CreateUserRequest) Descriptor() ([]byte, []int) { - return file_user_proto_rawDescGZIP(), []int{5} -} - -func (x *CreateUserRequest) GetUser() *User { - if x != nil { - return x.User - } - return nil -} - -type CreateUserResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` -} - -func (x *CreateUserResponse) Reset() { - *x = CreateUserResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_user_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CreateUserResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateUserResponse) ProtoMessage() {} - -func (x *CreateUserResponse) ProtoReflect() protoreflect.Message { - mi := &file_user_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateUserResponse.ProtoReflect.Descriptor instead. -func (*CreateUserResponse) Descriptor() ([]byte, []int) { - return file_user_proto_rawDescGZIP(), []int{6} -} - -func (x *CreateUserResponse) GetUser() *User { - if x != nil { - return x.User - } - return nil -} - -type UpdateUserRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"` - Firstname string `protobuf:"bytes,3,opt,name=firstname,proto3" json:"firstname,omitempty"` - Lastname string `protobuf:"bytes,4,opt,name=lastname,proto3" json:"lastname,omitempty"` - Nickname string `protobuf:"bytes,5,opt,name=nickname,proto3" json:"nickname,omitempty"` - Phone string `protobuf:"bytes,6,opt,name=phone,proto3" json:"phone,omitempty"` - LineID string `protobuf:"bytes,7,opt,name=lineID,proto3" json:"lineID,omitempty"` - Email string `protobuf:"bytes,8,opt,name=email,proto3" json:"email,omitempty"` - AllergyFood string `protobuf:"bytes,9,opt,name=allergyFood,proto3" json:"allergyFood,omitempty"` - FoodRestriction string `protobuf:"bytes,10,opt,name=foodRestriction,proto3" json:"foodRestriction,omitempty"` - AllergyMedicine string `protobuf:"bytes,11,opt,name=allergyMedicine,proto3" json:"allergyMedicine,omitempty"` - Disease string `protobuf:"bytes,12,opt,name=disease,proto3" json:"disease,omitempty"` -} - -func (x *UpdateUserRequest) Reset() { - *x = UpdateUserRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_user_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpdateUserRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateUserRequest) ProtoMessage() {} - -func (x *UpdateUserRequest) ProtoReflect() protoreflect.Message { - mi := &file_user_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpdateUserRequest.ProtoReflect.Descriptor instead. -func (*UpdateUserRequest) Descriptor() ([]byte, []int) { - return file_user_proto_rawDescGZIP(), []int{7} -} - -func (x *UpdateUserRequest) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *UpdateUserRequest) GetTitle() string { - if x != nil { - return x.Title - } - return "" -} - -func (x *UpdateUserRequest) GetFirstname() string { - if x != nil { - return x.Firstname - } - return "" -} - -func (x *UpdateUserRequest) GetLastname() string { - if x != nil { - return x.Lastname - } - return "" -} - -func (x *UpdateUserRequest) GetNickname() string { - if x != nil { - return x.Nickname - } - return "" -} - -func (x *UpdateUserRequest) GetPhone() string { - if x != nil { - return x.Phone - } - return "" -} - -func (x *UpdateUserRequest) GetLineID() string { - if x != nil { - return x.LineID - } - return "" -} - -func (x *UpdateUserRequest) GetEmail() string { - if x != nil { - return x.Email - } - return "" -} - -func (x *UpdateUserRequest) GetAllergyFood() string { - if x != nil { - return x.AllergyFood - } - return "" -} - -func (x *UpdateUserRequest) GetFoodRestriction() string { - if x != nil { - return x.FoodRestriction - } - return "" -} - -func (x *UpdateUserRequest) GetAllergyMedicine() string { - if x != nil { - return x.AllergyMedicine - } - return "" -} - -func (x *UpdateUserRequest) GetDisease() string { - if x != nil { - return x.Disease - } - return "" -} - -type UpdateUserResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` -} - -func (x *UpdateUserResponse) Reset() { - *x = UpdateUserResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_user_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpdateUserResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateUserResponse) ProtoMessage() {} - -func (x *UpdateUserResponse) ProtoReflect() protoreflect.Message { - mi := &file_user_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpdateUserResponse.ProtoReflect.Descriptor instead. -func (*UpdateUserResponse) Descriptor() ([]byte, []int) { - return file_user_proto_rawDescGZIP(), []int{8} -} - -func (x *UpdateUserResponse) GetUser() *User { - if x != nil { - return x.User - } - return nil -} - -type DeleteUserRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` -} - -func (x *DeleteUserRequest) Reset() { - *x = DeleteUserRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_user_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeleteUserRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteUserRequest) ProtoMessage() {} - -func (x *DeleteUserRequest) ProtoReflect() protoreflect.Message { - mi := &file_user_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteUserRequest.ProtoReflect.Descriptor instead. -func (*DeleteUserRequest) Descriptor() ([]byte, []int) { - return file_user_proto_rawDescGZIP(), []int{9} -} - -func (x *DeleteUserRequest) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -type DeleteUserResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` -} - -func (x *DeleteUserResponse) Reset() { - *x = DeleteUserResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_user_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeleteUserResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteUserResponse) ProtoMessage() {} - -func (x *DeleteUserResponse) ProtoReflect() protoreflect.Message { - mi := &file_user_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteUserResponse.ProtoReflect.Descriptor instead. -func (*DeleteUserResponse) Descriptor() ([]byte, []int) { - return file_user_proto_rawDescGZIP(), []int{10} -} - -func (x *DeleteUserResponse) GetSuccess() bool { - if x != nil { - return x.Success - } - return false -} - -type CreateOrUpdateUserRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` -} - -func (x *CreateOrUpdateUserRequest) Reset() { - *x = CreateOrUpdateUserRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_user_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CreateOrUpdateUserRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateOrUpdateUserRequest) ProtoMessage() {} - -func (x *CreateOrUpdateUserRequest) ProtoReflect() protoreflect.Message { - mi := &file_user_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateOrUpdateUserRequest.ProtoReflect.Descriptor instead. -func (*CreateOrUpdateUserRequest) Descriptor() ([]byte, []int) { - return file_user_proto_rawDescGZIP(), []int{11} -} - -func (x *CreateOrUpdateUserRequest) GetUser() *User { - if x != nil { - return x.User - } - return nil -} - -type CreateOrUpdateUserResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` -} - -func (x *CreateOrUpdateUserResponse) Reset() { - *x = CreateOrUpdateUserResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_user_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CreateOrUpdateUserResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateOrUpdateUserResponse) ProtoMessage() {} - -func (x *CreateOrUpdateUserResponse) ProtoReflect() protoreflect.Message { - mi := &file_user_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateOrUpdateUserResponse.ProtoReflect.Descriptor instead. -func (*CreateOrUpdateUserResponse) Descriptor() ([]byte, []int) { - return file_user_proto_rawDescGZIP(), []int{12} -} - -func (x *CreateOrUpdateUserResponse) GetUser() *User { - if x != nil { - return x.User - } - return nil -} - -type VerifyUserRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - StudentId string `protobuf:"bytes,1,opt,name=studentId,proto3" json:"studentId,omitempty"` - VerifyType string `protobuf:"bytes,2,opt,name=verifyType,proto3" json:"verifyType,omitempty"` -} - -func (x *VerifyUserRequest) Reset() { - *x = VerifyUserRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_user_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *VerifyUserRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*VerifyUserRequest) ProtoMessage() {} - -func (x *VerifyUserRequest) ProtoReflect() protoreflect.Message { - mi := &file_user_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use VerifyUserRequest.ProtoReflect.Descriptor instead. -func (*VerifyUserRequest) Descriptor() ([]byte, []int) { - return file_user_proto_rawDescGZIP(), []int{13} -} - -func (x *VerifyUserRequest) GetStudentId() string { - if x != nil { - return x.StudentId - } - return "" -} - -func (x *VerifyUserRequest) GetVerifyType() string { - if x != nil { - return x.VerifyType - } - return "" -} - -type VerifyUserResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` -} - -func (x *VerifyUserResponse) Reset() { - *x = VerifyUserResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_user_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *VerifyUserResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*VerifyUserResponse) ProtoMessage() {} - -func (x *VerifyUserResponse) ProtoReflect() protoreflect.Message { - mi := &file_user_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use VerifyUserResponse.ProtoReflect.Descriptor instead. -func (*VerifyUserResponse) Descriptor() ([]byte, []int) { - return file_user_proto_rawDescGZIP(), []int{14} -} - -func (x *VerifyUserResponse) GetSuccess() bool { - if x != nil { - return x.Success - } - return false -} - -// ConfirmEstamp -type ConfirmEstampRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - UId string `protobuf:"bytes,1,opt,name=uId,proto3" json:"uId,omitempty"` - EId string `protobuf:"bytes,2,opt,name=eId,proto3" json:"eId,omitempty"` -} - -func (x *ConfirmEstampRequest) Reset() { - *x = ConfirmEstampRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_user_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ConfirmEstampRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ConfirmEstampRequest) ProtoMessage() {} - -func (x *ConfirmEstampRequest) ProtoReflect() protoreflect.Message { - mi := &file_user_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ConfirmEstampRequest.ProtoReflect.Descriptor instead. -func (*ConfirmEstampRequest) Descriptor() ([]byte, []int) { - return file_user_proto_rawDescGZIP(), []int{15} -} - -func (x *ConfirmEstampRequest) GetUId() string { - if x != nil { - return x.UId - } - return "" -} - -func (x *ConfirmEstampRequest) GetEId() string { - if x != nil { - return x.EId - } - return "" -} - -type ConfirmEstampResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *ConfirmEstampResponse) Reset() { - *x = ConfirmEstampResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_user_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ConfirmEstampResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ConfirmEstampResponse) ProtoMessage() {} - -func (x *ConfirmEstampResponse) ProtoReflect() protoreflect.Message { - mi := &file_user_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ConfirmEstampResponse.ProtoReflect.Descriptor instead. -func (*ConfirmEstampResponse) Descriptor() ([]byte, []int) { - return file_user_proto_rawDescGZIP(), []int{16} -} - -// GetUserEstamp -type GetUserEstampRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - UId string `protobuf:"bytes,1,opt,name=uId,proto3" json:"uId,omitempty"` -} - -func (x *GetUserEstampRequest) Reset() { - *x = GetUserEstampRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_user_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetUserEstampRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetUserEstampRequest) ProtoMessage() {} - -func (x *GetUserEstampRequest) ProtoReflect() protoreflect.Message { - mi := &file_user_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetUserEstampRequest.ProtoReflect.Descriptor instead. -func (*GetUserEstampRequest) Descriptor() ([]byte, []int) { - return file_user_proto_rawDescGZIP(), []int{17} -} - -func (x *GetUserEstampRequest) GetUId() string { - if x != nil { - return x.UId - } - return "" -} - -type GetUserEstampResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - EventList []*Event `protobuf:"bytes,1,rep,name=eventList,proto3" json:"eventList,omitempty"` -} - -func (x *GetUserEstampResponse) Reset() { - *x = GetUserEstampResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_user_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetUserEstampResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetUserEstampResponse) ProtoMessage() {} - -func (x *GetUserEstampResponse) ProtoReflect() protoreflect.Message { - mi := &file_user_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetUserEstampResponse.ProtoReflect.Descriptor instead. -func (*GetUserEstampResponse) Descriptor() ([]byte, []int) { - return file_user_proto_rawDescGZIP(), []int{18} -} - -func (x *GetUserEstampResponse) GetEventList() []*Event { - if x != nil { - return x.EventList - } - return nil -} - -var File_user_proto protoreflect.FileDescriptor - -var file_user_proto_rawDesc = []byte{ - 0x0a, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x04, 0x75, 0x73, - 0x65, 0x72, 0x1a, 0x0b, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0xba, 0x04, 0x0a, 0x04, 0x55, 0x73, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x1c, - 0x0a, 0x09, 0x66, 0x69, 0x72, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x09, 0x66, 0x69, 0x72, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, - 0x6c, 0x61, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x6c, 0x61, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x69, 0x63, 0x6b, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x69, 0x63, 0x6b, - 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x74, 0x75, 0x64, 0x65, 0x6e, 0x74, 0x49, - 0x44, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x75, 0x64, 0x65, 0x6e, 0x74, - 0x49, 0x44, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x61, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x66, 0x61, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x12, 0x12, 0x0a, 0x04, - 0x79, 0x65, 0x61, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x79, 0x65, 0x61, 0x72, - 0x12, 0x14, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x44, - 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x44, 0x12, 0x14, - 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, - 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x67, 0x79, 0x46, - 0x6f, 0x6f, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x6c, 0x6c, 0x65, 0x72, - 0x67, 0x79, 0x46, 0x6f, 0x6f, 0x64, 0x12, 0x28, 0x0a, 0x0f, 0x66, 0x6f, 0x6f, 0x64, 0x52, 0x65, - 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0f, 0x66, 0x6f, 0x6f, 0x64, 0x52, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x28, 0x0a, 0x0f, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x67, 0x79, 0x4d, 0x65, 0x64, 0x69, 0x63, - 0x69, 0x6e, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x61, 0x6c, 0x6c, 0x65, 0x72, - 0x67, 0x79, 0x4d, 0x65, 0x64, 0x69, 0x63, 0x69, 0x6e, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x69, - 0x73, 0x65, 0x61, 0x73, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x64, 0x69, 0x73, - 0x65, 0x61, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x55, 0x72, 0x6c, - 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x55, 0x72, 0x6c, - 0x12, 0x24, 0x0a, 0x0d, 0x63, 0x61, 0x6e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x42, 0x61, 0x61, - 0x6e, 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x63, 0x61, 0x6e, 0x53, 0x65, 0x6c, 0x65, - 0x63, 0x74, 0x42, 0x61, 0x61, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x73, 0x56, 0x65, 0x72, 0x69, - 0x66, 0x79, 0x18, 0x12, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, 0x56, 0x65, 0x72, 0x69, - 0x66, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x61, 0x61, 0x6e, 0x49, 0x64, 0x18, 0x13, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x62, 0x61, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x69, 0x73, - 0x47, 0x6f, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x14, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x0b, 0x69, 0x73, 0x47, 0x6f, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x22, 0x24, 0x0a, 0x12, - 0x46, 0x69, 0x6e, 0x64, 0x4f, 0x6e, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, - 0x69, 0x64, 0x22, 0x35, 0x0a, 0x13, 0x46, 0x69, 0x6e, 0x64, 0x4f, 0x6e, 0x65, 0x55, 0x73, 0x65, - 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x04, 0x75, 0x73, 0x65, - 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x55, - 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, 0x3a, 0x0a, 0x1a, 0x46, 0x69, 0x6e, - 0x64, 0x42, 0x79, 0x53, 0x74, 0x75, 0x64, 0x65, 0x6e, 0x74, 0x49, 0x44, 0x55, 0x73, 0x65, 0x72, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x74, 0x75, 0x64, 0x65, - 0x6e, 0x74, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x75, 0x64, - 0x65, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x3d, 0x0a, 0x1b, 0x46, 0x69, 0x6e, 0x64, 0x42, 0x79, 0x53, - 0x74, 0x75, 0x64, 0x65, 0x6e, 0x74, 0x49, 0x44, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, - 0x75, 0x73, 0x65, 0x72, 0x22, 0x33, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, - 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x04, 0x75, 0x73, 0x65, - 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x55, - 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, 0x34, 0x0a, 0x12, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x1e, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, - 0x75, 0x73, 0x65, 0x72, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, - 0xe3, 0x02, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x66, - 0x69, 0x72, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x66, 0x69, 0x72, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x73, - 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x61, 0x73, - 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, - 0x65, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x69, 0x6e, 0x65, 0x49, - 0x44, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x44, 0x12, - 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x67, 0x79, - 0x46, 0x6f, 0x6f, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x6c, 0x6c, 0x65, - 0x72, 0x67, 0x79, 0x46, 0x6f, 0x6f, 0x64, 0x12, 0x28, 0x0a, 0x0f, 0x66, 0x6f, 0x6f, 0x64, 0x52, - 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0f, 0x66, 0x6f, 0x6f, 0x64, 0x52, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x28, 0x0a, 0x0f, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x67, 0x79, 0x4d, 0x65, 0x64, 0x69, - 0x63, 0x69, 0x6e, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x61, 0x6c, 0x6c, 0x65, - 0x72, 0x67, 0x79, 0x4d, 0x65, 0x64, 0x69, 0x63, 0x69, 0x6e, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x64, - 0x69, 0x73, 0x65, 0x61, 0x73, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x64, 0x69, - 0x73, 0x65, 0x61, 0x73, 0x65, 0x22, 0x34, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, - 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x04, 0x75, - 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x75, 0x73, 0x65, 0x72, - 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, 0x23, 0x0a, 0x11, 0x44, - 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, - 0x22, 0x2e, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, - 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, - 0x22, 0x3b, 0x0a, 0x19, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, - 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x75, 0x73, - 0x65, 0x72, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, 0x3c, 0x0a, - 0x1a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, - 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x04, 0x75, - 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x75, 0x73, 0x65, 0x72, - 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, 0x51, 0x0a, 0x11, 0x56, - 0x65, 0x72, 0x69, 0x66, 0x79, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x74, 0x75, 0x64, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x75, 0x64, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1e, - 0x0a, 0x0a, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0a, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x54, 0x79, 0x70, 0x65, 0x22, 0x2e, - 0x0a, 0x12, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x22, 0x3a, - 0x0a, 0x14, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x45, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x49, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x49, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x65, 0x49, 0x64, 0x22, 0x17, 0x0a, 0x15, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x45, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x28, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x45, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x75, - 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x49, 0x64, 0x22, 0x43, 0x0a, - 0x15, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x45, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x09, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x4c, - 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x65, 0x76, 0x65, 0x6e, - 0x74, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x09, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x69, - 0x73, 0x74, 0x32, 0x94, 0x05, 0x0a, 0x0b, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x12, 0x40, 0x0a, 0x07, 0x46, 0x69, 0x6e, 0x64, 0x4f, 0x6e, 0x65, 0x12, 0x18, 0x2e, - 0x75, 0x73, 0x65, 0x72, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x4f, 0x6e, 0x65, 0x55, 0x73, 0x65, 0x72, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x46, - 0x69, 0x6e, 0x64, 0x4f, 0x6e, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x12, 0x58, 0x0a, 0x0f, 0x46, 0x69, 0x6e, 0x64, 0x42, 0x79, 0x53, 0x74, - 0x75, 0x64, 0x65, 0x6e, 0x74, 0x49, 0x44, 0x12, 0x20, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x46, - 0x69, 0x6e, 0x64, 0x42, 0x79, 0x53, 0x74, 0x75, 0x64, 0x65, 0x6e, 0x74, 0x49, 0x44, 0x55, 0x73, - 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x75, 0x73, 0x65, 0x72, - 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x42, 0x79, 0x53, 0x74, 0x75, 0x64, 0x65, 0x6e, 0x74, 0x49, 0x44, - 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3d, - 0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x17, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x18, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, - 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3d, 0x0a, - 0x06, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x17, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x18, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, - 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3d, 0x0a, 0x06, - 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x12, 0x17, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x56, 0x65, - 0x72, 0x69, 0x66, 0x79, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x18, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x55, 0x73, 0x65, - 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3d, 0x0a, 0x06, 0x44, - 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x17, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x44, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, - 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x55, 0x0a, 0x0e, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x1f, 0x2e, 0x75, - 0x73, 0x65, 0x72, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, - 0x75, 0x73, 0x65, 0x72, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x12, 0x4a, 0x0a, 0x0d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x45, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x12, 0x1a, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, - 0x6d, 0x45, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, - 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x45, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4a, 0x0a, - 0x0d, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x45, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1a, - 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x45, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x75, 0x73, 0x65, - 0x72, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x45, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x0b, 0x5a, 0x09, 0x73, 0x72, 0x63, - 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_user_proto_rawDescOnce sync.Once - file_user_proto_rawDescData = file_user_proto_rawDesc -) - -func file_user_proto_rawDescGZIP() []byte { - file_user_proto_rawDescOnce.Do(func() { - file_user_proto_rawDescData = protoimpl.X.CompressGZIP(file_user_proto_rawDescData) - }) - return file_user_proto_rawDescData -} - -var file_user_proto_msgTypes = make([]protoimpl.MessageInfo, 19) -var file_user_proto_goTypes = []interface{}{ - (*User)(nil), // 0: user.User - (*FindOneUserRequest)(nil), // 1: user.FindOneUserRequest - (*FindOneUserResponse)(nil), // 2: user.FindOneUserResponse - (*FindByStudentIDUserRequest)(nil), // 3: user.FindByStudentIDUserRequest - (*FindByStudentIDUserResponse)(nil), // 4: user.FindByStudentIDUserResponse - (*CreateUserRequest)(nil), // 5: user.CreateUserRequest - (*CreateUserResponse)(nil), // 6: user.CreateUserResponse - (*UpdateUserRequest)(nil), // 7: user.UpdateUserRequest - (*UpdateUserResponse)(nil), // 8: user.UpdateUserResponse - (*DeleteUserRequest)(nil), // 9: user.DeleteUserRequest - (*DeleteUserResponse)(nil), // 10: user.DeleteUserResponse - (*CreateOrUpdateUserRequest)(nil), // 11: user.CreateOrUpdateUserRequest - (*CreateOrUpdateUserResponse)(nil), // 12: user.CreateOrUpdateUserResponse - (*VerifyUserRequest)(nil), // 13: user.VerifyUserRequest - (*VerifyUserResponse)(nil), // 14: user.VerifyUserResponse - (*ConfirmEstampRequest)(nil), // 15: user.ConfirmEstampRequest - (*ConfirmEstampResponse)(nil), // 16: user.ConfirmEstampResponse - (*GetUserEstampRequest)(nil), // 17: user.GetUserEstampRequest - (*GetUserEstampResponse)(nil), // 18: user.GetUserEstampResponse - (*Event)(nil), // 19: event.Event -} -var file_user_proto_depIdxs = []int32{ - 0, // 0: user.FindOneUserResponse.user:type_name -> user.User - 0, // 1: user.FindByStudentIDUserResponse.user:type_name -> user.User - 0, // 2: user.CreateUserRequest.user:type_name -> user.User - 0, // 3: user.CreateUserResponse.user:type_name -> user.User - 0, // 4: user.UpdateUserResponse.user:type_name -> user.User - 0, // 5: user.CreateOrUpdateUserRequest.user:type_name -> user.User - 0, // 6: user.CreateOrUpdateUserResponse.user:type_name -> user.User - 19, // 7: user.GetUserEstampResponse.eventList:type_name -> event.Event - 1, // 8: user.UserService.FindOne:input_type -> user.FindOneUserRequest - 3, // 9: user.UserService.FindByStudentID:input_type -> user.FindByStudentIDUserRequest - 5, // 10: user.UserService.Create:input_type -> user.CreateUserRequest - 7, // 11: user.UserService.Update:input_type -> user.UpdateUserRequest - 13, // 12: user.UserService.Verify:input_type -> user.VerifyUserRequest - 9, // 13: user.UserService.Delete:input_type -> user.DeleteUserRequest - 11, // 14: user.UserService.CreateOrUpdate:input_type -> user.CreateOrUpdateUserRequest - 15, // 15: user.UserService.ConfirmEstamp:input_type -> user.ConfirmEstampRequest - 17, // 16: user.UserService.GetUserEstamp:input_type -> user.GetUserEstampRequest - 2, // 17: user.UserService.FindOne:output_type -> user.FindOneUserResponse - 4, // 18: user.UserService.FindByStudentID:output_type -> user.FindByStudentIDUserResponse - 6, // 19: user.UserService.Create:output_type -> user.CreateUserResponse - 8, // 20: user.UserService.Update:output_type -> user.UpdateUserResponse - 14, // 21: user.UserService.Verify:output_type -> user.VerifyUserResponse - 10, // 22: user.UserService.Delete:output_type -> user.DeleteUserResponse - 12, // 23: user.UserService.CreateOrUpdate:output_type -> user.CreateOrUpdateUserResponse - 16, // 24: user.UserService.ConfirmEstamp:output_type -> user.ConfirmEstampResponse - 18, // 25: user.UserService.GetUserEstamp:output_type -> user.GetUserEstampResponse - 17, // [17:26] is the sub-list for method output_type - 8, // [8:17] is the sub-list for method input_type - 8, // [8:8] is the sub-list for extension type_name - 8, // [8:8] is the sub-list for extension extendee - 0, // [0:8] is the sub-list for field type_name -} - -func init() { file_user_proto_init() } -func file_user_proto_init() { - if File_user_proto != nil { - return - } - file_event_proto_init() - if !protoimpl.UnsafeEnabled { - file_user_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*User); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_user_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FindOneUserRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_user_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FindOneUserResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_user_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FindByStudentIDUserRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_user_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FindByStudentIDUserResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_user_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateUserRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_user_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateUserResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_user_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateUserRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_user_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateUserResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_user_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteUserRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_user_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteUserResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_user_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateOrUpdateUserRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_user_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateOrUpdateUserResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_user_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VerifyUserRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_user_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VerifyUserResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_user_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ConfirmEstampRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_user_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ConfirmEstampResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_user_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetUserEstampRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_user_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetUserEstampResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_user_proto_rawDesc, - NumEnums: 0, - NumMessages: 19, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_user_proto_goTypes, - DependencyIndexes: file_user_proto_depIdxs, - MessageInfos: file_user_proto_msgTypes, - }.Build() - File_user_proto = out.File - file_user_proto_rawDesc = nil - file_user_proto_goTypes = nil - file_user_proto_depIdxs = nil -} diff --git a/proto/user.proto b/proto/user.proto deleted file mode 100644 index ea363e2..0000000 --- a/proto/user.proto +++ /dev/null @@ -1,141 +0,0 @@ -syntax = "proto3"; -import "event.proto"; -package user; - -option go_package = "proto"; - -service UserService { - rpc FindOne(FindOneUserRequest) returns (FindOneUserResponse){} - rpc FindByStudentID(FindByStudentIDUserRequest) returns(FindByStudentIDUserResponse) {} - rpc Create(CreateUserRequest) returns (CreateUserResponse){} - rpc Update(UpdateUserRequest) returns (UpdateUserResponse){} - rpc Verify(VerifyUserRequest) returns (VerifyUserResponse){} - rpc Delete(DeleteUserRequest) returns (DeleteUserResponse){} - rpc CreateOrUpdate(CreateOrUpdateUserRequest) returns (CreateOrUpdateUserResponse){} - rpc ConfirmEstamp(ConfirmEstampRequest) returns (ConfirmEstampResponse){} - rpc GetUserEstamp(GetUserEstampRequest) returns (GetUserEstampResponse){} -} - -message User{ - string id = 1; - string title = 2; - string firstname = 3; - string lastname = 4; - string nickname = 5; - string studentID = 6; - string faculty = 7; - string year = 8; - string phone = 9; - string lineID = 10; - string email = 11; - string allergyFood = 12; - string foodRestriction = 13; - string allergyMedicine = 14; - string disease = 15; - string imageUrl = 16; - bool canSelectBaan = 17; - bool isVerify = 18; - string baanId = 19; - bool isGotTicket = 20; -} - -// FindOne - -message FindOneUserRequest{ - string id = 1; -} - -message FindOneUserResponse{ - User user = 1; -} - -// Find By Student ID - -message FindByStudentIDUserRequest{ - string studentId = 1; -} - -message FindByStudentIDUserResponse{ - User user = 1; -} - -// Create - -message CreateUserRequest{ - User user = 1; -} - -message CreateUserResponse{ - User user = 1; -} - -// Update - -message UpdateUserRequest{ - string id = 1; - string title = 2; - string firstname = 3; - string lastname = 4; - string nickname = 5; - string phone = 6; - string lineID = 7; - string email = 8; - string allergyFood = 9; - string foodRestriction = 10; - string allergyMedicine = 11; - string disease = 12; -} - -message UpdateUserResponse{ - User user = 1; -} - -// Delete - -message DeleteUserRequest{ - string id = 1; -} - -message DeleteUserResponse{ - bool success = 1; -} - -// Create or Update - -message CreateOrUpdateUserRequest{ - User user = 1; -} - -message CreateOrUpdateUserResponse{ - User user = 1; -} - -// Verify - -message VerifyUserRequest{ - string studentId = 1; - string verifyType = 2; -} - -message VerifyUserResponse{ - bool success = 1; -} - -// ConfirmEstamp -message ConfirmEstampRequest { - string uId = 1; - string eId = 2; -} - -message ConfirmEstampResponse { - -} - -// GetUserEstamp -message GetUserEstampRequest { - string uId = 1; -} - -message GetUserEstampResponse { - repeated event.Event eventList = 1; -} \ No newline at end of file diff --git a/proto/user_grpc.pb.go b/proto/user_grpc.pb.go deleted file mode 100644 index 3ca3ebb..0000000 --- a/proto/user_grpc.pb.go +++ /dev/null @@ -1,393 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc v3.19.4 -// source: user.proto - -package proto - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -// UserServiceClient is the client API for UserService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type UserServiceClient interface { - FindOne(ctx context.Context, in *FindOneUserRequest, opts ...grpc.CallOption) (*FindOneUserResponse, error) - FindByStudentID(ctx context.Context, in *FindByStudentIDUserRequest, opts ...grpc.CallOption) (*FindByStudentIDUserResponse, error) - Create(ctx context.Context, in *CreateUserRequest, opts ...grpc.CallOption) (*CreateUserResponse, error) - Update(ctx context.Context, in *UpdateUserRequest, opts ...grpc.CallOption) (*UpdateUserResponse, error) - Verify(ctx context.Context, in *VerifyUserRequest, opts ...grpc.CallOption) (*VerifyUserResponse, error) - Delete(ctx context.Context, in *DeleteUserRequest, opts ...grpc.CallOption) (*DeleteUserResponse, error) - CreateOrUpdate(ctx context.Context, in *CreateOrUpdateUserRequest, opts ...grpc.CallOption) (*CreateOrUpdateUserResponse, error) - ConfirmEstamp(ctx context.Context, in *ConfirmEstampRequest, opts ...grpc.CallOption) (*ConfirmEstampResponse, error) - GetUserEstamp(ctx context.Context, in *GetUserEstampRequest, opts ...grpc.CallOption) (*GetUserEstampResponse, error) -} - -type userServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewUserServiceClient(cc grpc.ClientConnInterface) UserServiceClient { - return &userServiceClient{cc} -} - -func (c *userServiceClient) FindOne(ctx context.Context, in *FindOneUserRequest, opts ...grpc.CallOption) (*FindOneUserResponse, error) { - out := new(FindOneUserResponse) - err := c.cc.Invoke(ctx, "/user.UserService/FindOne", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *userServiceClient) FindByStudentID(ctx context.Context, in *FindByStudentIDUserRequest, opts ...grpc.CallOption) (*FindByStudentIDUserResponse, error) { - out := new(FindByStudentIDUserResponse) - err := c.cc.Invoke(ctx, "/user.UserService/FindByStudentID", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *userServiceClient) Create(ctx context.Context, in *CreateUserRequest, opts ...grpc.CallOption) (*CreateUserResponse, error) { - out := new(CreateUserResponse) - err := c.cc.Invoke(ctx, "/user.UserService/Create", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *userServiceClient) Update(ctx context.Context, in *UpdateUserRequest, opts ...grpc.CallOption) (*UpdateUserResponse, error) { - out := new(UpdateUserResponse) - err := c.cc.Invoke(ctx, "/user.UserService/Update", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *userServiceClient) Verify(ctx context.Context, in *VerifyUserRequest, opts ...grpc.CallOption) (*VerifyUserResponse, error) { - out := new(VerifyUserResponse) - err := c.cc.Invoke(ctx, "/user.UserService/Verify", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *userServiceClient) Delete(ctx context.Context, in *DeleteUserRequest, opts ...grpc.CallOption) (*DeleteUserResponse, error) { - out := new(DeleteUserResponse) - err := c.cc.Invoke(ctx, "/user.UserService/Delete", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *userServiceClient) CreateOrUpdate(ctx context.Context, in *CreateOrUpdateUserRequest, opts ...grpc.CallOption) (*CreateOrUpdateUserResponse, error) { - out := new(CreateOrUpdateUserResponse) - err := c.cc.Invoke(ctx, "/user.UserService/CreateOrUpdate", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *userServiceClient) ConfirmEstamp(ctx context.Context, in *ConfirmEstampRequest, opts ...grpc.CallOption) (*ConfirmEstampResponse, error) { - out := new(ConfirmEstampResponse) - err := c.cc.Invoke(ctx, "/user.UserService/ConfirmEstamp", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *userServiceClient) GetUserEstamp(ctx context.Context, in *GetUserEstampRequest, opts ...grpc.CallOption) (*GetUserEstampResponse, error) { - out := new(GetUserEstampResponse) - err := c.cc.Invoke(ctx, "/user.UserService/GetUserEstamp", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// UserServiceServer is the server API for UserService service. -// All implementations must embed UnimplementedUserServiceServer -// for forward compatibility -type UserServiceServer interface { - FindOne(context.Context, *FindOneUserRequest) (*FindOneUserResponse, error) - FindByStudentID(context.Context, *FindByStudentIDUserRequest) (*FindByStudentIDUserResponse, error) - Create(context.Context, *CreateUserRequest) (*CreateUserResponse, error) - Update(context.Context, *UpdateUserRequest) (*UpdateUserResponse, error) - Verify(context.Context, *VerifyUserRequest) (*VerifyUserResponse, error) - Delete(context.Context, *DeleteUserRequest) (*DeleteUserResponse, error) - CreateOrUpdate(context.Context, *CreateOrUpdateUserRequest) (*CreateOrUpdateUserResponse, error) - ConfirmEstamp(context.Context, *ConfirmEstampRequest) (*ConfirmEstampResponse, error) - GetUserEstamp(context.Context, *GetUserEstampRequest) (*GetUserEstampResponse, error) - mustEmbedUnimplementedUserServiceServer() -} - -// UnimplementedUserServiceServer must be embedded to have forward compatible implementations. -type UnimplementedUserServiceServer struct { -} - -func (UnimplementedUserServiceServer) FindOne(context.Context, *FindOneUserRequest) (*FindOneUserResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method FindOne not implemented") -} -func (UnimplementedUserServiceServer) FindByStudentID(context.Context, *FindByStudentIDUserRequest) (*FindByStudentIDUserResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method FindByStudentID not implemented") -} -func (UnimplementedUserServiceServer) Create(context.Context, *CreateUserRequest) (*CreateUserResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Create not implemented") -} -func (UnimplementedUserServiceServer) Update(context.Context, *UpdateUserRequest) (*UpdateUserResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Update not implemented") -} -func (UnimplementedUserServiceServer) Verify(context.Context, *VerifyUserRequest) (*VerifyUserResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Verify not implemented") -} -func (UnimplementedUserServiceServer) Delete(context.Context, *DeleteUserRequest) (*DeleteUserResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") -} -func (UnimplementedUserServiceServer) CreateOrUpdate(context.Context, *CreateOrUpdateUserRequest) (*CreateOrUpdateUserResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateOrUpdate not implemented") -} -func (UnimplementedUserServiceServer) ConfirmEstamp(context.Context, *ConfirmEstampRequest) (*ConfirmEstampResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ConfirmEstamp not implemented") -} -func (UnimplementedUserServiceServer) GetUserEstamp(context.Context, *GetUserEstampRequest) (*GetUserEstampResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetUserEstamp not implemented") -} -func (UnimplementedUserServiceServer) mustEmbedUnimplementedUserServiceServer() {} - -// UnsafeUserServiceServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to UserServiceServer will -// result in compilation errors. -type UnsafeUserServiceServer interface { - mustEmbedUnimplementedUserServiceServer() -} - -func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer) { - s.RegisterService(&UserService_ServiceDesc, srv) -} - -func _UserService_FindOne_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(FindOneUserRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(UserServiceServer).FindOne(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/user.UserService/FindOne", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(UserServiceServer).FindOne(ctx, req.(*FindOneUserRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _UserService_FindByStudentID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(FindByStudentIDUserRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(UserServiceServer).FindByStudentID(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/user.UserService/FindByStudentID", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(UserServiceServer).FindByStudentID(ctx, req.(*FindByStudentIDUserRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _UserService_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateUserRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(UserServiceServer).Create(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/user.UserService/Create", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(UserServiceServer).Create(ctx, req.(*CreateUserRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _UserService_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateUserRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(UserServiceServer).Update(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/user.UserService/Update", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(UserServiceServer).Update(ctx, req.(*UpdateUserRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _UserService_Verify_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(VerifyUserRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(UserServiceServer).Verify(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/user.UserService/Verify", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(UserServiceServer).Verify(ctx, req.(*VerifyUserRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _UserService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteUserRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(UserServiceServer).Delete(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/user.UserService/Delete", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(UserServiceServer).Delete(ctx, req.(*DeleteUserRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _UserService_CreateOrUpdate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateOrUpdateUserRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(UserServiceServer).CreateOrUpdate(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/user.UserService/CreateOrUpdate", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(UserServiceServer).CreateOrUpdate(ctx, req.(*CreateOrUpdateUserRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _UserService_ConfirmEstamp_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ConfirmEstampRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(UserServiceServer).ConfirmEstamp(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/user.UserService/ConfirmEstamp", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(UserServiceServer).ConfirmEstamp(ctx, req.(*ConfirmEstampRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _UserService_GetUserEstamp_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetUserEstampRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(UserServiceServer).GetUserEstamp(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/user.UserService/GetUserEstamp", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(UserServiceServer).GetUserEstamp(ctx, req.(*GetUserEstampRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// UserService_ServiceDesc is the grpc.ServiceDesc for UserService service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var UserService_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "user.UserService", - HandlerType: (*UserServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "FindOne", - Handler: _UserService_FindOne_Handler, - }, - { - MethodName: "FindByStudentID", - Handler: _UserService_FindByStudentID_Handler, - }, - { - MethodName: "Create", - Handler: _UserService_Create_Handler, - }, - { - MethodName: "Update", - Handler: _UserService_Update_Handler, - }, - { - MethodName: "Verify", - Handler: _UserService_Verify_Handler, - }, - { - MethodName: "Delete", - Handler: _UserService_Delete_Handler, - }, - { - MethodName: "CreateOrUpdate", - Handler: _UserService_CreateOrUpdate_Handler, - }, - { - MethodName: "ConfirmEstamp", - Handler: _UserService_ConfirmEstamp_Handler, - }, - { - MethodName: "GetUserEstamp", - Handler: _UserService_GetUserEstamp_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "user.proto", -}