Skip to content

Commit

Permalink
Fix RESTClient not implementing v2 API Client interface
Browse files Browse the repository at this point in the history
  • Loading branch information
sergimrz committed Aug 21, 2023
1 parent d36adad commit f99bf0f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions apiv2/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ import (

const v2URLSuffix string = "/v2.0"

// This ensures RESTClient implements the Client interface
var _ Client = (*RESTClient)(nil)

type Client interface {
auditlog.Client
artifact.Client
Expand Down Expand Up @@ -219,7 +222,7 @@ func (c *RESTClient) RemoveLabel(ctx context.Context, projectName, repositoryNam

// Configure Client

func (c *RESTClient) GetConfig(ctx context.Context) (*modelv2.ConfigurationsResponse, error) {
func (c *RESTClient) GetConfigs(ctx context.Context) (*modelv2.ConfigurationsResponse, error) {
return c.configure.GetConfigs(ctx)
}

Expand Down Expand Up @@ -265,7 +268,7 @@ func (c *RESTClient) GetLabelByID(ctx context.Context, id int64) (*modelv2.Label
return c.label.GetLabelByID(ctx, id)
}

func (c *RESTClient) ListLabels(ctx context.Context, name string, projectID *int64) ([]*modelv2.Label, error) {
func (c *RESTClient) ListLabels(ctx context.Context, name string, projectID *int64, scope label.Scope) ([]*modelv2.Label, error) {
return c.label.ListLabels(ctx, name, projectID)
}

Expand Down

0 comments on commit f99bf0f

Please sign in to comment.