ValidateRole should return an error that will be used in the ValidationError if the role is invalid for the corresponding resource type.
(role Role)
| 23 | // ValidateRole should return an error that will be used in the |
| 24 | // ValidationError if the role is invalid for the corresponding resource type. |
| 25 | ValidateRole(role Role) error |
| 26 | } |
| 27 | |
| 28 | func Validate[Role codersdk.WorkspaceRole | codersdk.TemplateRole | codersdk.ChatRole]( |