chronograf/server
Tim Raymond d559acc0e0
Refactor set membership validation
The pattern of using a select with a list of options and a default that
returns an error isn't bad for a one-off validation:

select myProp {
  case "validOption1", "validOption2":
    // no-op
  default:
    panic("invalid!")
}

However, we're doing this multiple times in this method, so it makes
sense to pull this out into a new method to make it clearer what's
happening.

This adds a `oneOf` function that takes some property and a variadic
list of valid options and reports whether or not that property is among
that list.
2017-08-24 15:45:51 -04:00
..
assets.go
auth.go
auth_test.go
builders.go
builders_test.go
cells.go Refactor set membership validation 2017-08-24 15:45:51 -04:00
cells_test.go Add validation around Base and Scale 2017-08-24 15:37:19 -04:00
dashboards.go Copy missing properties from Dashboards 2017-07-31 17:24:43 -04:00
dashboards_test.go Add Label to DashboardCell Axis 2017-08-02 11:12:47 -04:00
databases.go
databases_test.go
hsts.go
influx.go Update influx Authorization Headers for write and query path 2017-07-25 12:13:46 -05:00
kapacitors.go Add kapacitor rule validation on update 2017-05-25 12:10:25 -05:00
kapacitors_test.go Remove kapacitor mock logic 2017-08-23 16:39:12 -04:00
layout.go Ensure "x", "y", and "y2" axes present 2017-08-10 13:53:07 -07:00
layout_test.go Ensure "x", "y", and "y2" axes present 2017-08-10 13:53:07 -07:00
links.go Conserve memory allocation for customLinks slice 2017-06-27 12:00:05 -07:00
links_test.go Clarify error output for missing Name or URL 2017-06-27 13:40:26 -07:00
logger.go
logout.go
mappings.go
me.go
me_test.go
mountable_router.go
mountable_router_test.go
mux.go Refactor CustomLinks transform into routes.go and new links.go 2017-06-26 15:30:33 -05:00
path.go
permissions.go
permissions_test.go
prefixing_redirector.go Fix infinite spinner with /chronograf basepath 2017-05-09 12:12:42 -07:00
prefixing_redirector_test.go Fix infinite spinner with /chronograf basepath 2017-05-09 12:12:42 -07:00
proxy.go
queries.go correct TemplateVar collection type in Queries 2017-06-14 10:52:29 -04:00
queryconfig.go
redoc.go
roles.go
roles_test.go
routes.go Pass through CustomLinks error message directly 2017-06-26 18:02:22 -05:00
routes_test.go Only test one CustomLink to avoid map key order failing test 2017-06-26 16:12:54 -05:00
server.go Add 'type' to new-sources server flag example 2017-08-11 11:54:16 -07:00
service.go Add JWT shared secret influxdb auth 2017-07-19 01:39:06 -05:00
sources.go Add JWT shared secret influxdb auth 2017-07-19 01:39:06 -05:00
sources_test.go Add JWT shared secret influxdb auth 2017-07-19 01:39:06 -05:00
swagger.go
swagger.json Update Swagger for new axes options 2017-08-24 14:50:12 -04:00
templates.go
templates_test.go Add support for :autoGroupBy: template variable 2017-06-13 14:59:56 -04:00
url_prefixer.go
url_prefixer_test.go Add test for creating NewSources via server flag 2017-07-07 12:56:12 -07:00
users.go
users_test.go
version.go