Documentation
¶
Overview ¶
Package web serves the invoice web app.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Access ¶
type Access interface {
CurrentUser(*gin.Context) (*access.User, bool)
Login(*gin.Context)
Callback(*gin.Context)
Logout(*gin.Context)
}
Access signs users in and reports the current user.
type Server ¶
Server serves the invoice web app.
func New ¶
New returns a server that lists invoices from s. When a is provided, the server also serves the sign-in, callback, and sign-out routes.
type Store ¶
type Store interface {
List() ([]*invoice.Invoice, error)
GetByMonth(year int, month time.Month) (*invoice.Invoice, error)
SetProject(year int, month time.Month, project string) error
SetPaid(year int, month time.Month, paid bool) error
}
Store provides the invoices the web app reads and changes.