diff --git a/manager/handlers/has2be/certificate_signed_result.go b/manager/handlers/has2be/certificate_signed_result.go index cef7a27..cbf8d4f 100644 --- a/manager/handlers/has2be/certificate_signed_result.go +++ b/manager/handlers/has2be/certificate_signed_result.go @@ -13,7 +13,7 @@ import ( type CertificateSignedResultHandler struct{} -func (c CertificateSignedResultHandler) HandleCallResult(ctx context.Context, chargeStationId string, request ocpp.Request, response ocpp.Response, state any) error { +func (c CertificateSignedResultHandler) HandleCallResult(ctx context.Context, _ string, _ ocpp.Request, response ocpp.Response, _ any) error { span := trace.SpanFromContext(ctx) resp := response.(*has2be.CertificateSignedResponseJson) diff --git a/manager/handlers/has2be/get_15118_ev_certificate.go b/manager/handlers/has2be/get_15118_ev_certificate.go index 0325887..4a5349f 100644 --- a/manager/handlers/has2be/get_15118_ev_certificate.go +++ b/manager/handlers/has2be/get_15118_ev_certificate.go @@ -14,7 +14,7 @@ type Get15118EvCertificateHandler struct { Handler201 handlers.CallHandler } -func (g Get15118EvCertificateHandler) HandleCall(ctx context.Context, _ string, request ocpp.Request) (ocpp.Response, error) { +func (g Get15118EvCertificateHandler) HandleCall(ctx context.Context, chargeStationId string, request ocpp.Request) (ocpp.Response, error) { req := request.(*typesHasToBe.Get15118EVCertificateRequestJson) req201 := types201.Get15118EVCertificateRequestJson{ @@ -24,7 +24,7 @@ func (g Get15118EvCertificateHandler) HandleCall(ctx context.Context, _ string, Action: types201.CertificateActionEnumTypeInstall, } - res, err := g.Handler201.HandleCall(ctx, "", &req201) + res, err := g.Handler201.HandleCall(ctx, chargeStationId, &req201) if err != nil { return nil, err } diff --git a/manager/handlers/has2be/sign_certificate_test.go b/manager/handlers/has2be/sign_certificate_test.go index f56efb9..6b93d8b 100644 --- a/manager/handlers/has2be/sign_certificate_test.go +++ b/manager/handlers/has2be/sign_certificate_test.go @@ -18,7 +18,7 @@ type spy201SignCertificateHandler struct { RecordedCsr *string } -func (d spy201SignCertificateHandler) HandleCall(ctx context.Context, chargeStationId string, request ocpp.Request) (ocpp.Response, error) { +func (d *spy201SignCertificateHandler) HandleCall(_ context.Context, _ string, request ocpp.Request) (ocpp.Response, error) { d.recordReceivedCsr(request.(*types201.SignCertificateRequestJson).Csr) return &types201.SignCertificateResponseJson{ Status: types201.GenericStatusEnumTypeAccepted, @@ -45,7 +45,7 @@ func TestPassesPEMEncodedCsrOnAsIs(t *testing.T) { RecordedCsr: &csrRecorder, } handler := handlersHasToBe.SignCertificateHandler{ - Handler201: spy201Handler, + Handler201: &spy201Handler, } req := &typesHasToBe.SignCertificateRequestJson{ Csr: pemEncodedCsr, @@ -67,7 +67,7 @@ func TestDecodesBase64EncodedDERAndReencodesAsPEM(t *testing.T) { RecordedCsr: &csrRecorder, } handler := handlersHasToBe.SignCertificateHandler{ - Handler201: spy201Handler, + Handler201: &spy201Handler, } req := &typesHasToBe.SignCertificateRequestJson{ Csr: base64.StdEncoding.EncodeToString(csrBytes),