Electrochemical and photochemical CO2 reduction using diamond