Documentation ¶
Index ¶
Constants ¶
View Source
const (
DatabaseName = "voting_ballot"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultService ¶
type DefaultService struct {
// contains filtered or unexported fields
}
func NewDefaultService ¶
func NewDefaultService(logger zerolog.Logger, repository Repository) DefaultService
func (DefaultService) Submit ¶
func (s DefaultService) Submit(ballot voting.Ballot) (voting.BallotResult, error)
func (DefaultService) VoterBallot ¶
func (s DefaultService) VoterBallot(pollId string, voterId string) ([]string, error)
func (DefaultService) VoterCount ¶ added in v0.0.2
func (s DefaultService) VoterCount(pollId string) (int64, error)
type Repository ¶
type Repository interface { Migrate() error VoidBallotOptions(pollId string, voterId string) error CreateBallotOptions(ballot voting.Ballot) error VoterCount(pollId string) (int64, error) VoterIds(pollId string) ([]string, error) VoterBallot(pollId string, voterId string) ([]string, error) }
func NewRepository ¶
func NewRepository(url string) (Repository, error)
Click to show internal directories.
Click to hide internal directories.