|Andrew Sellers c80d82ca1c Make go-gettable||1 year ago|
|.vscode||1 year ago|
|api||1 year ago|
|config||1 year ago|
|db||1 year ago|
|permissions||1 year ago|
|vendor||1 year ago|
|.gitignore||1 year ago|
|Gopkg.lock||1 year ago|
|Gopkg.toml||1 year ago|
|README.md||1 year ago|
|curl_examples.txt||1 year ago|
|main.go||1 year ago|
|openapi.yaml||1 year ago|
The Product service allows for anonymous users to view and filter products that are set to visible. Logged in users can create, edit, and delete products that correspond to their allowed vendors. Logging in uses tokens from an identity service (not in scope).
API Documentation is in the openapi.yaml file.
You’ll want to know a basic level of how DynamoDB works. Data is stored in that, and there’s a simplistic shell on top of it that should make the API somewhat easier to write. The main package really just calls Init functions on sub-packages and setups up any config variables it needs to. Well, and handling interrupts so the api server will do a graceful shutdown.
You’ve got 4 different sub packages
You’ll need 4 DyanmoDB tables for everything, named Products, ProductsDev, ProductsTest, and ProductsIntegration. Primary Key is “ID”, which is a binary key. Manufacturer, Category1, Category2, Model could deserve indexes for production tables.
You can set the Access and Secret keys using the AWSACCESS/AWS_ACCESS_KEY and AWSSECRET/AWS_SECRET_KEY environment variables, otherwise this will try to use the .aws credentials. Default region is us-east-2, but that can be set by the AWSREGION environment variable.
You’ll want a token host to handle editor tokens. It should respond with a json object that has a scopes attribute, where scopes is a space separated string. For every manufacturer=x item in the scopes attribute, the token will provide editing of products with that manufacturer. Or you can set a support_user scope that will allow editing all manufacturer’s products.
Elasticsearch based service that can do keyword searches on product info.
Keeps up with normal user reviews and calculated ratings for the product
Calculates the sales rank for products and pushes it to this service.
Keeps track of which items a user is planning to buy, also lets the purchase the items.
Keeps up with what products are in stock and where
Handles the trees of Categories