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

feat: export policy condition types #58

Merged
merged 1 commit into from
Mar 12, 2024
Merged

feat: export policy condition types #58

merged 1 commit into from
Mar 12, 2024

Commits on Mar 12, 2024

  1. feat: export policy condition types

    == Motivation ==
    
    Allow package consumers to use typed PolicyViolation 'Data' field
    
    == Details ==
    
    Currently, consumers of this library do not have access to the
    specific struct types that the 'Data' field of the PolicyViolation
    object can take on. This makes it near impossible (at least
    not without brittle reflection based techniques) to access
    inner fields of the struct in the 'Data' field. An example
    inner field is the 'ErrNum' field on an Xid PolicyViolation which
    is crucial for understanding the device health.
    
    This change attempts to solve this by exporting the different
    struct types that the data field can take on. This allows
    consumers to cast the data field to a type which they will
    be able to more safely handle in their code.
    
    == Testing ==
    
    - built package
    
    Signed-off-by: sanjams <sanjams2@users.noreply.github.com>
    sanjams2 committed Mar 12, 2024
    Configuration menu
    Copy the full SHA
    cbde45d View commit details
    Browse the repository at this point in the history