Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
github.com/aiescola/go_shop_api
Sample backend project made in Go and used in the android Project:
It's deployed in , although it uses a free dyno, so the first time it will delay a bit or even timeout.
POST methods require authentication, for it, you must first /register
using the appropiate username
and password
in the body (urlencoded)
As for /login
you can either use a POST with the encoded credentials or a GET to fill the credentials in an html form.
/api/products
{
"products": [
{
"code": "MUG",
"name": "Mug",
"price": 5.4
},
{
"code": "TSHIRT",
"name": "T-Shirt",
"price": 12.5
},
{
"code": "PEN",
"name": "Pen",
"price": 3.2
}
]
}
/api/products/{Code}
{
"code": "MUG",
"name": "Mug",
"price": 5.4
}
/api/products/
Raw body:
{ "code": "CODE", "name": "NAME", "price": 99.99 }
/api/discounts/
{
"discounts": [
{
"code": "PRD02",
"type": "product",
"name": "One Product discount (voucher)",
"description": "Mugs at 9.95 for a limited time",
"productCodes": [
"MUG"
],
"price": 9.95
}
]
}
/api/discounts/{code}
{
"code": "PRD02",
"type": "product",
"name": "One Product discount (voucher)",
"description": "Mugs at 9.95 for a limited time",
"productCodes": [
"MUG"
],
"price": 9.95
}
/api/discounts/
Raw body:
{ "code": "TSHIRT", "name": "T-Shirt", "price": 15.90 }
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.