Skip to content

Commit 74f3077

Browse files
committed
[-] Transferred ownership to Naughty Gopher
[minor] Refactor to change non standard field names [minor] upgraded all dependencies [-] ran `go mod tidy`
1 parent b3d6902 commit 74f3077

File tree

8 files changed

+197
-193
lines changed

8 files changed

+197
-193
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2019 Kamaleshwar BN
3+
Copyright (c) 2024 Naughty Gopher
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,14 @@
11
<p align="center"><img src="https://repository-images.githubusercontent.com/214951539/5b1d4880-be23-11ea-956f-13b099260266" alt="verifier gopher" width="256px"/></p>
22

3-
4-
[![](https://travis-ci.org/bnkamalesh/verifier.svg?branch=master)](https://travis-ci.org/bnkamalesh/verifier)
5-
[![coverage](https://img.shields.io/codecov/c/github/bnkamalesh/verifier.svg)](https://codecov.io/gh/bnkamalesh/verifier)
6-
[![](https://goreportcard.com/badge/github.com/bnkamalesh/verifier)](https://goreportcard.com/report/github.com/bnkamalesh/verifier)
7-
[![Maintainability](https://api.codeclimate.com/v1/badges/46f26b25639d09d0419d/maintainability)](https://codeclimate.com/github/bnkamalesh/verifier/maintainability)
8-
[![](https://godoc.org/github.com/nathany/looper?status.svg)](http://godoc.org/github.com/bnkamalesh/verifier)
3+
[![](https://godoc.org/github.com/nathany/looper?status.svg)](http://godoc.org/github.com/naughtygopher/verifier)
94

105
# Verifier v0.1.0
116

12-
Verifier package lets you verify emails & phone numbers, with customization available at different components. There's a functional (if provided with valid configurations) sample app provided [here](https://github.com/bnkamalesh/verifier/blob/master/cmd/main.go).
7+
Verifier package lets you verify emails & phone numbers, with customization available at different components. There's a functional (if provided with valid configurations) sample app provided [here](https://github.com/naughtygopher/verifier/blob/master/cmd/main.go).
138

149
## How does it work?
1510

16-
Verifier generates secrets with an expiry, appropriate for emails & mobile phones. In case of emails,
11+
Verifier generates secrets with an expiry, appropriate for emails & mobile phones. In case of emails,
1712
it generates a 256 character long random alpha-numeric string, and a 6 character long numeric string
1813
for mobile phones.
1914

@@ -24,7 +19,7 @@ By default, it uses [AWS SES](https://aws.amazon.com/ses/) for sending e-mails &
2419
You can customize the following components of verifier.
2520

2621
```golang
27-
22+
2823
// Customize the default templates
2924
// there should be 2 string placeholders for email body. First is the 'callback URL' and 2nd is the expiry
3025
verifier.DefaultEmailOTPPayload = ``
@@ -37,7 +32,7 @@ You can customize the following components of verifier.
3732
log.Println(err)
3833
return
3934
}
40-
35+
4136
// Service provider for sending emails
4237
err := v.CustomEmailHandler(email)
4338
if err != nil {
@@ -53,7 +48,7 @@ You can customize the following components of verifier.
5348
return err
5449
}
5550
// ==
56-
51+
5752
// Persistent store used by verifier for storing secrets and all the requests
5853
err = v.CustomStore(verStore)
5954
if err != nil {
@@ -91,8 +86,9 @@ You can customize the following components of verifier.
9186
```
9287

9388
## TODO
89+
9490
1. Unit tests
95-
3. Setup a web service, which can be independently run, and consumed via APIs
91+
2. Setup a web service, which can be independently run, and consumed via APIs
9692

9793
## The gopher
9894

cmd/main.go

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ import (
77
"os"
88
"time"
99

10-
"github.com/bnkamalesh/verifier"
11-
"github.com/bnkamalesh/verifier/awsses"
12-
"github.com/bnkamalesh/verifier/awssns"
13-
"github.com/bnkamalesh/verifier/stores"
10+
"github.com/naughtygopher/verifier"
11+
"github.com/naughtygopher/verifier/awsses"
12+
"github.com/naughtygopher/verifier/awssns"
13+
"github.com/naughtygopher/verifier/stores"
1414
)
1515

1616
func newHTTPClient() *http.Client {
@@ -46,9 +46,9 @@ func redisConfig() *stores.RedisConfig {
4646
Hosts: []string{
4747
"localhost:6379",
4848
},
49-
DialTimeoutSecs: time.Second * 3,
50-
ReadTimeoutSecs: time.Second * 1,
51-
WriteTimeoutSecs: time.Second * 2,
49+
DialTimeout: time.Second * 3,
50+
ReadTimeout: time.Second * 1,
51+
WriteTimeout: time.Second * 2,
5252
}
5353
}
5454

@@ -61,10 +61,10 @@ func postgresConfig() *stores.PostgresConfig {
6161
StoreName: "mydb",
6262
PoolSize: 100,
6363

64-
DialTimeoutSecs: time.Second * 10,
65-
ReadTimeoutSecs: time.Second * 10,
66-
WriteTimeoutSecs: time.Second * 20,
67-
IdleTimeoutSecs: time.Minute * 5,
64+
DialTimeout: time.Second * 10,
65+
ReadTimeout: time.Second * 10,
66+
WriteTimeout: time.Second * 20,
67+
IdleTimeout: time.Minute * 5,
6868

6969
TableName: "VerificationRequests",
7070
}

go.mod

Lines changed: 28 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,33 @@
1-
module github.com/bnkamalesh/verifier
1+
module github.com/naughtygopher/verifier
22

3-
go 1.13
3+
go 1.23.1
44

55
require (
6-
github.com/Masterminds/squirrel v1.1.0
7-
github.com/aws/aws-sdk-go v1.25.11
6+
github.com/Masterminds/squirrel v1.5.4
7+
github.com/aws/aws-sdk-go v1.55.5
88
github.com/fatih/structs v1.1.0
9-
github.com/go-redis/redis v6.15.6+incompatible
10-
github.com/go-sql-driver/mysql v1.4.1 // indirect
11-
github.com/jackc/pgx/v4 v4.1.2
12-
github.com/mattn/go-sqlite3 v1.11.0 // indirect
13-
github.com/onsi/ginkgo v1.10.2 // indirect
14-
github.com/onsi/gomega v1.7.0 // indirect
15-
github.com/vmihailenco/msgpack/v4 v4.2.1
9+
github.com/go-redis/redis v6.15.9+incompatible
10+
github.com/jackc/pgx/v5 v5.7.1
11+
github.com/vmihailenco/msgpack/v4 v4.3.13
12+
)
13+
14+
require (
15+
github.com/golang/protobuf v1.5.4 // indirect
16+
github.com/google/go-cmp v0.6.0 // indirect
17+
github.com/jackc/pgpassfile v1.0.0 // indirect
18+
github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect
19+
github.com/jackc/puddle/v2 v2.2.2 // indirect
20+
github.com/jmespath/go-jmespath v0.4.0 // indirect
21+
github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 // indirect
22+
github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 // indirect
23+
github.com/onsi/ginkgo v1.16.5 // indirect
24+
github.com/onsi/gomega v1.34.2 // indirect
25+
github.com/rogpeppe/go-internal v1.13.1 // indirect
26+
github.com/vmihailenco/tagparser v0.1.2 // indirect
27+
golang.org/x/crypto v0.27.0 // indirect
28+
golang.org/x/net v0.29.0 // indirect
29+
golang.org/x/sync v0.8.0 // indirect
30+
golang.org/x/text v0.18.0 // indirect
31+
google.golang.org/appengine v1.6.8 // indirect
32+
google.golang.org/protobuf v1.34.2 // indirect
1633
)

0 commit comments

Comments
 (0)