forked from kubeflow/model-registry
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #130 from kubeflow/main
[pull] main from kubeflow:main
- Loading branch information
Showing
27 changed files
with
1,332 additions
and
155 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Contributing | ||
|
||
## Running the linter locally | ||
The BFF directory uses golangci-lint to combine multiple linters for a more comprehensive linting process. To install and run simply use: | ||
|
||
```shell | ||
cd clients/ui/bff | ||
make lint | ||
``` | ||
|
||
For more information on configuring golangci-lint see the [documentation](https://golangci-lint.run/). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package data | ||
|
||
import ( | ||
"fmt" | ||
"net/url" | ||
) | ||
|
||
func FilterPageValues(values url.Values) url.Values { | ||
result := url.Values{} | ||
|
||
if v := values.Get("pageSize"); v != "" { | ||
result.Set("pageSize", v) | ||
} | ||
if v := values.Get("orderBy"); v != "" { | ||
result.Set("orderBy", v) | ||
} | ||
if v := values.Get("sortOrder"); v != "" { | ||
result.Set("sortOrder", v) | ||
} | ||
if v := values.Get("nextPageToken"); v != "" { | ||
result.Set("nextPageToken", v) | ||
} | ||
|
||
return result | ||
} | ||
|
||
func UrlWithParams(url string, values url.Values) string { | ||
queryString := values.Encode() | ||
if queryString == "" { | ||
return url | ||
} | ||
return fmt.Sprintf("%s?%s", url, queryString) | ||
} | ||
|
||
func UrlWithPageParams(url string, values url.Values) string { | ||
pageValues := FilterPageValues(values) | ||
return UrlWithParams(url, pageValues) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.