-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement an extensions mechanism for entries identified as "type-choice" in the [CoRIM] spec draft 2. This done by defining a common registration pattern for ITypeChoiceValue interface implementations (the interface is often extended for specific extension points). A Register function is used to associate a factory that produces a type choice instance populated with an appropriate value with a CBOR tag. The factory function must be able to handle nil values, resulting in the zero-value for the associated type; aside from the, the range of valid values the factory can handle is type-specific. A couple of the entries indicates as type choices in the spec (rel and role) are in fact extensible enums, rather than types, so they're implemented somewhat differently. The registration function for them just takes the new value and associated name; there is no need for a factory function. Additionally: - add tagged-int-type implementation for class-id - add EntityName type to represent entity-name type choice (entity-name was previously implemented as a string) - add String() method for comid.Role and corim.Role [CoRIM]: https://www.ietf.org/archive/id/draft-ietf-rats-corim-02.html Signed-off-by: Sergei Trofimov <[email protected]>
- Loading branch information
Showing
48 changed files
with
3,832 additions
and
1,111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.