A bit of refactoring and updates
All checks were successful
ci/woodpecker/push/build Pipeline was successful

Signed-off-by: Nikolai Rodionov <iam@allanger.xyz>
This commit is contained in:
2026-05-11 11:57:17 +02:00
parent 33f48f2bfb
commit 99f9bb462f
12 changed files with 270 additions and 678 deletions

View File

@@ -13,7 +13,7 @@ import (
"google.golang.org/protobuf/types/known/emptypb"
)
func NewAccountAuthRPCImpl(
func NewAccountServer(
accountsCtrl *controllers.AccountController,
authorizationCtrl *controllers.AuthController,
) *AccountsServer {

View File

@@ -13,7 +13,7 @@ import (
"google.golang.org/protobuf/types/known/emptypb"
)
func NewAccountNoAuthRPCImpl(
func NewPublicAccountServer(
accountsCtrl *controllers.AccountController,
authorizationCtrl *controllers.AuthController,
) *PublicAccountService {

31
api/v1/test.go Normal file
View File

@@ -0,0 +1,31 @@
package v1
import (
"context"
test "gitea.badhouseplants.net/softplayer/softplayer-go-proto/pkg/test/v1"
)
func NewTestServer() *TestServer {
return &TestServer{}
}
type TestServer struct {
test.UnimplementedTestServiceServer
}
func (t *TestServer) Pong(ctx context.Context, in *test.PongRequest) (*test.PongResponse, error) {
return &test.PongResponse{}, nil
}
func NewPublicTestServer() *PublicTestServer {
return &PublicTestServer{}
}
type PublicTestServer struct {
test.UnimplementedPublicTestServiceServer
}
func (t *PublicTestServer) Ping(ctx context.Context, in *test.PingRequest) (*test.PingResponse, error) {
return &test.PingResponse{}, nil
}

View File

@@ -1,22 +0,0 @@
package v1
import (
"context"
"gitea.badhouseplants.net/softplayer/softplayer-backend/internal/helpers/logger"
test "gitea.badhouseplants.net/softplayer/softplayer-go-proto/pkg/test/v1"
)
func NewTestAuthRPCImpl() *TestAuthServer {
return &TestAuthServer{}
}
type TestAuthServer struct {
test.UnimplementedTestAuthServiceServer
}
func (t *TestAuthServer) Pong(ctx context.Context, in *test.PongRequest) (*test.PongResponse, error) {
log := logger.FromContext(ctx)
log.Info("Pong")
return &test.PongResponse{}, nil
}

View File

@@ -1,22 +0,0 @@
package v1
import (
"context"
"gitea.badhouseplants.net/softplayer/softplayer-backend/internal/helpers/logger"
test "gitea.badhouseplants.net/softplayer/softplayer-go-proto/pkg/test/v1"
)
func NewTestNoAuthRPCImpl() *TestNoAuthServer {
return &TestNoAuthServer{}
}
type TestNoAuthServer struct {
test.UnimplementedTestNoAuthServiceServer
}
func (t *TestNoAuthServer) Ping(ctx context.Context, in *test.PingRequest) (*test.PingResponse, error) {
log := logger.FromContext(ctx)
log.Info("Ping")
return &test.PingResponse{}, nil
}