Skip to content
Snippets Groups Projects
Commit dea96673 authored by Lyuben Penkovski's avatar Lyuben Penkovski
Browse files

Update OCM client according to OCM API changes

parent e1958486
No related branches found
No related tags found
No related merge requests found
Pipeline #61775 passed with stage
in 1 minute and 32 seconds
......@@ -6,7 +6,7 @@ before_script:
- cd /go/src/gitlab.com/${CI_PROJECT_PATH}
unit tests:
image: golang:1.20.2
image: golang:1.20.4
stage: test
tags:
- amd64-docker
......@@ -18,7 +18,7 @@ unit tests:
lint:
image: golangci/golangci-lint:v1.50.1
image: golangci/golangci-lint:latest
stage: test
tags:
- amd64-docker
......@@ -28,7 +28,7 @@ lint:
- golangci-lint run
govulncheck:
image: golang:1.20.2
image: golang:1.20.4
stage: test
tags:
- amd64-docker
......
......@@ -96,12 +96,12 @@ func New(args ...interface{}) error {
case Kind:
e.Kind = arg
case *Error:
copy := *arg
e.Err = &copy
e.ID = copy.ID
innerKind = copy.Kind
errCopy := *arg
e.Err = &errCopy
e.ID = errCopy.ID
innerKind = errCopy.Kind
if e.Message == "" {
e.Message = copy.Message
e.Message = errCopy.Message
}
case error:
e.Err = arg
......
......@@ -19,7 +19,7 @@ type handler struct {
requestTime time.Duration
}
func (h *handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
func (h *handler) ServeHTTP(_ http.ResponseWriter, _ *http.Request) {
time.Sleep(h.requestTime)
}
......
......@@ -146,7 +146,7 @@ func (c *Client) findByPresentationID(ctx context.Context, presentationID string
}
v := url.Values{}
v.Add("presentationId", presentationID)
v.Add("proofRecordId", presentationID)
req.URL.RawQuery = v.Encode()
resp, err := c.httpClient.Do(req)
......
......@@ -7,7 +7,7 @@ type LoginProofInvitationResponse struct {
}
type LoginProofInvitationResponseData struct {
PresentationID string `json:"presentationId"`
ProofRecordID string `json:"proofRecordId"`
PresentationMessage string `json:"presentationMessage"`
}
......@@ -18,11 +18,11 @@ type LoginProofResultResponse struct {
}
type LoginProofResultResponseData struct {
State string `json:"state"`
Data []Credential `json:"presentations"`
State string `json:"state"`
Presentations []Presentation `json:"presentations"`
}
type Credential struct {
type Presentation struct {
SchemaID string `json:"schemaId"`
CredDefID string `json:"credDefId"`
Claims map[string]interface{} `json:"credentialSubject"`
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment