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

Docs: Improved Extension Points, Their Parent Structures, and Where You Call RegisterExtensions() #145

Merged
merged 2 commits into from
Jan 13, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions extensions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,16 @@ effectively defining new fields for the corresponding structures. In the code
base, these can be identified by the embedded `Extensions` struct. Each
extensible type has a corresponding `extensions.Point`. These are:

| type | extension point |
| --------------------- | ------------------------------------------------------------- |
| `comid.Comid` | `comid.ExtComid` |
| `comid.Entity` | `comid.ExtEntity` |
| `comid.FlagsMap` | `comid.ExtReferenceValueFlags`, `comid.ExtEndorsedValueFlags` |
| `comid.Mval` | `comid.ExtReferenceValue`, `comid.ExtEndorsedValue` |
| `comid.Triples` | `comid.ExtTriples` |
| `corim.Entity` | `corim.ExtEntity` |
| `corim.Signer` | `corim.ExtSigner` |
| `corim.UnsignedCorim` | `corim.ExtUnsignedCorim` |
| Extension Type | Extension Point(s) | Parent Structure | Where to Call RegisterExtensions() |
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
| Extension Type | Extension Point(s) | Parent Structure | Where to Call RegisterExtensions() |
| Extended Type | Extension Point(s) | Parent Structure | Where to Call RegisterExtensions() |

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done @setrofim

|:-------------------:|:-------------------------------------------------------------------------:|:----------------------------------------------------:|:-------------------------------------------------------------------------:|
| comid.Comid | comid.ExtComid | comid.Comid (the top-level CoMID) | On a comid.Comid instance (e.g. myComid.RegisterExtensions(extMap)) |
| comid.Entity | comid.ExtEntity | comid.Entity | Usually indirect via myComid.RegisterExtensions(...) (the Comid sees it). |
| comid.Triples | comid.ExtTriples | comid.Triples | Typically indirect via myComid.RegisterExtensions(...). |
| comid.Mval | comid.ExtReferenceValue, comid.ExtEndorsedValue, comid.ExtMval | comid.Mval (measurement-value in reference/endorsed) | Usually indirect via myComid.RegisterExtensions(...). |
| comid.FlagsMap | comid.ExtReferenceValueFlags, comid.ExtEndorsedValueFlags, comid.ExtFlags | comid.FlagsMap | Typically indirect via myComid.RegisterExtensions(...). |
| corim.UnsignedCorim | corim.ExtUnsignedCorim | corim.UnsignedCorim (the top-level CoRIM) | On a corim.UnsignedCorim instance (e.g. myCorim.RegisterExtensions(...)) |
| corim.Entity | corim.ExtEntity | corim.Entity | Usually indirect via myCorim.RegisterExtensions(...). |
| corim.Signer | corim.ExtSigner | corim.Signer | Usually indirect via myCorim.RegisterExtensions(...). |

Note that `comid.Mval` and `comid.FlagsMap` are used for both reference values
and endorsed values, which may be extended separately. This is why there are
Expand Down