Skip to content

Commit

Permalink
add NewAgentResolver
Browse files Browse the repository at this point in the history
  • Loading branch information
volodymyr-basiuk committed Jan 18, 2024
1 parent 82684e8 commit b75d0d2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions resolvers/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ type AgentResolver struct {
config AgentResolverConfig
}

// NewAgentResolver returns new agent resolver
func NewAgentResolver(config AgentResolverConfig) *AgentResolver {
return &AgentResolver{config}
}

// Resolve is a method to resolve a credential status from an agent.
func (r AgentResolver) Resolve(_ context.Context, status verifiable.CredentialStatus) (out verifiable.RevocationStatus, err error) {
revocationBody := protocol.RevocationStatusRequestMessageBody{
Expand Down
2 changes: 1 addition & 1 deletion resolvers/agent_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func TestAgentResolver(t *testing.T) {
UserDID: userDID,
}

agentResolver := AgentResolver{agentConfig}
agentResolver := NewAgentResolver(agentConfig)

httpmock.Activate()
defer httpmock.DeactivateAndReset()
Expand Down

0 comments on commit b75d0d2

Please sign in to comment.