Skip to content

Commit

Permalink
fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
DaevMithran committed Sep 4, 2024
1 parent 5acb2ac commit 9450d4d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

## ℹ️ Overview

DID methods are expected to provide [standards-compliant methods of DID and DID Document ("DIDDoc") production](https://w3c.github.io/did-core/#production-and-consumption). The **cheqd DID Resolver** is designed to implement the [W3C DID *Resolution* specification](https://w3c-ccg.github.io/did-resolution/) for [`did:cheqd`](https://docs.cheqd.io/identity/architecture/adr-list/adr-001-cheqd-did-method) method.
DID methods are expected to provide [standards-compliant methods of DID and DID Document ("DIDDoc") production](https://w3c.github.io/did-core/#production-and-consumption). The **cheqd DID Resolver** is designed to implement the [W3C DID _Resolution_ specification](https://w3c.github.io/did-resolution/) for [`did:cheqd`](https://docs.cheqd.io/identity/architecture/adr-list/adr-001-cheqd-did-method) method.

### 📝 Architecture

Expand Down Expand Up @@ -60,7 +60,7 @@ enable = true
address = "0.0.0.0:9090"
```

**Note**: If you're pointing a DID Resolver to your own node instance, by default `cheqd-node` instance gRPC endpoints are *not* served up with a TLS certificate. This means the `useTls` property would need to be set to `false`, unless you're otherwise using a load balancer that provides TLS connections to the gRPC port.
**Note**: If you're pointing a DID Resolver to your own node instance, by default `cheqd-node` instance gRPC endpoints are _not_ served up with a TLS certificate. This means the `useTls` property would need to be set to `false`, unless you're otherwise using a load balancer that provides TLS connections to the gRPC port.

## 🧑‍💻 Building your own Docker image

Expand All @@ -87,7 +87,7 @@ image: did-resolver:local

Make sure you comment out the pre-existing `image` property that pulls in a container image from Github Container Registry, as shown above.

You can also do *just* a build with:
You can also do _just_ a build with:

```bash
docker-compose -f docker/docker-compose.yml --env-file docker/docker-compose.env build --no-cache
Expand Down Expand Up @@ -191,7 +191,7 @@ You can execute the tests as long as you have Ginkgo CLI installed, which target
ginkgo -r --tags integration --race --randomize-suites --keep-going --trace
```

**Note**: By default, the tests target `localhost:8080` as the port where it expects the running DID Resolver instance for testing. If your running instance is at a different address, you can override this by setting a value for the `TEST_HOST_ADDRESS` environment variable *before* executing the Ginkgo test suite.
**Note**: By default, the tests target `localhost:8080` as the port where it expects the running DID Resolver instance for testing. If your running instance is at a different address, you can override this by setting a value for the `TEST_HOST_ADDRESS` environment variable _before_ executing the Ginkgo test suite.

```bash
export TEST_HOST_ADDRESS="where.is.did.resolver.running:port"
Expand Down
2 changes: 1 addition & 1 deletion services/diddoc_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ func (dds DIDDocService) DereferenceSecondary(did string, version string, fragme
return &result, nil
}

func (dds DIDDocService) resolveMetadata(did string, metadata *didTypes.Metadata, contentType types.ContentType) (*types.ResolutionDidDocMetadata, *types.IdentityError) {
func (dds DIDDocService) resolveMetadata(did string, metadata *didTypes.Metadata, _ types.ContentType) (*types.ResolutionDidDocMetadata, *types.IdentityError) {
resources, err := dds.ledgerService.QueryCollectionResources(did)
if err != nil {
return nil, err
Expand Down
2 changes: 1 addition & 1 deletion types/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ func (tKType TransformKeysType) IsSupported() bool {

const (
DIDSchemaJSONLD = "https://www.w3.org/ns/did/v1"
DIFDIDConfigurationJSONLD = "https://identity.foundation/.well-known/did-configuration/v1"
ResolutionSchemaJSONLD = "https://w3id.org/did-resolution/v1"
Ed25519VerificationKey2020JSONLD = "https://w3id.org/security/suites/ed25519-2020/v1"
Ed25519VerificationKey2018JSONLD = "https://w3id.org/security/suites/ed25519-2018/v1"
JsonWebKey2020JSONLD = "https://w3id.org/security/suites/jws-2020/v1"
DIFDIDConfigurationJSONLD = "https://identity.foundation/.well-known/did-configuration/v1"
)

const (
Expand Down
6 changes: 3 additions & 3 deletions types/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ func SetupLogger(config Config) {
func ParseGRPCEndpoint(configEndpoint string, networkName string) (*Network, error) {
config := strings.Split(configEndpoint, ",")
if len(config) != 3 {
return nil, fmt.Errorf(fmt.Sprintf("Endpoint config for %s is invalid: %s", networkName, configEndpoint))
return nil, fmt.Errorf("endpoint config for %s is invalid: %s", networkName, configEndpoint)
}
useTls, err := strconv.ParseBool(config[1])
if err != nil {
return nil, fmt.Errorf(fmt.Sprintf("useTls value %s for %s endpoint is invalid", configEndpoint, networkName))
return nil, fmt.Errorf("useTls value %s for %s endpoint is invalid", configEndpoint, networkName)
}
timeout, err := time.ParseDuration(config[2])
if err != nil {
return nil, fmt.Errorf(fmt.Sprintf("Timeout value %s for %s endpoint is invalid", configEndpoint, networkName))
return nil, fmt.Errorf("timeout value %s for %s endpoint is invalid", configEndpoint, networkName)
}

return &Network{
Expand Down

0 comments on commit 9450d4d

Please sign in to comment.