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

Postgres implementation #87

Merged
merged 18 commits into from
Dec 19, 2021
Merged

Postgres implementation #87

merged 18 commits into from
Dec 19, 2021

Conversation

guacamole
Copy link
Member

Work in progress: 58 conformance tests are passing

jay-dee7 and others added 7 commits December 12, 2021 16:52
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>
@guacamole guacamole self-assigned this Dec 12, 2021
@guacamole guacamole force-pushed the postgres-implementation branch 4 times, most recently from 08d28ee to 638b591 Compare December 13, 2021 11:19
Signed-off-by: guacamole <gunjanwalecha@gmail.com>
Signed-off-by: jay-dee7 <jasdeepsingh.uppal@gmail.com>
Signed-off-by: guacamole <gunjanwalecha@gmail.com>
@guacamole guacamole force-pushed the postgres-implementation branch 3 times, most recently from f0619e4 to 9564459 Compare December 14, 2021 07:05
Signed-off-by: guacamole <gunjanwalecha@gmail.com>
@jay-dee7 jay-dee7 force-pushed the postgres-implementation branch 3 times, most recently from 87a6b43 to 54f5551 Compare December 14, 2021 07:21
Signed-off-by: guacamole <gunjanwalecha@gmail.com>
Signed-off-by: jay-dee7 <jasdeepsingh.uppal@gmail.com>
@jay-dee7 jay-dee7 force-pushed the postgres-implementation branch 2 times, most recently from e1f6d00 to fb6ad3b Compare December 14, 2021 07:53
@jay-dee7 jay-dee7 force-pushed the postgres-implementation branch 9 times, most recently from 83c8012 to 2315376 Compare December 14, 2021 14:16
Signed-off-by: jay-dee7 <jasdeepsingh.uppal@gmail.com>
jay-dee7 and others added 3 commits December 14, 2021 20:10
Signed-off-by: jay-dee7 <jasdeepsingh.uppal@gmail.com>
Signed-off-by: guacamole <gunjanwalecha@gmail.com>
@jay-dee7 jay-dee7 marked this pull request as ready for review December 19, 2021 10:19
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
Copy link
Member

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

Copy link
Member Author

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
Copy link
Member

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

Copy link
Member Author

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
Copy link
Member

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)
Copy link
Member

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)
Copy link
Member

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

@@ -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)
Copy link
Member

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 @@

Copy link
Member

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?

Copy link
Member Author

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

@@ -0,0 +1,7 @@
#!/bin/bash
Copy link
Member

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 {
Copy link
Member

Choose a reason for hiding this comment

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

@guacamole lets remove this

Copy link
Member

@jay-dee7 jay-dee7 left a 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>
Copy link
Member

@jay-dee7 jay-dee7 left a 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

@jay-dee7 jay-dee7 merged commit 9627ed4 into master Dec 19, 2021
@jay-dee7 jay-dee7 deleted the postgres-implementation branch December 19, 2021 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants