1
0
mirror of https://github.com/labstack/echo.git synced 2024-12-24 20:14:31 +02:00
High performance, minimalist Go web framework https://echo.labstack.com/
Go to file
Vishal Rana 7c9a0b6489 initial commit
Signed-off-by: Vishal Rana <vr@labstack.com>
2015-03-01 09:45:13 -08:00
example initial commit 2015-03-01 09:45:13 -08:00
middleware initial commit 2015-03-01 09:45:13 -08:00
bolt_test.go initial commit 2015-03-01 09:45:13 -08:00
bolt.go initial commit 2015-03-01 09:45:13 -08:00
client_test.go initial commit 2015-03-01 09:45:13 -08:00
client.go initial commit 2015-03-01 09:45:13 -08:00
context.go initial commit 2015-03-01 09:45:13 -08:00
LICENSE initial commit 2015-03-01 09:45:13 -08:00
README.md initial commit 2015-03-01 09:45:13 -08:00
response.go initial commit 2015-03-01 09:45:13 -08:00
router_test.go initial commit 2015-03-01 09:45:13 -08:00
router.go initial commit 2015-03-01 09:45:13 -08:00
socket.go initial commit 2015-03-01 09:45:13 -08:00
utils.go initial commit 2015-03-01 09:45:13 -08:00

Bolt

Multi transport, multi format REST style network library

Socket Specification

Trasport

  • WebSocket
  • TCP

Command (1-byte)

  • INIT (1)
  • AUTH (2)
  • HTTP (3)
  • PUB (4)
  • MPUB (5)
  • SUB (6)
  • USUB (7)

INIT

Request

1  # Command (1-byte)
99 # Correlation ID (4-byte)
8  # Config length (2-byte)
{} # Config as JSON (n-byte)

Config

{
	"Format": 
}

Response

99 # Correlation ID (4-byte)
200 # Status code (2-byte)

AUTH

Request

2                              # Command (1-byte)
99                             # Correlation ID (4-byte)
30                             # Token length (2-byte)
1g42*jMG!a?D3eF>Xwt!dI05]Y9egP # Token (n-byte)

Response

99  # Correlation ID (4-byte)
200 # Status code (2-byte)

HTTP

Request

3        # Command (1-byte)
99       # Correlation ID (4-byte)
GET\n    # Method (n-byte)
/users\n # Path (n-byte)
-        # Headers
64       # Body length (8-byte)
-        # Body (n-byte)

Response

3   # Command (1-byte)
200 # Status code (2-byte)

# For POST, PUT & PATCH
64  # Body length (8-byte)
-   # Body (n-byte)