You're probably DEJ/Prop 36 eligible. Have an attorney review the facts of your case and go over all of your options. If you can't afford private counsel, an attorney will be appointed for you when you go to court. Good luck.
Mr. Feasel is a former prosecutor in San Mateo County (CA) with over 10 years of criminal law experience. Nothing stated on this site shall in anyway be construed as legal advice, or as creating any attorney/client relationship. If you would like to hire Mr. Feasel to further investigate your situation, feel free to contact him thru this site.
As a first offender, you should be eligible for a diversion program under PC 1000. That would entail taking and completing a drug class within 6 months, then remaining crime free for 18 months from the date of your plea. If you successfully complete the program, you can withdraw your plea and your case is dismissed.
If there are additional charges that make you ineligible for PC 1000, you may be eligible for a different drug program.
Don't take this lightly though - get an attorney.
The above answer is for general information only and is based on the information you posted. Every case is fact dependent, so to get a thorough analysis of your situation, you will need to consult face to face with an attorney licensed to practice in the jurisdiction where the incident took place. Do not conclusively rely on any information posted online when deciding what to do about your case.
I agree with the other attorneys. Hire counsel or have the Public Defender appointed. I am assuming you are an adult, but if still a minor other factors will come into play that will possibly give you more options. Talk to your attorney.
Although I am an experienced CA criminal defense and appeals attorney, I can not 'guarantee' that my answer is entirely accurate, since I have not reviewed all of the factual circumstances of the case, nor have I discussed those circumstances fully with the questioner. The fact that I have answered this question does not establish an attorney client relationship between the questioner and my self or my office.