Skip to content

Commit

Permalink
linter
Browse files Browse the repository at this point in the history
  • Loading branch information
volodymyr-basiuk committed Dec 19, 2024
1 parent 7a67b22 commit f1830f8
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 12 deletions.
15 changes: 11 additions & 4 deletions protocol/discovery_protocol.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,21 @@ package protocol

import "github.com/iden3/iden3comm/v2"

// DiscoveryFeatureType is type for query feature-type.
// DiscoveryProtocolFeatureType is type for query feature-type.
type DiscoveryProtocolFeatureType string

const (
DiscoveryProtocolFeatureTypeAccept DiscoveryProtocolFeatureType = "accept"
// DiscoveryProtocolFeatureTypeAccept is "accept" type for query feature-type.
DiscoveryProtocolFeatureTypeAccept DiscoveryProtocolFeatureType = "accept"

// DiscoveryProtocolFeatureTypeProtocol is "protocol" type for query feature-type.
DiscoveryProtocolFeatureTypeProtocol DiscoveryProtocolFeatureType = "protocol"

// DiscoveryProtocolFeatureTypeGoalCode is "goal-code" type for query feature-type.
DiscoveryProtocolFeatureTypeGoalCode DiscoveryProtocolFeatureType = "goal-code"
DiscoveryProtocolFeatureTypeHeader DiscoveryProtocolFeatureType = "header"

// DiscoveryProtocolFeatureTypeHeader is "header" type for query feature-type.
DiscoveryProtocolFeatureTypeHeader DiscoveryProtocolFeatureType = "header"
)

// DiscoverFeatureQueriesMessage represents discover feature queries message.
Expand Down Expand Up @@ -63,5 +70,5 @@ type DiscoverFeatureDiscloseMessageBody struct {
// DiscoverFeatureDisclosure represents discover feature disclosure.
type DiscoverFeatureDisclosure struct {
FeatureType DiscoveryProtocolFeatureType `json:"feature-type"`
Id string `json:"id"`
ID string `json:"id"`
}
16 changes: 8 additions & 8 deletions protocol/discovery_protocol_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,35 +85,35 @@ func TestDiscoverFeatureDisclosuresMessageCreation(t *testing.T) {
Disclosures: []protocol.DiscoverFeatureDisclosure{
{
FeatureType: protocol.DiscoveryProtocolFeatureTypeAccept,
Id: "iden3comm/v1;env=application/iden3-zkp-json;circuitId=authV2,authV3;alg=groth16",
ID: "iden3comm/v1;env=application/iden3-zkp-json;circuitId=authV2,authV3;alg=groth16",
},
{
FeatureType: protocol.DiscoveryProtocolFeatureTypeAccept,
Id: "iden3comm/v1;env=application/iden3comm-signed-json;alg=ES256K-R",
ID: "iden3comm/v1;env=application/iden3comm-signed-json;alg=ES256K-R",
},
{
FeatureType: protocol.DiscoveryProtocolFeatureTypeProtocol,
Id: "https://iden3-communication.io/authorization/1.0",
ID: "https://iden3-communication.io/authorization/1.0",
},
{
FeatureType: protocol.DiscoveryProtocolFeatureTypeHeader,
Id: "id",
ID: "id",
},
{
FeatureType: protocol.DiscoveryProtocolFeatureTypeHeader,
Id: "type",
ID: "type",
},
{
FeatureType: protocol.DiscoveryProtocolFeatureTypeHeader,
Id: "body",
ID: "body",
},
{
FeatureType: protocol.DiscoveryProtocolFeatureTypeHeader,
Id: "created_time",
ID: "created_time",
},
{
FeatureType: protocol.DiscoveryProtocolFeatureTypeHeader,
Id: "expires_time",
ID: "expires_time",
},
},
},
Expand Down

0 comments on commit f1830f8

Please sign in to comment.