Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/add typos #760

Merged
merged 18 commits into from
Jun 19, 2023
Merged
6 changes: 6 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ jobs:
with:
go-version: "1.20"

- name: Check typos
uses: crate-ci/typos@v1.0.4
with:
files: ./
config: ./_typos.toml

- name: mod download
run: go mod download

Expand Down
6 changes: 6 additions & 0 deletions _typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[files]
extend-exclude = [
"internal/infrastructure/database/internal/dbmodel/*.go",
"go.mod",
"go.sum",
]
File renamed without changes.
2 changes: 1 addition & 1 deletion deployments/terraform/apps/cloud_run_backend/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ resource "google_cloud_run_service" "services" {

env {
name = "ENV"
value = var.enviroment
value = var.environment
}
env {
name = "GCP_PROJECT_ID"
Expand Down
2 changes: 1 addition & 1 deletion deployments/terraform/apps/cloud_run_backend/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ variable "registry_path" {
type = string
}

variable "enviroment" {
variable "environment" {
type = string
}

Expand Down
2 changes: 1 addition & 1 deletion deployments/terraform/env/development/locals.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
locals {
enviroment = "development"
environment = "development"
db_tier = "db-f1-micro"
db_disk_type = "PD_HDD"
db_availability_type = "ZONAL"
Expand Down
4 changes: 2 additions & 2 deletions deployments/terraform/env/development/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ module "cloud_sql" {

module "secret_manager_db_password" {
source = "../../modules/secret_manager"
secret_id = "db-passowrd"
secret_id = "db-password"
value = module.cloud_sql.db_password

depends_on = [
Expand All @@ -57,7 +57,7 @@ module "cloud_run_backend" {

project = var.project
location = var.location
enviroment = local.enviroment
environment = local.environment
registry_path = module.artifact_registry.container_registry_path
db_connection_name = module.cloud_sql.db_connection_name
db_name = module.cloud_sql.db_name
Expand Down
2 changes: 1 addition & 1 deletion deployments/terraform/env/production/locals.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
locals {
enviroment = "production"
environment = "production"
db_tier = "db-f1-micro"
db_disk_type = "PD_HDD"
db_availability_type = "ZONAL"
Expand Down
2 changes: 1 addition & 1 deletion deployments/terraform/env/production/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ module "cloud_sql" {

module "secret_manager_db_password" {
source = "../../modules/secret_manager"
secret_id = "db-passowrd"
secret_id = "db-password"
value = module.cloudsql.db_password

depends_on = [
Expand Down
2 changes: 1 addition & 1 deletion deployments/terraform/env/staging/locals.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
locals {
enviroment = "staging"
environment = "staging"
db_tier = "db-f1-micro"
db_disk_type = "PD_HDD"
db_availability_type = "ZONAL"
Expand Down
2 changes: 1 addition & 1 deletion deployments/terraform/env/staging/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ module "cloud_sql" {

module "secret_manager_db_password" {
source = "../../modules/secret_manager"
secret_id = "db-passowrd"
secret_id = "db-password"
value = module.cloudsql.db_password

depends_on = [
Expand Down
2 changes: 1 addition & 1 deletion docs/golang.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,5 @@

```bash
> make build
> ./.bin/app-cli task create-root-staff --email <email address> --password <passowrd>
> ./.bin/app-cli task create-root-staff --email <email address> --password <password>
```
2 changes: 1 addition & 1 deletion internal/infrastructure/database/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
const (
maxOpenConns = 25
maxIdleConns = 25
maxLifeTime = 100 * time.Second // max conection * seconds
maxLifeTime = 100 * time.Second // max connection * seconds
)

// Client ... client.
Expand Down
4 changes: 2 additions & 2 deletions internal/infrastructure/environment/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ type Environment struct {
Port string `env:"PORT,required"`
Environment string `env:"ENV,required"`
DatabaseEnvironment
GCPEnviroment
GCPEnvironment
AWSEnvironment
}

Expand All @@ -15,7 +15,7 @@ type DatabaseEnvironment struct {
DBDatabase string `env:"DB_DATABASE,required"`
}

type GCPEnviroment struct {
type GCPEnvironment struct {
GCPProjectID string `env:"GCP_PROJECT_ID,required"`
FirebaseClientAPIKey string `env:"FIREBASE_CLIENT_API_KEY"`
GCPBucketName string `env:"GCP_BUCKET_NAME,required"`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@ import (
"github.com/abyssparanoia/rapid-go/internal/usecase"
)

type DebugHander struct {
type DebugHandler struct {
debugInteractor usecase.DebugInteractor
}

func NewDebugHandler(
debugInteractor usecase.DebugInteractor,
) debug_apiv1.DebugV1ServiceServer {
return &DebugHander{
return &DebugHandler{
debugInteractor: debugInteractor,
}
}

func (h *DebugHander) DebugCreateStaffIDToken(ctx context.Context, req *debug_apiv1.DebugCreateStaffIDTokenRequest) (*debug_apiv1.DebugCreateStaffIDTokenResponse, error) {
func (h *DebugHandler) DebugCreateStaffIDToken(ctx context.Context, req *debug_apiv1.DebugCreateStaffIDTokenRequest) (*debug_apiv1.DebugCreateStaffIDTokenResponse, error) {
idToken, err := h.debugInteractor.CreateStaffIDToken(ctx, req.GetAuthUid(), req.GetPassword())
if err != nil {
return nil, err
Expand Down