Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
golib
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Gaia-X
Trust Services API
golib
Commits
dea96673
Commit
dea96673
authored
1 year ago
by
Lyuben Penkovski
Browse files
Options
Downloads
Patches
Plain Diff
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
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
.gitlab-ci.yml
+3
-3
3 additions, 3 deletions
.gitlab-ci.yml
errors/errors.go
+5
-5
5 additions, 5 deletions
errors/errors.go
graceful/graceful_test.go
+1
-1
1 addition, 1 deletion
graceful/graceful_test.go
ocm/client.go
+1
-1
1 addition, 1 deletion
ocm/client.go
ocm/types.go
+4
-4
4 additions, 4 deletions
ocm/types.go
with
14 additions
and
14 deletions
.gitlab-ci.yml
+
3
−
3
View file @
dea96673
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
errors/errors.go
+
5
−
5
View file @
dea96673
...
...
@@ -96,12 +96,12 @@ func New(args ...interface{}) error {
case
Kind
:
e
.
Kind
=
arg
case
*
Error
:
c
opy
:=
*
arg
e
.
Err
=
&
c
opy
e
.
ID
=
c
opy
.
ID
innerKind
=
c
opy
.
Kind
errC
opy
:=
*
arg
e
.
Err
=
&
errC
opy
e
.
ID
=
errC
opy
.
ID
innerKind
=
errC
opy
.
Kind
if
e
.
Message
==
""
{
e
.
Message
=
c
opy
.
Message
e
.
Message
=
errC
opy
.
Message
}
case
error
:
e
.
Err
=
arg
...
...
This diff is collapsed.
Click to expand it.
graceful/graceful_test.go
+
1
−
1
View file @
dea96673
...
...
@@ -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
)
}
...
...
This diff is collapsed.
Click to expand it.
ocm/client.go
+
1
−
1
View file @
dea96673
...
...
@@ -146,7 +146,7 @@ func (c *Client) findByPresentationID(ctx context.Context, presentationID string
}
v
:=
url
.
Values
{}
v
.
Add
(
"pr
esentation
Id"
,
presentationID
)
v
.
Add
(
"pr
oofRecord
Id"
,
presentationID
)
req
.
URL
.
RawQuery
=
v
.
Encode
()
resp
,
err
:=
c
.
httpClient
.
Do
(
req
)
...
...
This diff is collapsed.
Click to expand it.
ocm/types.go
+
4
−
4
View file @
dea96673
...
...
@@ -7,7 +7,7 @@ type LoginProofInvitationResponse struct {
}
type
LoginProofInvitationResponseData
struct
{
Pr
esentation
ID
string
`json:"pr
esentation
Id"`
Pr
oofRecord
ID
string
`json:"pr
oofRecord
Id"`
PresentationMessage
string
`json:"presentationMessage"`
}
...
...
@@ -18,11 +18,11 @@ type LoginProofResultResponse struct {
}
type
LoginProofResultResponseData
struct
{
State
string
`json:"state"`
Data
[]
C
re
d
ent
ial
`json:"presentations"`
State
string
`json:"state"`
Presentations
[]
P
re
s
ent
ation
`json:"presentations"`
}
type
C
re
d
ent
ial
struct
{
type
P
re
s
ent
ation
struct
{
SchemaID
string
`json:"schemaId"`
CredDefID
string
`json:"credDefId"`
Claims
map
[
string
]
interface
{}
`json:"credentialSubject"`
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment