Categorygithub.com/retgits/acme-serverless
modulepackage
0.3.0
Repository: https://github.com/retgits/acme-serverless.git
Documentation: pkg.go.dev

# README

ACME Serverless Fitness Shop

Serverless and Fitness, because combining two amazing things can only lead to more amazing things

Getting Started

These instructions will allow you to run entire ACME Serverless Fitness Shop

The ACME Serverless Fitness Shop contains seven different domains of service:

To get started you'll need:

Supported AWS Services

Data Store

The ACME Serverless Fitness Shop needs to store data. In the list below you can find the supported data store services with a link to the deployment instructions.

Eventing

Wherever possible, the ACME Serverless Fitness Shop uses event-driven communication. In the list below you can find the supported eventing solutions with a link to the deployment instructions.

APIs

All APIs will be accessible through Amazon API Gateway

Hosting

The Point-of-Sales app can be hosted on Amazon S3.

Overview

architecture

The diagram shows how the services in the different domains work together. The architecture above shows the Amazon Simple Queue Service deployment option

Contributing

Pull requests are welcome in their individual repositories. For major changes or questions, please open an issue first to discuss what you would like to change.

License

See the LICENSE file in the repository.

# Packages

No description provided by the author
No description provided by the author
No description provided by the author

# Functions

ToSentryMap converts the given struct to a map[string]interface{} so it can be sent to Sentry.
UnmarshalCart parses the JSON-encoded data and stores the result in a Cart.
UnmarshalCatalogItem parses the JSON-encoded data and stores the result in a CatalogItem.
UnmarshalCreditCardValidatedEvent parses the JSON-encoded data and stores the result in a CreditCardValidatedEvent.
UnmarshalCreditCardValidationDetails parses the JSON-encoded data and stores the result in a CreditCardValidationDetails.
UnmarshalItem parses the JSON-encoded data and stores the result in an Item.
UnmarshalItems parses the JSON-encoded data and stores the result in an CartItems object.
UnmarshalLoginRequest parses the JSON-encoded data and stores the result in a LoginRequest.
UnmarshalLoginResponse parses the JSON-encoded data and stores the result in a LoginResponse.
UnmarshalOrder parses the JSON-encoded data and stores the result in a Order object.
UnmarshalPaymentRequestDetails parses the JSON-encoded data and stores the result in a PaymentRequestDetails.
UnmarshalPaymentRequestedEvent parses the JSON-encoded data and stores the result in a PaymentRequestedEvent.
UnmarshalRegisterUserResponse parses the JSON-encoded data and stores the result in a RegisterUserResponse.
UnmarshalShipmentRequested parses the JSON-encoded data and stores the result in a ShipmentRequestedEvent.
UnmarshalShipmentSent parses the JSON-encoded data and stores the result in a ShipmentSent.
UnmarshalShopPayment parses the JSON-encoded data and stores the result in a ShopPayment.
UnmarshalUser parses the JSON-encoded data and stores the result in a User.
UnmarshalVerifyTokenResponse parses the JSON-encoded data and stores the result in a VerifyTokenResponse.

# Constants

CartDomain is the name used for the cart domain.
CatalogDomain is the name used for the catalog domain.
CreditCardValidatedEventName is the name used for the CreditCardValidated event.
DefaultErrorStatus is a string representation of the default status for error messages.
DefaultSuccessStatus is a string representation of the default status for success messages.
OrderDomain is the name used for the order domain.
PaymentDomain is the name used for the payment domain.
PaymentRequestedEventName is the name used for the PaymentRequested event.
ShipmentDeliveredEventName is the event name of ShipmentDelivered.
ShipmentDomain is the name used for the shipment domain.
ShipmentRequestedEventName is the event name of ShipmentRequested.
ShipmentSentEventName is the event name of ShipmentSent.

# Structs

Address is an address where the order must be delivered.
AllCatalogItemsResponse is the response struct for the reply to the API call to get all products.
AllUsers is the response struct for the reply to the API call to get all users.
Cart represents a shoppingcart for a user of the ACME Serverless Fitness Shop.
CartItem represents the items that the ACME Serverless Fitness Shop user has in their shopping cart.
CartItemTotal represents how many items the user currently has in their cart.
CartValueTotal represents the total value of all items currently in the cart of the iser.
CatalogItem represents the products as they are stored in the data store.
CreateCatalogItemResponse is the respons that is sent back to the API after a new item has been added to the catalog.
CreditCardValidatedEvent is sent by the payment service when the creditcard has been validated.
CreditCardValidationDetails contain the details of the validation by the payment service.
LoginRequest is the request to log in to be able to buy new products.
LoginResponse is the response sent to the client to indicate whether or not the user has successfully authenticated.
Metadata contains information on the domain, source, type, and status of the event.
Order represents an order that is made by a user in the ACME Serverless Fitness Shop.
OrderStatus represents the current status of an order and is sent by the Order service.
PaymentRequestDetails contains the data that is needed to validate the payment.
PaymentRequestedEvent is sent by the Order service when the creditcard for the order should be validated and charged.
RegisterUserResponse is sent back to the front-end service after a new user tries to register for the ACME Serverless Fitness Shop.
ShipmentData is the data the shipment service emits when the shipment is sent.
ShipmentRequest is the data that the order service emits.
ShipmentRequested is the event sent by the Order service when the order is finalized and paid and thus ready to be shipped to the customer.
ShipmentSent is the event sent by the Shipment service when the order is shipped to the customer.
ShopCard allows for backward compatibility between the serverless version and the containerized version of the ACME Fitness Shop.
ShopPayment allows for backward compatibility between the serverless version and the containerized version of the ACME Fitness Shop.
User is a single user in the ACME Serverless Fitness Shop.
UserDetailsResponse is sent back to the user with details about that specific user.
UserIDResponse returns the UserID.
VerifyTokenResponse is sent to the service requesting a validation of the access token.

# Type aliases

Items is a slice of Item objects.
Carts is a slice of Cart objects.
Orders is a slide of Order objects.