Commit Graph

27 Commits (68d6f4bcdc718ca57418d8cea329e79e189218ee)

Author SHA1 Message Date
Jan Dittberner ec7d2fe324 Start refactoring to packages 2 years ago
Jan Dittberner d22f31e823 Fix copyright headers in Go files 2 years ago
Jan Dittberner 0c2fbf9d54 Wrap error when db connection closing fails 2 years ago
Jan Dittberner 623bdf6d56 Replace magic numbers with constants
- use strconv.Atoi and strconv.Itoa where appropriate
- use constants for number base and size
- use constant for reminder job interval
2 years ago
Jan Dittberner 70cc0942ca Upgrade to Go 1.16 and newer libraries
- use embed from the standard library instead of packr
- upgrade to sprig v3
- upgrade gomail version
- use golang-migrate instead of sql-migrate to get embed support
- use statigz to deliver compressed static assets
3 years ago
Jan Dittberner 03827874cf Configure golangci-lint and apply suggestions 4 years ago
Jan Dittberner 58898b29a7 Add new table user_roles
This commit adds a new database table user_roles to prepare for the
introduction of a voter management system. All existing enabled voters
are added to the VOTER role.
4 years ago
Jan Dittberner 41a8261552 Ensure that the application can start with a new database
This commit changes the NewDB function to run migrations before preparing
SQL statements.
5 years ago
Jan Dittberner 29a7a1c90c Apply Apache License 2.0 5 years ago
Jan Dittberner 2d7f0cc0e3 Modernize Go code
- switch from go-logging to logrus
- handle all errors
- use gomail's NewDialer instead of deprecated NewPlainDialer
5 years ago
Jan Dittberner fd2f3a6e5d Ignore count of applied migrations from migrate.Exec 6 years ago
Jan Dittberner 4dd5e09820 Embed database migrations
- switch from goose to github.com/rubenv/sql-migrate
- move assets (static, templates, migrations) to boardvoting package
- add generated boardvoting/assets.go
- remove unused static files from static directory
- add package db with db migration configuration
6 years ago
Jan Dittberner 9b07f3e538 Fix compile errors with pinned dependency versions 7 years ago
Jan Dittberner 4d23b6a48f Switch to more flexible go-logging
This commit switches from loggo to the more flexible go-logging
framework. Logs of severity INFO or higher are now written to a separate
boardvoting.log file.

Errors during execution of mail templates are now logged.

A reasoning for the vote result is now logged and put into the mail
notification when a decision is closed.
7 years ago
Jan Dittberner 5a449926f4 Use loggo for logging 7 years ago
Jan Dittberner fd0a8ed972 Run goose migration on application startup 7 years ago
Jan Dittberner 8d0e0eeb1b Use INSERT OR REPLACE to allow changing votes 7 years ago
Jan Dittberner 2cac50ee86 Implement proxy voting 7 years ago
Jan Dittberner b6ad5d8ad3 Implement reminder job 7 years ago
Jan Dittberner dcdd5f715f Implement decision closing job 7 years ago
Jan Dittberner 2de96dc13d Implement vote closing, refactor notifications 7 years ago
Jan Dittberner 0ce9ad6dcc Implement withdraw motion 7 years ago
Jan Dittberner bc194e8943 Implement motion editing 7 years ago
Jan Dittberner cc0f5c0b7b Implement motion creation mail template 7 years ago
Jan Dittberner 471daf12ea Partialy add new motion creation 7 years ago
Jan Dittberner e0be1a6aa5 Switch to context API 7 years ago
Jan Dittberner 6fe515ea52 Implement proper model, actions and template structure 7 years ago