summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-09-07Release gorankusu v0.7.0 (2024-09-07)v0.7.0Shulhan
=== Breaking changes * all: refactoring form input for multipart form-data This changes replace handling type for storing multipart form-data from "map[string][]byte" to [*multipart.Form] based on changes on module "pakakeh.go". === Enhancements * all: make HTTP Target Params works along with WithRawBody Previously, if WithRawBody is true, the Params will not be rendered and parsed during Run. This changes makes the Params works along with WithRawBody. If Params are set it will be rendered along with text area for raw body. * _www: support HTTP target with content type "text/html" In the Target form, user can select to send body as "text/html". * all: add git.sr.ht APIs into example The APIs is created using https://man.sr.ht/git.sr.ht/api.md as reference. We also needs the API to create webhook since no other way to create it in current sourcehut web. === Bug fixes * _www: fix save on null Headers and Vars If the user does not define the Headers, clicking Run on any HTTP Target will result in error when "save" function executed before it. * _www: fix form input type file where content is binary If the file in FormInput is binary, the conversion to "FormInput.value" will fail with an error like "invalid characters in String". * all: use [route.Path] to generate parameters Using [route.String] does not works if the parameter can be empty, while [route.Path] replace all keys and return the path as is. === Chores * all: add task to initialize the repository and tools The task "init" include initializing git submodule, installing third party tools for linters, and installing node packages.
2024-09-07all: replace licensing format to REUSE.tomlShulhan
Using ".reuse/dep5" has been deprecated since REUSE v3.2. While at it, add missing license to some files in testdata.
2024-09-07go.mod: update all dependenciesShulhan
2024-09-04make: add task "build"Shulhan
This is so we can build again if its failed, after lint and test has passed.
2024-09-04all: update submodule remote URL for "wui"Shulhan
The wui repository has been renamed to pakakeh.ts.
2024-09-04go.mod: update all dependenciesShulhan
2024-06-08all: add git.sr.ht APIs into exampleShulhan
The APIs is created using https://man.sr.ht/git.sr.ht/api.md as reference. We also needs the API to create webhook since no other way to create it in current sourcehut web.
2024-06-08_www: support HTTP target with content type "text/html"Shulhan
2024-06-08all: use [route.Path] to generate parametersShulhan
Using [route.String] does not works if the parameter can be empty, while [route.Path] replace all keys and return the path as is.
2024-06-08all: make HTTP Target Params works along with WithRawBodyShulhan
Previously, if WithRawBody is true, the Params will not be rendered and parsed during Run. This changes makes them Params works along with WithRawBody. If Params are set it will be rendered along with text area for raw body.
2024-06-08go.mod: update all dependenciesShulhan
2024-04-24all: refactoring form input for multipart form-dataShulhan
This changes replace handling type for storing multipart form-data from "map[string][]byte" to [*multipart.Form] based on changes on module "pakakeh.go".
2024-04-24_www: fix form input type file where content is binaryShulhan
If the file in FormInput is binary, the conversion to "FormInput.value" will fail with an error like "invalid characters in String".
2024-04-23all: add task to initialize the repository and toolsShulhan
The task "init" include initializing git submodule, installing third party tools for linters, and installing node packages.
2024-04-23internal/cmd/gorankusu: convert documentation to HTML on "build"Shulhan
2024-04-23_www: fix save on null Headers and VarsShulhan
If the user does not define the Headers, clicking Run ony any HTTP Target will result in error when "save" function executed before it.
2024-04-06Release gorankusu v0.6.1 (2024-04-06)v0.6.1Shulhan
This release replace "share" module with "pakakeh.go". The "share" module repository has been moved to SourceHut with new name "pakakeh.go". For more information about the changes see pakakeh.go project at https://sr.ht/~shulhan/pakakeh.go.
2024-03-15all: update module pakakeh.go to the tipShulhan
On the "lib/http" we refactoring RequestMethod and RequestType type from int to string for readability, when the value is encoded, for example to JSON. So instead of 0, 1 or 2; it will print "GET", "CONNECT", or "HEAD".
2024-03-15all: update module pakakeh.go to the tipShulhan
2024-03-05all: replace module "share" with "pakakeh.go"Shulhan
2024-03-05Release gorankusu v0.6.0 (2024-03-05)v0.6.0Shulhan
=== Breaking changes * target: changes Opts to non-pointer Previously, we use pointer to indicated that the Target can be attacked or not. Since HTTPTarget now have AllowAttack, this options can be changes to non-pointer. * all: change the signature of default request/response dumper Instead of function that use the signature of HTTPRequestDumper/ HTTPResponseDumper; change it to function that return HTTPRequestDumper/ HTTPResponseDumper. In this way, the documentation can show the clear relation between function and its type. === New features * all: add global HTTP headers for Target The Headers field on Target define the global headers that will be send along with all HTTPTarget or WebSocketTarget. The same header can also be defined on HTTPTarget that override the value of Target. * all: add default HTTPRunHandler Previously, the default HTTPRunHandler is hidden, called dynamically based on Run is nil or not. This changes make it exported as function that return HTTPRunHandler to show how define and create a custom HTTPRunHandler. * all: add default HTTPParamsConverter for [HTTPTarget.ParamsConverter] The DefaultParamsConverter define default function to convert [HTTPTarget.Params] to its equivalent parameters in HTTP, either as query in URL or as bytes in body. This changes introduce breaking changes in HTTPTarget where field ConvertParams renamed to ParamsConverter. * all: set default HTTPTarget Attack if its not set Previously, the function for Attack need to be coded manually. This changes introduce new function DefaultHTTPAttack that generate HTTPAttackHandler based on the HTTPTarget method, request type, and Params; if AllowAttack is true and Attack is nil. === Bug fixes * all: fix null navigation links If the navLinks fields is empty, the HTTP API will return "null" and cause the rendering error. This changes fix this issue by allocating the slice navLinks with one capabilities to make JSON always return "[]" if its empty.
2024-02-21all: move reading GORANKUSU_DEV environment to [Environment.IsDevelopment]Shulhan
2024-02-21all: move constants declaration closer to its usageShulhan
2024-02-21all: add parameter to use custom listen address in NewExampleShulhan
This will allow running Example server with "make dev" and the test with "make" or "make test" at the same time.
2024-02-21all: add global HTTP headers for TargetShulhan
The Headers field on Target define the global headers that will be send along with all HTTPTarget or WebSocketTarget. The same header can also be defined on HTTPTarget that override the value of Target.
2024-02-19all: fix null navigation linksShulhan
If the navLinks fields is empty, the HTTP API will return "null" and make the rendering error. This changes fix this issue by allocating the slice navLinks with one capabilities to make JSON always return "[]" if its empty.
2024-02-19all: remove Run in ExampleShulhan
The Run handler is handled automatically.
2024-02-18example: add POST header that can return custom HTTP response codeShulhan
In some cases we found that if the HTTP response code is 202 the JSON response body is not indented. Turns out this is caused by HTTP Content-Type in response is "text/plain". Closes: https://todo.sr.ht/~shulhan/gorankusu/6
2024-02-16all: add default HTTPRunHandlerShulhan
Previously, the default HTTPRunHandler is hidden, called dynamically based on Run is nil or not. This changes make it exported as function that return HTTPRunHandler to show how define and create a custom HTTPRunHandler.
2024-02-16target: changes Opts to non-pointerShulhan
Previously, we use pointer to indicated that the Target can be attacked or not. Since HTTPTarget now have AllowAttack, this options can be changes to non-pointer.
2024-02-16all: add default HTTPParamsConverter for [HTTPTarget.ParamsConverter]Shulhan
The DefaultParamsConverter define default function to convert [HTTPTarget.Params] to its equivalent parameters in HTTP, either as query in URL or as bytes in body. This changes introduce breaking changes in HTTPTarget where field ConvertParams renamed to ParamsConverter.
2024-02-16all: change the signature of default request/response dumperShulhan
Instead of function that use the signature of HTTPRequestDumper/ HTTPResponseDumper; change it to function that _return_ HTTPRequestDumper/ HTTPResponseDumper. In this way, the documentation can show the clear relation between function and its type.
2024-02-16example: check for error and set default attack duration to 10 secondsShulhan
2024-02-16all: set default HTTPTarget Attack if its not setShulhan
Previously, the function for Attack need to be coded manually. This changes introduce new function DefaultHTTPAttack that generate HTTPAttackHandler based on the HTTPTarget method, request type, and Params; if AllowAttack is true and Attack is nil. Implements: https://todo.sr.ht/~shulhan/gorankusu/4
2024-02-15all: move example to root directoryShulhan
The goal is to remove duplicate code in testing and show the example on how to create Gorankusu service from godoc. Implements: https://todo.sr.ht/~shulhan/gorankusu/5
2024-02-08Release gorankusu v0.5.0v0.5.0Shulhan
This release rename the project from "trunks" to "gorankusu". The original idea of "trunks" is because the core library that we use for load testing is named vegeta (from Dragon Ball), and Vegeta has a son named Trunks. In English, trunks also have multiple meanings. In order to have a unique name, we rename the project to "gorankusu", which is a combination of "go" (the main programming language that built the application) and "torankusu" the Hepburn of "Trunks". === New features * all: allow submit free form request body in HTTPTarget * all: implement form input file * all: add type to customize how to dump HTTP request and response * all: support parameter binding in HTTP Path === Enhancements * _www: check HTTP response status greater or equal 400
2024-02-08all: rename left over constant EnvDelopment that still have "trunks"Shulhan
2024-02-08all: allow submit free form request body in HTTPTargetShulhan
In HTTPTarget the field RawBody can be filled by anything by user. Those field can be activated by setting WithRawBody. Implements: https://todo.sr.ht/~shulhan/gorankusu/3
2024-02-07all: rename the project to gorankusuShulhan
The original idea of "trunks" is because the core library that we use for load testing is named "vegeta" (from Dragon Ball) [1][2], and Vegeta has a son named Trunks. In English, trunks also have multiple meanings. In order to have a unique name, we rename the project to "gorankusu", which is a combination of "go" (the main programming language that built the application) and "torankusu" the Hepburn of "Trunks". [1]: https://github.com/tsenart/vegeta/ [2]: https://en.wikipedia.org/wiki/Vegeta Implements: https://todo.sr.ht/~shulhan/gorankusu/2
2024-02-05all: implement form input fileShulhan
The FormInput now can be set to FormInputKindFile that will rendered as "<input type='file' ...>" on the web user interface. Once submitted, the file name, type, size, and lastModification will be stored under FormInput Filename, Filetype, Filesize, and Filemodms. Implements: https://todo.sr.ht/~shulhan/trunks/1
2024-02-05_www/wui: update to tipShulhan
2024-02-05all: add type to customize how to dump HTTP request and responseShulhan
The HTTPRequestDumper define an handler to convert [http.Request] into [RunResponse] DumpRequest. The HTTPResponseDumper define an handler to convert [http.Response] into [RunResponse] DumpResponse.
2024-02-04http_server: group HTTP paths API into constantsShulhan
2024-02-04example: split registering HTTP and WebSocket target into separate methodsShulhan
2024-02-04go.mod: update all dependenciesShulhan
2024-02-04make: generate test coverageShulhan
2024-01-25internal/cmd/trunks: fix command to run TypeScript compilerShulhan
The correct options to run tsc on specific directory is "--project" not "-b".
2024-01-25_www: check HTTP response status greater or equal 400Shulhan
Any HTTP status code below 400 are still processable and not an error.
2024-01-25all: fix warnings recommended by linter reviveShulhan
Most of the fixes related to naming variables with acronyms, for example HTTP, JSON, URL, and so on.
2024-01-25all: support parameter binding in HTTP PathShulhan
If HTTP Path contains key, for example "/:book", and the Params contains the same key, the Path will be filled with value from Params. The same key in Params will be deleted and not send on query parameter or body.