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
@@ -0,0 +1,66 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package pb;
|
||||
|
||||
import "google/api/annotations.proto";
|
||||
import "rpc_create_user.proto";
|
||||
import "rpc_login_user.proto";
|
||||
import "rpc_update_user.proto";
|
||||
import "rpc_verify_email.proto";
|
||||
import "protoc-gen-openapiv2/options/annotations.proto";
|
||||
|
||||
option go_package = "github.com/FernandoJVideira/api_tmpl/pb";
|
||||
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
|
||||
info: {
|
||||
title: "API Template"
|
||||
version: "0.0.1"
|
||||
contact: {
|
||||
name: "fvideira"
|
||||
url: "https://github.com/FernandoJVideira/api_tmpl"
|
||||
email: "[email protected]"
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
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."
|
||||
summary: "Create User"
|
||||
};
|
||||
}
|
||||
rpc LoginUser (LoginUserRequest) returns (LoginUserResponse){
|
||||
option (google.api.http) = {
|
||||
post: "/v1/login_user"
|
||||
body: "*"
|
||||
};
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||
description: "Login an existing user."
|
||||
summary: "Login User"
|
||||
};
|
||||
}
|
||||
rpc VerifyEmail (VerifyEmailRequest) returns (VerifyEmailResponse){
|
||||
option (google.api.http) = {
|
||||
get: "/v1/verify_email"
|
||||
};
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||
description: "Verify a user's email."
|
||||
summary: "Verify Email"
|
||||
};
|
||||
}
|
||||
rpc UpdateUser (UpdateUserRequest) returns (UpdateUserResponse){
|
||||
option (google.api.http) = {
|
||||
patch: "/v1/update_user"
|
||||
body: "*"
|
||||
};
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||
description: "Update an existing user."
|
||||
summary: "Update User"
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user