// itemToRole attempts to decode the supplied `backend.Item` as
// a role resource.
itemToRole attempts to decode the supplied `backend.Item` as
a role resource.
// itemToRole attempts to decode the supplied ` backend . Item ` as // a role resource .
func itemToRole(item backend.Item) (services.Role, error) {
	role, err := services.GetRoleMarshaler().UnmarshalRole(
		item.Value,
		services.WithResourceID(item.ID),
		services.WithExpires(item.Expires),
	)
	if err != nil {
		return nil, trace.Wrap(err)
	}
	return role, nil
}
func itemToRole ( item backend . Item ) ( services . Role , error ) { role , err := services . GetRoleMarshaler ( ) . UnmarshalRole ( item . Value , services . WithResourceID ( item . ID ) , services . WithExpires ( item . Expires ) , ) if err != nil { return nil , trace . Wrap ( err ) } return role , nil }
itemToRole attempts to decode the supplied `backend.Item` as
a role resource.
itemToRole attempts to decode the supplied ` backend . Item ` as a role resource .