Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Added Type field to Platform gRPC struct #1853

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

Merged
merged 2 commits into from
Aug 30, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Renamed gRPC response from Category string to Type []string
  • Loading branch information
cmaglie committed Aug 29, 2022
commit 2fede22c08f87b14b378afdbe718433d6ea6c49a
2 changes: 1 addition & 1 deletion 2 commands/core.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func PlatformReleaseToRPC(platformRelease *cores.PlatformRelease) *rpc.Platform
Latest: platformRelease.Version.String(),
ManuallyInstalled: platformRelease.Platform.ManuallyInstalled,
Deprecated: platformRelease.Platform.Deprecated,
Category: platformRelease.Platform.Category,
Type: []string{platformRelease.Platform.Category},
}

return result
Expand Down
22 changes: 11 additions & 11 deletions 22 commands/core/search_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func TestPlatformSearch(t *testing.T) {
Website: "https://www.retrokits.com",
Email: "info@retrokits.com",
Boards: []*rpc.Board{{Name: "RK002"}},
Category: "Contributed",
Type: []string{"Contributed"},
})
require.Contains(t, res.SearchOutput, &rpc.Platform{
Id: "Retrokits-RK002:arm",
Expand All @@ -72,7 +72,7 @@ func TestPlatformSearch(t *testing.T) {
Website: "https://www.retrokits.com",
Email: "info@retrokits.com",
Boards: []*rpc.Board{{Name: "RK002"}},
Category: "Contributed",
Type: []string{"Contributed"},
})

res, stat = PlatformSearch(&rpc.PlatformSearchRequest{
Expand All @@ -92,7 +92,7 @@ func TestPlatformSearch(t *testing.T) {
Website: "https://www.retrokits.com",
Email: "info@retrokits.com",
Boards: []*rpc.Board{{Name: "RK002"}},
Category: "Contributed",
Type: []string{"Contributed"},
})

// Search the Package Maintainer
Expand All @@ -113,7 +113,7 @@ func TestPlatformSearch(t *testing.T) {
Website: "https://www.retrokits.com",
Email: "info@retrokits.com",
Boards: []*rpc.Board{{Name: "RK002"}},
Category: "Contributed",
Type: []string{"Contributed"},
})
require.Contains(t, res.SearchOutput, &rpc.Platform{
Id: "Retrokits-RK002:arm",
Expand All @@ -124,7 +124,7 @@ func TestPlatformSearch(t *testing.T) {
Website: "https://www.retrokits.com",
Email: "info@retrokits.com",
Boards: []*rpc.Board{{Name: "RK002"}},
Category: "Contributed",
Type: []string{"Contributed"},
})

// Search using the Package name
Expand All @@ -145,7 +145,7 @@ func TestPlatformSearch(t *testing.T) {
Website: "https://www.retrokits.com",
Email: "info@retrokits.com",
Boards: []*rpc.Board{{Name: "RK002"}},
Category: "Contributed",
Type: []string{"Contributed"},
})
require.Contains(t, res.SearchOutput, &rpc.Platform{
Id: "Retrokits-RK002:arm",
Expand All @@ -156,7 +156,7 @@ func TestPlatformSearch(t *testing.T) {
Website: "https://www.retrokits.com",
Email: "info@retrokits.com",
Boards: []*rpc.Board{{Name: "RK002"}},
Category: "Contributed",
Type: []string{"Contributed"},
})

// Search using the Platform name
Expand All @@ -177,7 +177,7 @@ func TestPlatformSearch(t *testing.T) {
Website: "https://www.retrokits.com",
Email: "info@retrokits.com",
Boards: []*rpc.Board{{Name: "RK002"}},
Category: "Contributed",
Type: []string{"Contributed"},
})
require.Contains(t, res.SearchOutput, &rpc.Platform{
Id: "Retrokits-RK002:arm",
Expand All @@ -188,7 +188,7 @@ func TestPlatformSearch(t *testing.T) {
Website: "https://www.retrokits.com",
Email: "info@retrokits.com",
Boards: []*rpc.Board{{Name: "RK002"}},
Category: "Contributed",
Type: []string{"Contributed"},
})

// Search using a board name
Expand All @@ -208,7 +208,7 @@ func TestPlatformSearch(t *testing.T) {
Maintainer: "Arduino",
Website: "https://www.arduino.cc/",
Email: "packages@arduino.cc",
Category: "Arduino",
Type: []string{"Arduino"},
Boards: []*rpc.Board{
{Name: "Arduino Yún"},
{Name: "Arduino Uno"},
Expand Down Expand Up @@ -255,7 +255,7 @@ func TestPlatformSearch(t *testing.T) {
Maintainer: "Arduino",
Website: "https://www.arduino.cc/",
Email: "packages@arduino.cc",
Category: "Arduino",
Type: []string{"Arduino"},
Boards: []*rpc.Board{
{Name: "Arduino Yún"},
{Name: "Arduino Uno"},
Expand Down
58 changes: 29 additions & 29 deletions 58 rpc/cc/arduino/cli/commands/v1/common.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions 4 rpc/cc/arduino/cli/commands/v1/common.proto
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ message Platform {
bool manually_installed = 9;
// If true this Platform has been deprecated
bool deprecated = 10;
// Category of the platform.
string category = 11;
// Type of the platform.
repeated string type = 11;
}

message InstalledPlatformReference {
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.