package
2.0.0+incompatible
Repository: https://github.com/netlify/gocommerce.git
Documentation: pkg.go.dev
# Functions
AutoMigrate runs the gorm automigration for all models.
Connect will connect to that storage engine.
No description provided by the author
No description provided by the author
GetInstance finds an instance by ID.
No description provided by the author
No description provided by the author
No description provided by the author
IsNotFoundError returns whether an error represents a "not found" error.
LogEvent logs a new event.
NewHook creates a Hook model.
NewOrder creates a new pending Order.
NewTransaction returns a new transaction for an order.
NextInvoiceNumber updates and returns the next invoice number for the instance.
RunHooks creates a goroutine that triggers stored webhooks every 5 seconds.
No description provided by the author
# Constants
NumberType | StringType | BoolType are the different types supported in custom data for orders.
ChargeTransactionType is the charge transaction type.
EventCreated is the EventType when an order is created.
EventDeleted is the EventType when an order is deleted.
EventUpdated is the EventType when an order is updated.
FailedState is the failed state of an Order.
NumberType | StringType | BoolType are the different types supported in custom data for orders.
PaidState is the paid state of an Order.
PendingState is the pending state of an Order.
RefundTransactionType is the refund transaction type.
ShippedState is the shipped state of an Order.
ShippingState is the shipping state of an order.
NumberType | StringType | BoolType are the different types supported in custom data for orders.
# Variables
FulfillmentStates are the possible values for the FulfillmentState field.
Namespace puts all tables names under a common namespace.
PaymentState are the possible values for the PaymentState field.
# Structs
AddonItem are additional items for a LineItem.
AddonMetaItem model.
Address is a stored address, reusable with an ID.
AddressRequest is the raw address data.
Coupon represents a discount redeemable with a code.
Download represents a purchased asset download.
Event represents a change to an order.
FixedAmount represents an amount and currency pair.
@todo: replace with mysql.NullTime once the tests no longer use SQLite.
Hook represents a webhook.
No description provided by the author
No description provided by the author
LineItem is a single item in an Order.
LineItemMetadata model.
ModelNotFoundError represents when an instance is not found.
Order model.
OrderNote model which represent notes on a model.
PriceItem represent the subcomponent price items of a LineItem.
PriceMetadata model.
PriceMetaItem model.
Transaction is an transaction with a payment provider.
User model.
# Type aliases
EventType is the type of change that occurred.