A general boundary condition for liquid flow at solid surfaces