Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Database ¶
type Database interface { // IsOnline returns a value indicating whether the database is online. IsOnline() bool // Payments allows for accessing methods used to perform CRUD operations on payments. Payments() PaymentsDatabase }
Database represents the database where data will be stored.
func NewMongoDDatabase ¶
NewMongoDDatabase returns a new instance of Database powered by MongoDB.
type PaymentsDatabase ¶
type PaymentsDatabase interface { // CreatePayment creates the provided payment. CreatePayment(models.Payment) (models.Payment, error) // DeletePayment deletes the payment with the specified ID. DeletePayment(string) (bool, error) // GetPayment returns the payment with the specified ID. GetPayment(string) (models.Payment, error) // ListPayments lists all registered payments. ListPayments() ([]models.Payment, error) // UpdatePayment updates the payment with the specified ID. UpdatePayment(string, models.Payment) (models.Payment, error) }
PaymentsDatabase contains methods used to perform CRUD operations on payments.
Click to show internal directories.
Click to hide internal directories.