feat: port influx auth command (#152)

This commit is contained in:
Dane Strandboge
2021-06-28 14:06:29 -05:00
committed by GitHub
parent ead44e4e83
commit a058fe7e0b
13 changed files with 2260 additions and 165 deletions

15
api/permission_string.go Normal file
View File

@ -0,0 +1,15 @@
package api
func (o Permission) String() string {
ret := o.GetAction() + ":"
r := o.GetResource()
if r.GetOrgID() != "" {
ret += "orgs/" + r.GetOrgID()
}
ret += "/" + r.GetType()
if r.GetId() != "" {
ret += "/" + r.GetId()
}
return ret
}