voter

package
v0.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 14, 2023 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DatabaseName = "voting_voter"
)

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) Create

func (s DefaultService) Create(voter voting.Voter) (voting.Voter, error)

func (DefaultService) Voter

func (s DefaultService) Voter(id string) (voting.Voter, error)

func (DefaultService) Voters added in v0.0.2

func (s DefaultService) Voters(ids []string) ([]voting.Voter, error)

type Repository

type Repository interface {
	Migrate() error
	Create(voter voting.Voter) (voting.Voter, error)
	Voter(id string) (voting.Voter, error)
	Voters(ids []string) ([]voting.Voter, error)
}

func NewRepository

func NewRepository(url string) (Repository, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL