rdiam

command module
v0.0.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 17, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

README

rdiam(beta version)

Test Apache-2.0

rdiam is CLI for redash group members, inspired by bqiam. This is beta version.

Install

# requirement: go version >= 1.16.0
go install github.com/snowhork/rdiam@latest

Requirement

  • go >= 1.16.0
  • Redash version >= 7.0.0

rdiam uses Redash internal API. With another version, rdiam may not work.

Usage

Setting

In first, you can interactively set your redash endpoint and your redash user API key as below.

Enter you Redash endpoint (e.g. https://redash.yourdomain.com): 
Enter your Redash user API Key: 

You can get user API KEY at <your redash domain>/users/me.

Your settings are written at ~/.rdiam.yaml.

Command
add

To add some user(s) to some group(s).

rdiam add -u [email(s)] -g [group(s)]

example:

rdiam add -u user1@email.com,user2@emali.com -g group1,group2
inspect

To display groups for access the url.

rdiam inspect [url]

Acceptable url type is query or datasource or dashboard.

example:

rdiam inspect https://redash.mydomain.com/dashboard/my-dashboard

output:

ID my-dashboard dashboard is: Awesome Dashboard
        ID 1025 query is: Weekly_Conversion
                ID 10 datasource is: my-bigquery
                        * full-access-group (FullAccess)
                        * read-only-group (Readonly)
        ID 1024 query is: Monthly_Conversion
                ID 10 datasource is: my-bigquery
                        * full-access-group (FullAccess)
                        * read-only-group (Readonly)

So, if someone wants to access my-dashboard, (s)he is required to join full-access-group.

Documentation

Overview

Copyright © 2021 Kyoshiro Maruo

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Directories

Path Synopsis
cmd
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL