View Source Bbox.Voters (bbox v0.1.2)
Link to this section Summary
Link to this section Functions
@spec get_by_private_key!(binary()) :: %Bbox.Voters.Voter{ __meta__: term(), address: term(), email: term(), inserted_at: term(), private_key: term(), public_key: term(), updated_at: term(), username: term(), votes: term() }
Get voter by RSA Private Key.
@spec insert(map()) :: {:ok, %Bbox.Voters.Voter{ __meta__: term(), address: term(), email: term(), inserted_at: term(), private_key: term(), public_key: term(), updated_at: term(), username: term(), votes: term() }} | {:error, charlist()}
Insert a new voter into the database.