-
Notifications
You must be signed in to change notification settings - Fork 4
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
Postgres implementation #87
Conversation
Signed-off-by: jay-dee7 <jasdeepsingh.uppal@gmail.com>
- added queries and apis for users table Signed-off-by: guacamole <gunjanwalecha@gmail.com>
Signed-off-by: guacamole <gunjanwalecha@gmail.com>
Signed-off-by: guacamole <gunjanwalecha@gmail.com>
Signed-off-by: jay-dee7 <jasdeepsingh.uppal@gmail.com>
- Added support for catalog api, content discovery apis Signed-off-by: guacamole <gunjanwalecha@gmail.com>
Signed-off-by: guacamole <gunjanwalecha@gmail.com>
08d28ee
to
638b591
Compare
Signed-off-by: guacamole <gunjanwalecha@gmail.com>
638b591
to
a864016
Compare
Signed-off-by: jay-dee7 <jasdeepsingh.uppal@gmail.com>
2d18670
to
84f64b3
Compare
Signed-off-by: guacamole <gunjanwalecha@gmail.com>
…nRegistry into postgres-implementation
f0619e4
to
9564459
Compare
Signed-off-by: guacamole <gunjanwalecha@gmail.com>
9564459
to
b3fb04a
Compare
87a6b43
to
54f5551
Compare
Signed-off-by: guacamole <gunjanwalecha@gmail.com> Signed-off-by: jay-dee7 <jasdeepsingh.uppal@gmail.com>
e1f6d00
to
fb6ad3b
Compare
83c8012
to
2315376
Compare
Signed-off-by: jay-dee7 <jasdeepsingh.uppal@gmail.com>
2315376
to
1d11ce1
Compare
Signed-off-by: jay-dee7 <jasdeepsingh.uppal@gmail.com>
…nRegistry into postgres-implementation
Signed-off-by: guacamole <gunjanwalecha@gmail.com>
run: | | ||
curl -L https://github.com/golang-migrate/migrate/releases/download/v4.15.1/migrate.linux-amd64.tar.gz | tar xvz | ||
sudo mv migrate /usr/bin/migrate | ||
sudo netstat -tulnp |
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.
@guacamole let's remove this
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.
Done!
run: | | ||
curl -L https://github.com/golang-migrate/migrate/releases/download/v4.15.1/migrate.linux-amd64.tar.gz | tar xvz | ||
sudo mv migrate /usr/bin/migrate | ||
sudo netstat -tulnp |
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.
@guacamole let's remove this
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.
Done!
run: | | ||
curl -L https://github.com/golang-migrate/migrate/releases/download/v4.15.1/migrate.linux-amd64.tar.gz | tar xvz | ||
sudo mv migrate /usr/bin/migrate | ||
sudo netstat -tulnp |
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.
@guacamole let's remove this
auth/signup.go
Outdated
ctx.Set(types.HttpEndpointErrorKey, err.Error()) | ||
return ctx.JSON(http.StatusInternalServerError, echo.Map{ | ||
"error": err.Error(), | ||
}) | ||
} | ||
|
||
// key := fmt.Sprintf("%s/%s", UserNameSpace, u.Username) |
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.
@guacamole lets remove these comments
auth/signup.go
Outdated
if err := a.store.Set([]byte(key), bz); err != nil { | ||
err = a.pgStore.AddUser(ctx.Request().Context(), newUser) | ||
|
||
// bz, err = json.Marshal(u) |
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.
@guacamole and this one too
auth/validate_user.go
Outdated
@@ -13,17 +13,22 @@ func (a *auth) validateUser(username, password string) (map[string]interface{}, | |||
return nil, fmt.Errorf("Email/Password cannot be empty") | |||
} | |||
|
|||
key := fmt.Sprintf("%s/%s", UserNameSpace, username) | |||
bz, err := a.store.Get([]byte(key)) | |||
//key := fmt.Sprintf("%s/%s", UserNameSpace, username) |
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.
@guacamole remove these comments too
@@ -0,0 +1,48 @@ | |||
|
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.
@guacamole do we want to keep this? since we're already using migrate
to handle all of this, maybe we can remove it?
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.
let's keep it since this is our working schema
scripts/postgres/setup.sh
Outdated
@@ -0,0 +1,7 @@ | |||
#!/bin/bash |
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.
@guacamole lets remove this since migrate cli is already handling this
types/types.go
Outdated
Reference string | ||
Digest string | ||
} | ||
//Manifest struct { |
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.
@guacamole lets remove this
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.
@guacamole other than some comment removal, this PR is good to go. We have quite some mess about badger and postgres and it's better if we track that via a different PR
Signed-off-by: guacamole <gunjanwalecha@gmail.com>
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.
@guacamole LGTM 🥇 thanks for this gigantic feature
Work in progress: 58 conformance tests are passing