api

package
v0.0.0-...-9c02020 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FilterTransactionsRequest

type FilterTransactionsRequest struct {
	Email     string `json:"user_email"`
	StartDate string `json:"start_date"`
	EndDate   string `json:"end_date"`
}

type PostTransactionRequest

type PostTransactionRequest struct {
	Email  string `json:"user_email"`
	Date   string `json:"date_of_transaction"`
	Amount string `json:"amount"`
}

type Server

type Server struct {
	Router       chi.Router
	DB           *db.Database
	PDFGenerator *pdf.PDFGenerator
	Emailer      *email.Emailer
}

func NewServer

func NewServer(senderEmail string, senderPasscode string) *Server

func (*Server) GetTransactionPDFHandler

func (srv *Server) GetTransactionPDFHandler(w http.ResponseWriter, r *http.Request)

func (*Server) MountHandlers

func (srv *Server) MountHandlers()

func (*Server) PostTransactionHandler

func (srv *Server) PostTransactionHandler(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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