Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add digilocker certificate api #223

Merged

Conversation

varadeth
Copy link
Contributor

@varadeth varadeth commented May 2, 2023

No description provided.

@varadeth varadeth marked this pull request as draft May 2, 2023 08:37
@varadeth varadeth marked this pull request as ready for review May 16, 2023 05:02
Comment on lines 17 to 20
URL string `env:"REGISTRY_URL" default:"https://demo-education-registry.xiv.in/registry/"`
SchemaMapper string `env:"SCHEMA_MAPPER" default:"{\"doctype\": \"Schema\"}"`
SearchBodyMapper string `env:"SEARCH_BODY_MAPPER" default:"{\"Schema\": \"{\\\"filters\\\": {\\\"osid\\\": {\\\"eq\\\": \\\"{{.parameter1}}\\\"}}}\"}"`
TemplateMapper string `env:"TEMPLATE_MAPPER" default:"{\"doctype\": \"template\"}"`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{
  "docType1": {
    "schema": "Student",
    "template": "hindi",
    "searchFilter": {
      "osid": {
        "eq": "{{DocDetails.certificate_id}}"
      }
    }
  },
  "docType2": {
    "schema": "Teacher",
    "template": "hindi",
    "searchFilter": {
      "email": {
        "eq": "{{DocDetails.email}}"
      },
      "dob": {
        "eq": "{{DocDetails.dob}}"
      }
    }
  }
}
Import a JSON with the above config.

Txn string `xml:"txn,attr"`
OrgId string `xml:"orgId,attr"`
Format string `xml:"format,attr"`
DocDetails struct {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

convert it to map and access it directly in template rendering

return resp.Bytes(), osid, nil
}

// TODO: cache token˳
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cache token is missed out

@tejash-jl tejash-jl merged commit a267506 into Sunbird-RC:main May 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants