• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

hyperdriven / hyperdrive
83%
master: 86%

Build:
Build:
LAST BUILD BRANCH: v0.0.5
DEFAULT BRANCH: master
Repo Added 16 Mar 2017 02:42AM UTC
Files 10
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

LAST BUILD ON BRANCH param-tag
branch: param-tag
CHANGE BRANCH
x
Reset
  • param-tag
  • code-coverage
  • get-params
  • master
  • param-name-desc
  • v0.0.5

pending completion
116

push

travis-ci

xentek
adds `param` struct tag

Given an `Endpointer` struct like this one:

```go
type TaggedStruct struct {
	*Endpoint
	TestParam         string `param:"test_param;a=GET,PUT;r=PUT"`
	TestParamDefault  string `param:"test_param_default"`
	TestParamEmpty    string `param:""`
	TestParamRequired string `param:"test_param_required;a=GET;r=PUT"`
}
```

We apply the following parsing rules:

- `TestParam` has specified `test_param` as the `key` which will map the
incoming input from an HTTP request to the field on the endpoint. It has
also specified `GET` and `PUT` requests to allow the param. Other
requests will strip it out (when that gets implemented). It has
specified `PUT` to require the param. `PUT` requests will throw an error
if `test_param` is not present in the request (when that gets implemented).
- `TestParamDefault` has specified a `key` of `test_param_default`. It
will default to allowing the param on `GET`, `PATCH`, `POST` and `PUT`
requests, and not require it on any of those allowed requests.
- `TestParamEmpty` has not specified any directives, and will use
`TestParamEmpty` as the `key`. It will allow the param on `GET`, `PATCH`,
`POST` and `PUT` requests, which is the default, and not require it on
any of the allowed requests.
- `TestParamRequired` will allow and require `PUT` requests, even though
`PUT` was omitted from the `allowed` list.

fixes #49

263 of 315 relevant lines covered (83.49%)

142.25 hits per line

Relevant lines Covered
Build:
Build:
315 RELEVANT LINES 263 COVERED LINES
142.25 HITS PER LINE
Source Files on param-tag
  • List 0
  • Changed 6
  • Source Changed 0
  • Coverage Changed 6
Coverage ∆ File Lines Relevant Covered Missed Hits/Line

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
116 param-tag adds `param` struct tag Given an `Endpointer` struct like this one: ```go type TaggedStruct struct { *Endpoint TestParam string `param:"test_param;a=GET,PUT;r=PUT"` TestParamDefault string `param:"test_param_default"` TestParamEmpty... push 20 Mar 2017 09:09PM UTC xentek travis-ci pending completion  
115 param-tag fix typo push 20 Mar 2017 08:48PM UTC xentek travis-ci pending completion  
See All Builds (25)
  • Repo on GitHub
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc