Skip to content

Commit f388e86

Browse files
authored
chore(loadbalancer): remove local interface (#1443)
1 parent 520e89c commit f388e86

1 file changed

Lines changed: 1 addition & 11 deletions

File tree

  • internal/cmd/load-balancer/observability-credentials/update

internal/cmd/load-balancer/observability-credentials/update/update.go

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,6 @@ const (
2828
credentialsRefArg = "CREDENTIALS_REF" //nolint:gosec // linter false positive
2929
)
3030

31-
// enforce implementation of interfaces
32-
var (
33-
_ loadBalancerClient = loadbalancer.APIClient{}.DefaultAPI
34-
)
35-
36-
type loadBalancerClient interface {
37-
UpdateCredentials(ctx context.Context, projectId, region, credentialsRef string) loadbalancer.ApiUpdateCredentialsRequest
38-
GetCredentials(ctx context.Context, projectId string, region string, credentialsRef string) loadbalancer.ApiGetCredentialsRequest
39-
}
40-
4131
type inputModel struct {
4232
*globalflags.GlobalFlagModel
4333
CredentialsRef string
@@ -138,7 +128,7 @@ func parseInput(p *print.Printer, cmd *cobra.Command, inputArgs []string) (*inpu
138128
}, nil
139129
}
140130

141-
func buildRequest(ctx context.Context, model *inputModel, apiClient loadBalancerClient) (loadbalancer.ApiUpdateCredentialsRequest, error) {
131+
func buildRequest(ctx context.Context, model *inputModel, apiClient loadbalancer.DefaultAPI) (loadbalancer.ApiUpdateCredentialsRequest, error) {
142132
req := apiClient.UpdateCredentials(ctx, model.ProjectId, model.Region, model.CredentialsRef)
143133

144134
currentCredentials, err := apiClient.GetCredentials(ctx, model.ProjectId, model.Region, model.CredentialsRef).Execute()

0 commit comments

Comments
 (0)