-
Notifications
You must be signed in to change notification settings - Fork 79
Adding initial structure for new ext auth server (gate) #898
Conversation
Signed-off-by: Mateus Cruz <emiteze@hotmail.com>
gate/cmd/db.go
Outdated
|
||
func runMigrations(sqlDb *sql.DB) error { | ||
driver, err := pgMigrate.WithInstance(sqlDb, &pgMigrate.Config{}) | ||
m, err := migrate.NewWithDatabaseInstance( |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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() |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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'.
There was a problem hiding this comment.
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() |
There was a problem hiding this comment.
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>
afe49ab
to
a0e90f4
Compare
Signed-off-by: Mateus Cruz emiteze@hotmail.com