A magistrate is an officer having power to issue a warrant for the arrest of a person charged with a public offense.