chore: rename simple_bank to api_tmpl and clean up for template use
Rename the module, proto service, and all identifiers from simple_bank/ SimpleBank to api_tmpl/ApiTmpl, and regenerate the gRPC/gateway/swagger/ mock code accordingly. - Scrub real secrets (SMTP password, auth token secret) from api.env/ api_test.env, untrack them, and add api.env.example/api_test.env.example - Remove committed build artifacts (tmp/main, tmp/build-errors.log, dbml-error.log) and gitignore them going forward - Fix Dockerfile paths (build target, migrations copy) that referenced a stale project layout - Rewrite README to match the actual cmd/ + internal/ structure and add a "using this as a template" section
This commit is contained in:
1 parent
961bdd81d4
commit
c4ee0ce4dc
71 files changed
+744
-743
No files matched your search
@@ -4,7 +4,7 @@ package pb;
|
||||
|
||||
import "user.proto";
|
||||
|
||||
option go_package = "github.com/FernandoJVideira/simple_bank/pb";
|
||||
option go_package = "github.com/FernandoJVideira/api_tmpl/pb";
|
||||
|
||||
message CreateUserRequest {
|
||||
string username = 1;
|
||||
|
||||
@@ -5,7 +5,7 @@ package pb;
|
||||
import "user.proto";
|
||||
import "google/protobuf/timestamp.proto";
|
||||
|
||||
option go_package = "github.com/FernandoJVideira/simple_bank/pb";
|
||||
option go_package = "github.com/FernandoJVideira/api_tmpl/pb";
|
||||
|
||||
message LoginUserRequest {
|
||||
string username = 1;
|
||||
|
||||
@@ -4,7 +4,7 @@ package pb;
|
||||
|
||||
import "user.proto";
|
||||
|
||||
option go_package = "github.com/FernandoJVideira/simple_bank/pb";
|
||||
option go_package = "github.com/FernandoJVideira/api_tmpl/pb";
|
||||
|
||||
message UpdateUserRequest {
|
||||
string username = 1;
|
||||
|
||||
@@ -2,7 +2,7 @@ syntax = "proto3";
|
||||
|
||||
package pb;
|
||||
|
||||
option go_package = "github.com/FernandoJVideira/simple_bank/pb";
|
||||
option go_package = "github.com/FernandoJVideira/api_tmpl/pb";
|
||||
|
||||
message VerifyEmailRequest {
|
||||
int64 id = 1;
|
||||
|
||||
@@ -9,28 +9,28 @@ import "rpc_update_user.proto";
|
||||
import "rpc_verify_email.proto";
|
||||
import "protoc-gen-openapiv2/options/annotations.proto";
|
||||
|
||||
option go_package = "github.com/FernandoJVideira/simple_bank/pb";
|
||||
option go_package = "github.com/FernandoJVideira/api_tmpl/pb";
|
||||
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
|
||||
info: {
|
||||
title: "Simple Bank API"
|
||||
title: "API Template"
|
||||
version: "0.0.1"
|
||||
contact: {
|
||||
name: "fvideira"
|
||||
url: "https://github.com/FernandoJVideira/simple_bank"
|
||||
email: "03.pleaser-minster@icloud.com"
|
||||
url: "https://github.com/FernandoJVideira/api_tmpl"
|
||||
email: "support@example.com"
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
service SimpleBank {
|
||||
service ApiTmpl {
|
||||
rpc CreateUser (CreateUserRequest) returns (CreateUserResponse){
|
||||
option (google.api.http) = {
|
||||
post: "/v1/create_user"
|
||||
body: "*"
|
||||
};
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||
description: "Create a new user in the Simple Bank system."
|
||||
description: "Create a new user."
|
||||
summary: "Create User"
|
||||
};
|
||||
}
|
||||
@@ -40,7 +40,7 @@ service SimpleBank {
|
||||
body: "*"
|
||||
};
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||
description: "Login an existing user in the Simple Bank system."
|
||||
description: "Login an existing user."
|
||||
summary: "Login User"
|
||||
};
|
||||
}
|
||||
@@ -49,7 +49,7 @@ service SimpleBank {
|
||||
get: "/v1/verify_email"
|
||||
};
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||
description: "Verify user's email in the Simple Bank system."
|
||||
description: "Verify a user's email."
|
||||
summary: "Verify Email"
|
||||
};
|
||||
}
|
||||
@@ -59,7 +59,7 @@ service SimpleBank {
|
||||
body: "*"
|
||||
};
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||
description: "Update an existing user in the Simple Bank system."
|
||||
description: "Update an existing user."
|
||||
summary: "Update User"
|
||||
};
|
||||
}
|
||||
+1
-1
@@ -4,7 +4,7 @@ package pb;
|
||||
|
||||
import "google/protobuf/timestamp.proto";
|
||||
|
||||
option go_package = "github.com/FernandoJVideira/simple_bank/pb";
|
||||
option go_package = "github.com/FernandoJVideira/api_tmpl/pb";
|
||||
|
||||
message User {
|
||||
string username = 1;
|
||||
|
||||
Reference in new issue
Block a user