mirror of
https://github.com/kataras/iris.git
synced 2025-03-15 06:46:26 +01:00
update deps
This commit is contained in:
parent
763300b566
commit
afa1d89a23
|
@ -69,6 +69,7 @@ func handler(ctx iris.Context) {
|
||||||
// makes sure for that, otherwise this handler will not be executed.
|
// makes sure for that, otherwise this handler will not be executed.
|
||||||
// OR:
|
// OR:
|
||||||
user := ctx.User()
|
user := ctx.User()
|
||||||
|
// OR ctx.User().GetRaw() to get the underline value.
|
||||||
username, _ := user.GetUsername()
|
username, _ := user.GetUsername()
|
||||||
password, _ := user.GetPassword()
|
password, _ := user.GetPassword()
|
||||||
ctx.Writef("%s %s:%s", ctx.Path(), username, password)
|
ctx.Writef("%s %s:%s", ctx.Path(), username, password)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package main
|
package main // Look README.md
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
@ -65,7 +65,8 @@ func main() {
|
||||||
}
|
}
|
||||||
|
|
||||||
func index(ctx iris.Context) {
|
func index(ctx iris.Context) {
|
||||||
user := ctx.User()
|
user, _ := ctx.User().GetRaw()
|
||||||
|
// user is a type of main.User
|
||||||
ctx.JSON(user)
|
ctx.JSON(user)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,19 +5,19 @@
|
||||||
| Method | Path | Description | URL Parameters | Body | Auth Required |
|
| Method | Path | Description | URL Parameters | Body | Auth Required |
|
||||||
|--------|---------------------|------------------------|--------------- |----------------------------|---------------|
|
|--------|---------------------|------------------------|--------------- |----------------------------|---------------|
|
||||||
| ANY | /token | Prints a new JWT Token | - | - | - |
|
| ANY | /token | Prints a new JWT Token | - | - | - |
|
||||||
| GET | /category | Lists a set of Categories | offset, limit, order | - | - |
|
| GET | /category | Lists a set of Categories | offset, limit, order | - | Token |
|
||||||
| POST | /category | Creates a Category | - | JSON [Full Category](migration/api_category/create_category.json) | Token |
|
| POST | /category | Creates a Category | - | JSON [Full Category](migration/api_category/create_category.json) | Token |
|
||||||
| PUT | /category | Fully-Updates a Category | - | JSON [Full Category](migration/api_category/update_category.json) | Token |
|
| PUT | /category | Fully-Updates a Category | - | JSON [Full Category](migration/api_category/update_category.json) | Token |
|
||||||
| PATCH | /category/{id} | Partially-Updates a Category | - | JSON [Partial Category](migration/api_category/update_partial_category.json) | Token |
|
| PATCH | /category/{id} | Partially-Updates a Category | - | JSON [Partial Category](migration/api_category/update_partial_category.json) | Token |
|
||||||
| GET | /category/{id} | Prints a Category | - | - | - |
|
| GET | /category/{id} | Prints a Category | - | - | Token |
|
||||||
| DELETE | /category/{id} | Deletes a Category | - | - | Token |
|
| DELETE | /category/{id} | Deletes a Category | - | - | Token |
|
||||||
| GET | /category/{id}/products | Lists all Products from a Category | offset, limit, order | - | - |
|
| GET | /category/{id}/products | Lists all Products from a Category | offset, limit, order | - | Token |
|
||||||
| POST | /category/{id}/products | (Batch) Assigns one or more Products to a Category | - | JSON [Products](migration/api_category/insert_products_category.json) | Token |
|
| POST | /category/{id}/products | (Batch) Assigns one or more Products to a Category | - | JSON [Products](migration/api_category/insert_products_category.json) | Token |
|
||||||
| GET | /product | Lists a set of Products (cache) | offset, limit, order | - | - |
|
| GET | /product | Lists a set of Products (cache) | offset, limit, order | - | Token |
|
||||||
| POST | /product | Creates a Product | - | JSON [Full Product](migration/api_product/create_product.json) | Token |
|
| POST | /product | Creates a Product | - | JSON [Full Product](migration/api_product/create_product.json) | Token |
|
||||||
| PUT | /product | Fully-Updates a Product | - | JSON [Full Product](migration/api_product/update_product.json) | Token |
|
| PUT | /product | Fully-Updates a Product | - | JSON [Full Product](migration/api_product/update_product.json) | Token |
|
||||||
| PATCH | /product/{id} | Partially-Updates a Product | - | JSON [Partial Product](migration/api_product/update_partial_product.json) | Token |
|
| PATCH | /product/{id} | Partially-Updates a Product | - | JSON [Partial Product](migration/api_product/update_partial_product.json) | Token |
|
||||||
| GET | /product/{id} | Prints a Product (cache) | - | - | - |
|
| GET | /product/{id} | Prints a Product (cache) | - | - | Token |
|
||||||
| DELETE | /product/{id} | Deletes a Product | - | - | Token |
|
| DELETE | /product/{id} | Deletes a Product | - | - | Token |
|
||||||
|
|
||||||
|
|
||||||
|
@ -71,7 +71,7 @@ Download the folder.
|
||||||
Install [Docker](https://www.docker.com/) and execute the command below
|
Install [Docker](https://www.docker.com/) and execute the command below
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
$ docker-compose up
|
$ docker-compose up --build
|
||||||
```
|
```
|
||||||
|
|
||||||
### Install (Manually)
|
### Install (Manually)
|
||||||
|
|
|
@ -168,6 +168,11 @@ func (h *CategoryHandler) Delete(ctx iris.Context) {
|
||||||
|
|
||||||
affected, err := h.service.DeleteByID(ctx.Request().Context(), id)
|
affected, err := h.service.DeleteByID(ctx.Request().Context(), id)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
if err == sql.ErrNoRows {
|
||||||
|
writeEntityNotFound(ctx)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
debugf("CategoryHandler.Delete(DB): %v", err)
|
debugf("CategoryHandler.Delete(DB): %v", err)
|
||||||
writeInternalServerError(ctx)
|
writeInternalServerError(ctx)
|
||||||
return
|
return
|
||||||
|
@ -201,7 +206,7 @@ func (h *CategoryHandler) ListProducts(ctx iris.Context) {
|
||||||
|
|
||||||
var products entity.Products
|
var products entity.Products
|
||||||
err := h.service.List(ctx.Request().Context(), &products, opts)
|
err := h.service.List(ctx.Request().Context(), &products, opts)
|
||||||
if err != nil {
|
if err != nil && err != sql.ErrNoRows {
|
||||||
debugf("CategoryHandler.ListProducts(DB) (table=%s where=%s=%v limit=%d offset=%d): %v",
|
debugf("CategoryHandler.ListProducts(DB) (table=%s where=%s=%v limit=%d offset=%d): %v",
|
||||||
opts.Table, opts.WhereColumn, opts.WhereValue, opts.Limit, opts.Offset, err)
|
opts.Table, opts.WhereColumn, opts.WhereValue, opts.Limit, opts.Offset, err)
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,6 @@ go 1.15
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/go-sql-driver/mysql v1.5.0
|
github.com/go-sql-driver/mysql v1.5.0
|
||||||
github.com/kataras/iris/v12 v12.2.0-alpha.0.20201117050536-962ffd67721a
|
github.com/kataras/iris/v12 master
|
||||||
github.com/mailgun/groupcache/v2 v2.1.0
|
github.com/mailgun/groupcache/v2 v2.1.0
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package main
|
package main // Look README.md
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
@ -11,8 +11,6 @@ import (
|
||||||
"github.com/kataras/iris/v12"
|
"github.com/kataras/iris/v12"
|
||||||
)
|
)
|
||||||
|
|
||||||
// $ go build .
|
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
dsn := fmt.Sprintf("%s:%s@tcp(%s:3306)/%s?parseTime=true&charset=utf8mb4&collation=utf8mb4_unicode_ci",
|
dsn := fmt.Sprintf("%s:%s@tcp(%s:3306)/%s?parseTime=true&charset=utf8mb4&collation=utf8mb4_unicode_ci",
|
||||||
getenv("MYSQL_USER", "user_myapp"),
|
getenv("MYSQL_USER", "user_myapp"),
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"info": {
|
"info": {
|
||||||
"_postman_id": "d3a2fdf6-9ebd-4e85-827d-385592a71fd6",
|
"_postman_id": "7b8b53f8-859a-425a-aa9c-28bc2a2d5ef7",
|
||||||
"name": "myapp (api-test)",
|
"name": "myapp (api-test)",
|
||||||
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
|
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
|
||||||
},
|
},
|
||||||
|
@ -15,8 +15,9 @@
|
||||||
"header": [
|
"header": [
|
||||||
{
|
{
|
||||||
"key": "Authorization",
|
"key": "Authorization",
|
||||||
"value": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1ODk2MzkzNjd9.cYohwgUpe-Z7ac0LPpz4Adi5QXJmtwD1ZRpXrMUMPN0",
|
"value": "Bearer {{token}}",
|
||||||
"type": "text"
|
"type": "text",
|
||||||
|
"disabled": true
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"body": {
|
"body": {
|
||||||
|
@ -47,7 +48,14 @@
|
||||||
"name": "Get By ID",
|
"name": "Get By ID",
|
||||||
"request": {
|
"request": {
|
||||||
"method": "GET",
|
"method": "GET",
|
||||||
"header": [],
|
"header": [
|
||||||
|
{
|
||||||
|
"key": "Authorization",
|
||||||
|
"value": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL2lyaXMtZ28uY29tIiwiYXVkIjpbIjljOTY5ZDg5LTBkZGYtNDlkMC1hYzcxLTI3MmU3YmY5NjkwMCJdLCJpYXQiOjE2MDYyNzE1NDYsImV4cCI6MTYwNjI3MjQ0Nn0.l2_5iqfEaC68UySTQNoDx2sfzn031tHiTdm2kZoNkWQ",
|
||||||
|
"type": "text",
|
||||||
|
"disabled": true
|
||||||
|
}
|
||||||
|
],
|
||||||
"url": {
|
"url": {
|
||||||
"raw": "http://localhost:8080/category/1",
|
"raw": "http://localhost:8080/category/1",
|
||||||
"protocol": "http",
|
"protocol": "http",
|
||||||
|
@ -71,7 +79,14 @@
|
||||||
},
|
},
|
||||||
"request": {
|
"request": {
|
||||||
"method": "GET",
|
"method": "GET",
|
||||||
"header": [],
|
"header": [
|
||||||
|
{
|
||||||
|
"key": "Authorization",
|
||||||
|
"value": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL2lyaXMtZ28uY29tIiwiYXVkIjpbIjljOTY5ZDg5LTBkZGYtNDlkMC1hYzcxLTI3MmU3YmY5NjkwMCJdLCJpYXQiOjE2MDYyNzE1NDYsImV4cCI6MTYwNjI3MjQ0Nn0.l2_5iqfEaC68UySTQNoDx2sfzn031tHiTdm2kZoNkWQ",
|
||||||
|
"type": "text",
|
||||||
|
"disabled": true
|
||||||
|
}
|
||||||
|
],
|
||||||
"body": {
|
"body": {
|
||||||
"mode": "raw",
|
"mode": "raw",
|
||||||
"raw": ""
|
"raw": ""
|
||||||
|
@ -113,7 +128,8 @@
|
||||||
{
|
{
|
||||||
"key": "Authorization",
|
"key": "Authorization",
|
||||||
"value": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1ODk1ODU1NjN9.PtfDS1niGoZ7pV6kplI-_q1fVKLnknQ3IwcrLZhoVCU",
|
"value": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1ODk1ODU1NjN9.PtfDS1niGoZ7pV6kplI-_q1fVKLnknQ3IwcrLZhoVCU",
|
||||||
"type": "text"
|
"type": "text",
|
||||||
|
"disabled": true
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"body": {
|
"body": {
|
||||||
|
@ -150,7 +166,8 @@
|
||||||
{
|
{
|
||||||
"key": "Authorization",
|
"key": "Authorization",
|
||||||
"value": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1ODk1ODU1NjN9.PtfDS1niGoZ7pV6kplI-_q1fVKLnknQ3IwcrLZhoVCU",
|
"value": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1ODk1ODU1NjN9.PtfDS1niGoZ7pV6kplI-_q1fVKLnknQ3IwcrLZhoVCU",
|
||||||
"type": "text"
|
"type": "text",
|
||||||
|
"disabled": true
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"url": {
|
"url": {
|
||||||
|
@ -177,7 +194,8 @@
|
||||||
{
|
{
|
||||||
"key": "Authorization",
|
"key": "Authorization",
|
||||||
"value": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1ODk1ODU1NjN9.PtfDS1niGoZ7pV6kplI-_q1fVKLnknQ3IwcrLZhoVCU",
|
"value": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1ODk1ODU1NjN9.PtfDS1niGoZ7pV6kplI-_q1fVKLnknQ3IwcrLZhoVCU",
|
||||||
"type": "text"
|
"type": "text",
|
||||||
|
"disabled": true
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"body": {
|
"body": {
|
||||||
|
@ -185,7 +203,7 @@
|
||||||
"raw": "{\r\n \"title\": \"computers-technology\"\r\n}"
|
"raw": "{\r\n \"title\": \"computers-technology\"\r\n}"
|
||||||
},
|
},
|
||||||
"url": {
|
"url": {
|
||||||
"raw": "http://localhost:8080/category/1",
|
"raw": "http://localhost:8080/category/3",
|
||||||
"protocol": "http",
|
"protocol": "http",
|
||||||
"host": [
|
"host": [
|
||||||
"localhost"
|
"localhost"
|
||||||
|
@ -204,7 +222,14 @@
|
||||||
"name": "List Products",
|
"name": "List Products",
|
||||||
"request": {
|
"request": {
|
||||||
"method": "GET",
|
"method": "GET",
|
||||||
"header": [],
|
"header": [
|
||||||
|
{
|
||||||
|
"key": "Authorization",
|
||||||
|
"value": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL2lyaXMtZ28uY29tIiwiYXVkIjpbIjljOTY5ZDg5LTBkZGYtNDlkMC1hYzcxLTI3MmU3YmY5NjkwMCJdLCJpYXQiOjE2MDYyNzE1NDYsImV4cCI6MTYwNjI3MjQ0Nn0.l2_5iqfEaC68UySTQNoDx2sfzn031tHiTdm2kZoNkWQ",
|
||||||
|
"type": "text",
|
||||||
|
"disabled": true
|
||||||
|
}
|
||||||
|
],
|
||||||
"url": {
|
"url": {
|
||||||
"raw": "http://localhost:8080/category/1/products?offset=0&limit=30&by=price&order=asc",
|
"raw": "http://localhost:8080/category/1/products?offset=0&limit=30&by=price&order=asc",
|
||||||
"protocol": "http",
|
"protocol": "http",
|
||||||
|
@ -214,7 +239,7 @@
|
||||||
"port": "8080",
|
"port": "8080",
|
||||||
"path": [
|
"path": [
|
||||||
"category",
|
"category",
|
||||||
"3",
|
"1",
|
||||||
"products"
|
"products"
|
||||||
],
|
],
|
||||||
"query": [
|
"query": [
|
||||||
|
@ -248,7 +273,8 @@
|
||||||
{
|
{
|
||||||
"key": "Authorization",
|
"key": "Authorization",
|
||||||
"value": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1ODk1ODU1NjN9.PtfDS1niGoZ7pV6kplI-_q1fVKLnknQ3IwcrLZhoVCU",
|
"value": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1ODk1ODU1NjN9.PtfDS1niGoZ7pV6kplI-_q1fVKLnknQ3IwcrLZhoVCU",
|
||||||
"type": "text"
|
"type": "text",
|
||||||
|
"disabled": true
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"body": {
|
"body": {
|
||||||
|
@ -256,7 +282,7 @@
|
||||||
"raw": "[{\r\n \"title\": \"product-1\",\r\n \"image_url\": \"https://images.product1.png\",\r\n \"price\": 42.42,\r\n \"description\": \"a description for product-1\"\r\n}, {\r\n \"title\": \"product-2\",\r\n \"image_url\": \"https://images.product2.png\",\r\n \"price\": 32.1,\r\n \"description\": \"a description for product-2\"\r\n}, {\r\n \"title\": \"product-3\",\r\n \"image_url\": \"https://images.product3.png\",\r\n \"price\": 52321321.32,\r\n \"description\": \"a description for product-3\"\r\n}, {\r\n \"title\": \"product-4\",\r\n \"image_url\": \"https://images.product4.png\",\r\n \"price\": 77.4221,\r\n \"description\": \"a description for product-4\"\r\n}, {\r\n \"title\": \"product-5\",\r\n \"image_url\": \"https://images.product5.png\",\r\n \"price\": 55.1,\r\n \"description\": \"a description for product-5\"\r\n}, {\r\n \"title\": \"product-6\",\r\n \"image_url\": \"https://images.product6.png\",\r\n \"price\": 53.32,\r\n \"description\": \"a description for product-6\"\r\n}]"
|
"raw": "[{\r\n \"title\": \"product-1\",\r\n \"image_url\": \"https://images.product1.png\",\r\n \"price\": 42.42,\r\n \"description\": \"a description for product-1\"\r\n}, {\r\n \"title\": \"product-2\",\r\n \"image_url\": \"https://images.product2.png\",\r\n \"price\": 32.1,\r\n \"description\": \"a description for product-2\"\r\n}, {\r\n \"title\": \"product-3\",\r\n \"image_url\": \"https://images.product3.png\",\r\n \"price\": 52321321.32,\r\n \"description\": \"a description for product-3\"\r\n}, {\r\n \"title\": \"product-4\",\r\n \"image_url\": \"https://images.product4.png\",\r\n \"price\": 77.4221,\r\n \"description\": \"a description for product-4\"\r\n}, {\r\n \"title\": \"product-5\",\r\n \"image_url\": \"https://images.product5.png\",\r\n \"price\": 55.1,\r\n \"description\": \"a description for product-5\"\r\n}, {\r\n \"title\": \"product-6\",\r\n \"image_url\": \"https://images.product6.png\",\r\n \"price\": 53.32,\r\n \"description\": \"a description for product-6\"\r\n}]"
|
||||||
},
|
},
|
||||||
"url": {
|
"url": {
|
||||||
"raw": "http://localhost:8080/category/1/products",
|
"raw": "http://localhost:8080/category/3/products",
|
||||||
"protocol": "http",
|
"protocol": "http",
|
||||||
"host": [
|
"host": [
|
||||||
"localhost"
|
"localhost"
|
||||||
|
@ -282,7 +308,14 @@
|
||||||
"name": "List",
|
"name": "List",
|
||||||
"request": {
|
"request": {
|
||||||
"method": "GET",
|
"method": "GET",
|
||||||
"header": [],
|
"header": [
|
||||||
|
{
|
||||||
|
"key": "Authorization",
|
||||||
|
"value": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL2lyaXMtZ28uY29tIiwiYXVkIjpbIjljOTY5ZDg5LTBkZGYtNDlkMC1hYzcxLTI3MmU3YmY5NjkwMCJdLCJpYXQiOjE2MDYyNzE1NDYsImV4cCI6MTYwNjI3MjQ0Nn0.l2_5iqfEaC68UySTQNoDx2sfzn031tHiTdm2kZoNkWQ",
|
||||||
|
"type": "text",
|
||||||
|
"disabled": true
|
||||||
|
}
|
||||||
|
],
|
||||||
"url": {
|
"url": {
|
||||||
"raw": "http://localhost:8080/product?offset=0&limit=30&by=price&order=asc",
|
"raw": "http://localhost:8080/product?offset=0&limit=30&by=price&order=asc",
|
||||||
"protocol": "http",
|
"protocol": "http",
|
||||||
|
@ -320,7 +353,14 @@
|
||||||
"name": "Get By ID",
|
"name": "Get By ID",
|
||||||
"request": {
|
"request": {
|
||||||
"method": "GET",
|
"method": "GET",
|
||||||
"header": [],
|
"header": [
|
||||||
|
{
|
||||||
|
"key": "Authorization",
|
||||||
|
"value": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL2lyaXMtZ28uY29tIiwiYXVkIjpbIjljOTY5ZDg5LTBkZGYtNDlkMC1hYzcxLTI3MmU3YmY5NjkwMCJdLCJpYXQiOjE2MDYyNzE1NDYsImV4cCI6MTYwNjI3MjQ0Nn0.l2_5iqfEaC68UySTQNoDx2sfzn031tHiTdm2kZoNkWQ",
|
||||||
|
"type": "text",
|
||||||
|
"disabled": true
|
||||||
|
}
|
||||||
|
],
|
||||||
"url": {
|
"url": {
|
||||||
"raw": "http://localhost:8080/product/1",
|
"raw": "http://localhost:8080/product/1",
|
||||||
"protocol": "http",
|
"protocol": "http",
|
||||||
|
@ -345,7 +385,8 @@
|
||||||
{
|
{
|
||||||
"key": "Authorization",
|
"key": "Authorization",
|
||||||
"value": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1ODk1ODU1NjN9.PtfDS1niGoZ7pV6kplI-_q1fVKLnknQ3IwcrLZhoVCU",
|
"value": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1ODk1ODU1NjN9.PtfDS1niGoZ7pV6kplI-_q1fVKLnknQ3IwcrLZhoVCU",
|
||||||
"type": "text"
|
"type": "text",
|
||||||
|
"disabled": true
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"url": {
|
"url": {
|
||||||
|
@ -372,7 +413,8 @@
|
||||||
{
|
{
|
||||||
"key": "Authorization",
|
"key": "Authorization",
|
||||||
"value": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1ODk1ODU1NjN9.PtfDS1niGoZ7pV6kplI-_q1fVKLnknQ3IwcrLZhoVCU",
|
"value": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1ODk1ODU1NjN9.PtfDS1niGoZ7pV6kplI-_q1fVKLnknQ3IwcrLZhoVCU",
|
||||||
"type": "text"
|
"type": "text",
|
||||||
|
"disabled": true
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"body": {
|
"body": {
|
||||||
|
@ -402,7 +444,8 @@
|
||||||
{
|
{
|
||||||
"key": "Authorization",
|
"key": "Authorization",
|
||||||
"value": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1ODk1ODU1NjN9.PtfDS1niGoZ7pV6kplI-_q1fVKLnknQ3IwcrLZhoVCU",
|
"value": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1ODk1ODU1NjN9.PtfDS1niGoZ7pV6kplI-_q1fVKLnknQ3IwcrLZhoVCU",
|
||||||
"type": "text"
|
"type": "text",
|
||||||
|
"disabled": true
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"body": {
|
"body": {
|
||||||
|
@ -432,7 +475,8 @@
|
||||||
{
|
{
|
||||||
"key": "Authorization",
|
"key": "Authorization",
|
||||||
"value": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1ODk1ODU1NjN9.PtfDS1niGoZ7pV6kplI-_q1fVKLnknQ3IwcrLZhoVCU",
|
"value": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1ODk1ODU1NjN9.PtfDS1niGoZ7pV6kplI-_q1fVKLnknQ3IwcrLZhoVCU",
|
||||||
"type": "text"
|
"type": "text",
|
||||||
|
"disabled": true
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"body": {
|
"body": {
|
||||||
|
@ -480,5 +524,44 @@
|
||||||
"response": []
|
"response": []
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"auth": {
|
||||||
|
"type": "bearer",
|
||||||
|
"bearer": [
|
||||||
|
{
|
||||||
|
"key": "token",
|
||||||
|
"value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL2lyaXMtZ28uY29tIiwiYXVkIjpbIjljOTY5ZDg5LTBkZGYtNDlkMC1hYzcxLTI3MmU3YmY5NjkwMCJdLCJpYXQiOjE2MDYyNzE1NDYsImV4cCI6MTYwNjI3MjQ0Nn0.l2_5iqfEaC68UySTQNoDx2sfzn031tHiTdm2kZoNkWQ",
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"event": [
|
||||||
|
{
|
||||||
|
"listen": "prerequest",
|
||||||
|
"script": {
|
||||||
|
"id": "f27c3c2d-efdc-4922-b70c-258784a1d59b",
|
||||||
|
"type": "text/javascript",
|
||||||
|
"exec": [
|
||||||
|
""
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"listen": "test",
|
||||||
|
"script": {
|
||||||
|
"id": "44d94797-9cc6-4ecd-adc5-7ad5329d79c4",
|
||||||
|
"type": "text/javascript",
|
||||||
|
"exec": [
|
||||||
|
""
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"variable": [
|
||||||
|
{
|
||||||
|
"id": "38156b9f-e623-4974-a315-51c931670f23",
|
||||||
|
"key": "token",
|
||||||
|
"value": "token"
|
||||||
|
}
|
||||||
|
],
|
||||||
"protocolProfileBehavior": {}
|
"protocolProfileBehavior": {}
|
||||||
}
|
}
|
10
go.mod
10
go.mod
|
@ -12,7 +12,7 @@ require (
|
||||||
github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385
|
github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385
|
||||||
github.com/fatih/structs v1.1.0
|
github.com/fatih/structs v1.1.0
|
||||||
github.com/flosch/pongo2/v4 v4.0.0
|
github.com/flosch/pongo2/v4 v4.0.0
|
||||||
github.com/go-redis/redis/v8 v8.3.3
|
github.com/go-redis/redis/v8 v8.4.0
|
||||||
github.com/google/uuid v1.1.2
|
github.com/google/uuid v1.1.2
|
||||||
github.com/hashicorp/go-version v1.2.1
|
github.com/hashicorp/go-version v1.2.1
|
||||||
github.com/iris-contrib/httpexpect/v2 v2.0.5
|
github.com/iris-contrib/httpexpect/v2 v2.0.5
|
||||||
|
@ -32,12 +32,12 @@ require (
|
||||||
github.com/russross/blackfriday/v2 v2.1.0
|
github.com/russross/blackfriday/v2 v2.1.0
|
||||||
github.com/schollz/closestmatch v2.1.0+incompatible
|
github.com/schollz/closestmatch v2.1.0+incompatible
|
||||||
github.com/tdewolff/minify/v2 v2.9.10
|
github.com/tdewolff/minify/v2 v2.9.10
|
||||||
github.com/vmihailenco/msgpack/v5 v5.0.0-rc.3
|
github.com/vmihailenco/msgpack/v5 v5.0.0
|
||||||
github.com/yosssi/ace v0.0.5
|
github.com/yosssi/ace v0.0.5
|
||||||
go.etcd.io/bbolt v1.3.5
|
go.etcd.io/bbolt v1.3.5
|
||||||
golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897
|
golang.org/x/crypto v0.0.0-20201124201722-c8d3bf9c5392
|
||||||
golang.org/x/net v0.0.0-20201027133719-8eef5233e2a1
|
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b
|
||||||
golang.org/x/sys v0.0.0-20201028094953-708e7fb298ac
|
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68
|
||||||
golang.org/x/text v0.3.4
|
golang.org/x/text v0.3.4
|
||||||
golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e
|
golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e
|
||||||
google.golang.org/protobuf v1.25.0
|
google.golang.org/protobuf v1.25.0
|
||||||
|
|
Loading…
Reference in New Issue
Block a user