Skip to content

Commit

Permalink
move GetDomains function, return GetDomainsResponse
Browse files Browse the repository at this point in the history
Signed-off-by: zychen5186 <[email protected]>
  • Loading branch information
zychen5186 committed Jun 12, 2024
1 parent 4b4fd7f commit 93979fa
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion flytectl/pkg/ext/domain_fetcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin"
)

func (a *AdminFetcherExtClient) GetDomains(ctx context.Context) (*admin.Domains, error) {
func (a *AdminFetcherExtClient) GetDomains(ctx context.Context) (*admin.GetDomainsResponse, error) {
domains, err := a.AdminServiceClient().GetDomains(ctx, &admin.GetDomainRequest{})
if err != nil {
return nil, err
Expand Down
2 changes: 1 addition & 1 deletion flytectl/pkg/ext/domain_fetcher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func TestAdminFetcherExtClient_GetDomains(t *testing.T) {
Id: "production",
Name: "production",
}
domains := &admin.Domains{
domains := &admin.GetDomainsResponse{
Domains: []*admin.Domain{domain1, domain2, domain3},
}

Expand Down
2 changes: 1 addition & 1 deletion flytectl/pkg/ext/fetcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ type AdminFetcherExtInterface interface {
// GetProjectByID fetches a single project by its identifier. If project does not exist, an error will be returned
GetProjectByID(ctx context.Context, projectID string) (*admin.Project, error)

GetDomains(ctx context.Context) (*admin.Domains, error)
GetDomains(ctx context.Context) (*admin.GetDomainsResponse, error)
}

// AdminFetcherExtClient is used for interacting with extended features used for fetching data from admin service
Expand Down
10 changes: 5 additions & 5 deletions flytectl/pkg/ext/mocks/admin_fetcher_ext_interface.go

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

0 comments on commit 93979fa

Please sign in to comment.