(data []byte)
| 114 | } |
| 115 | |
| 116 | func (r *RoleIdentifier) UnmarshalJSON(data []byte) error { |
| 117 | var str string |
| 118 | err := json.Unmarshal(data, &str) |
| 119 | if err != nil { |
| 120 | return err |
| 121 | } |
| 122 | |
| 123 | v, err := RoleNameFromString(str) |
| 124 | if err != nil { |
| 125 | return err |
| 126 | } |
| 127 | |
| 128 | *r = v |
| 129 | return nil |
| 130 | } |
| 131 | |
| 132 | // The functions below ONLY need to exist for roles that are "defaulted" in some way. |
| 133 | // Any other roles (like auditor), can be listed and let the user select/assigned. |
nothing calls this directly
no test coverage detected