package
0.0.0-20211029210126-66ffae81a779
Repository: https://github.com/copilot-example-voting-app/api.git
Documentation: pkg.go.dev

# Functions

CreateTableIfNotExist creates the "votes" table if it does not exist already.
NewSQLDB creates a sql database to read and store votes.

# Constants

DBName is the name of the database for the votes API.

# Structs

ErrNoVote means a voter ID has not voted.
ResultCount is a pair of a vote result and the sum of votes for the result.
VoteInput represents a single vote request.

# Interfaces

DB is the interface for all the operations allowed on votes.