Mark Rushakoff
d73d73c0d4
chore: rename imports from platform to influxdb
...
I did this with a dumb editor macro, so some comments changed too.
Also rename root package from platform to influxdb.
In interest of minimizing risk, anyone importing the root package has
now aliased it to "platform" so that no changes beyond imports were
necessary in those files.
Lastly, replace the old platform module to local path /dev/null so that
nobody can accidentally reintroduce a platform dependency while
migrating platform code to influxdb.
2019-01-09 20:51:47 -08:00
Andrew Watkins
3429e8d0c6
feat(auth): rewrite authorization service ( #2157 )
...
* feat(view-token-overlay): add view token overlay
* test(tokens): update tests
* chore(auths): rename mock data file
* feat(token-view): clicking on description opens token view modal
* feat(token-view): add ability to close overlay
* feat(token-view): display token permissions with updated permissions shape
* feat(token-view): wip update authorization and permission shapes
* feat(auth): wip refactor auth permissions
* fix(auth): generate permissions via functions
* fix(auth): make Id ID
* chore(types): update generated client
* feat(auth): wip add user and org names to auth
* fix(user): didnt save rebase
* feat(auth): WIP refactor auth
* feat(auth): check for user existence during auth creation
* feat(auth): org must exist during auth creation
* fix(auth): pluralize telegrafs resource type
* docs(http): update swagger definition for the Authorization
* test(auth): fix broken tests
* docs(swagger): update cur_swagger Authrorizations
* fix(api): remove trace from cur_swag
* test(ui/token): update components with new generated type definitions
* feat(http): add lookup service adding names for permissions
* fix(http): remove debugging panics
* chore: go tidy
* fix: unsaved rebase
* test(idpe): add ids to Authorizations for log tests
2018-12-28 15:02:19 -08:00
Mark Rushakoff
7ae106d14a
chore: add GoString method to platform.ID
...
While debugging, I was printing out some structs with %#v and found that
Go would format the structs' IDs as uint64s instead of with the String
method. That behavior needlessly made my debugging more difficult.
Before, %#v would format a type with an ID like:
{ID:0x2def021097c6000}
After:
{ID:"02def021097c6000"}
They look similar, but a search for the string ID would not match the
uint64 default formatting.
2018-10-31 14:41:47 -07:00
Chris Goller
e7d75b7162
perf(id): decrease allocations for id decoding
2018-10-11 09:54:19 -05:00
Chris Goller
166db0755b
chore(id): update error comments for ids
2018-10-11 09:54:19 -05:00
Chris Goller
b68a98043d
refactor(id): update name to IDLength
2018-10-11 09:54:19 -05:00
Leonardo Di Donato
6725ae6f64
feat(platform/id): method to create an invalid id
...
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2018-10-11 09:54:18 -05:00
Leonardo Di Donato
5db4276a71
fix(platform/id): improvements on code using uint64 IDs
...
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
Co-Authored-By: Lorenzo Fontana <lo@linux.com>
2018-10-11 09:54:18 -05:00
Leonardo Di Donato
5d786eb579
fix(platform/id): remove first and last char during unmarshalling only if they are quotes
2018-10-11 09:54:18 -05:00
Leonardo Di Donato
8d7f06cf4b
feat(platform/id): using uint64 for platform.IDs
...
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
Co-Authored-by: Lorenzo Fontana <lo@linux.com>
2018-10-11 09:54:18 -05:00
Michael Desa
8c87c9d132
revert #442
2018-08-01 14:54:32 -04:00
Leonardo Di Donato
43ebb0251f
Improvements to platform.ID errors
...
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2018-08-01 18:20:59 +02:00
Leonardo Di Donato
c16a855a58
Better naming for the ID length constant
2018-08-01 18:20:59 +02:00
Leonardo Di Donato
bba4e4d69f
Moving ID tests in platform_test package to avoid circular deps
2018-08-01 18:20:59 +02:00
Leonardo Di Donato
c6b8c9d82e
All zeros ID considered invalid
2018-08-01 18:20:59 +02:00
Leonardo Di Donato
ae9e7c0087
Adapt tests to ID generators returning pointer to platform.ID
2018-08-01 18:20:59 +02:00
Leonardo Di Donato
bcd4e7e675
Fix ID error about exact length
2018-08-01 18:20:59 +02:00
Leonardo Di Donato
94f48bdaf5
Switch ID back to uint64
2018-08-01 18:20:59 +02:00
Leonardo Di Donato
60eb7dd8ad
Errors for shorter and longer inputs + empty function + big endian
...
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2018-08-01 18:20:59 +02:00
Leonardo Di Donato
d2a11aa77c
Platform ID encoding using uint64
...
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
Co-Authored-by: Lorenzo Fontana <lo@linux.com>
2018-08-01 18:20:59 +02:00
Lorenzo Fontana
8f0ebe47f2
Static id from string function
...
Signed-off-by: Lorenzo Fontana <lo@linux.com>
Co-authored-by: Chris Goller <goller@gmail.com>
2018-07-20 17:00:36 +02:00
Michael Desa
1aa08a2a4b
fix(platform): rename *_generator.go to *.go
2018-05-16 11:45:13 -04:00