I have to admit I find the assumption underlying the question -- how both blacks and Native Americans were subjected to slavery during the California Gold Rush -- a little confusing. Treatment of the Native American populations of North America is a very distinct subject, different from the issue of black slavery.
During the California Gold Rush, many blacks, including freed slaves, constituted part of the migration towards California in search of wealth. While California was ostensibly a "free" state, it had its share of racists who wanted to keep blacks out and even kept slaves themselves, but there is little parallel on the whole between the history of slavery as institutionalized and practiced across the American South and that which occurred in California.
To discuss the treatment of Native American tribes in the same context as that of blacks during the California Gold Rush does great damage to the history of genocide to which the tribes were subjected. The policy of Manifest Destiny resulted in the decimation of the Native American population with those who survived forced from the native lands onto reservations. As horrible as slavery was, the treatment of Native Americans went beyond race-driven exploitation of labor. Even after the Civil War ostensibly resolved the issue of slavery, the wars against the Native Americans continued.