diff options
| author | Shulhan <ms@kilabit.info> | 2021-03-24 01:56:39 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2021-03-24 02:00:47 +0700 |
| commit | 7035a7fb42b9054657f5a99bb479fd4722d8ae7c (patch) | |
| tree | 44c5e4d328722a8877082f8b47ca0850dc55702e /errors.go | |
| parent | 896e55e6406b0837041c0aad75035f5839083e25 (diff) | |
| download | gorankusu-7035a7fb42b9054657f5a99bb479fd4722d8ae7c.tar.xz | |
all: implement target for WebSocket
One can register WebSocketTarget just like HttpTarget, its have ID,
Name, Headers, and Params.
Unlike HTTP, the WebSocket target only able to execute Run, it does not
have "Attack", yet.
Diffstat (limited to 'errors.go')
| -rw-r--r-- | errors.go | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -79,3 +79,14 @@ func errInvalidHttpTarget(id string) error { } return res } + +func errInvalidWebSocketTarget(id string) error { + res := &libhttp.EndpointResponse{ + E: liberrors.E{ + Code: http.StatusBadRequest, + Message: fmt.Sprintf("invalid or emtpy WebSocketTarget.ID: %q", id), + Name: "ERR_INVALID_WEBSOCKET_TARGET", + }, + } + return res +} |
