Skip to content
This repository has been archived by the owner on Jul 12, 2022. It is now read-only.

Adding initial structure for new ext auth server (gate) #898

Merged
merged 4 commits into from
Feb 18, 2021

Conversation

emiteze
Copy link
Contributor

@emiteze emiteze commented Feb 9, 2021

Signed-off-by: Mateus Cruz emiteze@hotmail.com

Signed-off-by: Mateus Cruz <emiteze@hotmail.com>
gate/cmd/db.go Show resolved Hide resolved
gate/cmd/http.go Outdated Show resolved Hide resolved
gate/cmd/db.go Outdated

func runMigrations(sqlDb *sql.DB) error {
driver, err := pgMigrate.WithInstance(sqlDb, &pgMigrate.Config{})
m, err := migrate.NewWithDatabaseInstance(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we could write a descriptive name for the variable 'm'.

gate/cmd/http.go Outdated
)

type server struct {
pm persistenceManager
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we could write a descriptive name for the variable 'pm'.

validator *validator.Validate
}

func newServer(pm persistenceManager) (server, error) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we could write a descriptive name for the variable 'pm'.

gate/cmd/http.go Outdated
}, nil
}

func (s server) start(port string) error {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we could write a descriptive name for the variable 's'.

gate/cmd/http.go Outdated
}

func createEchoInstance() *echo.Echo {
e := echo.New()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we could write a descriptive name for the variable 'e'.

gate/cmd/http.go Outdated
return e
}

func (cb customBinder) Bind(i interface{}, c echo.Context) (err error) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we could write a descriptive name for the variable 'i'.

return conform.Strings(i)
}

func (cv *CustomValidator) Validate(i interface{}) error {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we could write a descriptive name for the variable 'cv'.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we could write a descriptive name for the variable 'i'.

}

func buildCustomValidator() *CustomValidator {
v := validator.New()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we could write a descriptive name for the variable 'v'.

Signed-off-by: Mateus Cruz <emiteze@hotmail.com>
Signed-off-by: Mateus Cruz <emiteze@hotmail.com>
@emiteze emiteze merged commit d1a4485 into system-token Feb 18, 2021
@emiteze emiteze deleted the gate-initial-structure branch February 18, 2021 15:06
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants