Files
api_tmpl/proto/service_api_tmpl.proto
T
FernandoJVideira c4ee0ce4dc 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
2026-08-25 03:02:37 +01:00

67 lines
2.0 KiB
Protocol Buffer

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"
};
}
}