redash

package
v0.8.5 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

README

redash

Usage

source:
  name: redash
  config:
    base_url: https://redash.example.com
    api_key: t33I8i8OFnVt3t9Bjj2RXr8nCBz0xyzVZ318Zwbj

Inputs

Key Value Example Description
base_url string https://redash.example.com Each endpoint is appended to your Redash base URL required
api_key string t33I8i8OFnVt3t9Bjj2RXr8nCBz0xyzVZ318Zwbj Redash API calls support authentication with an API key required

Outputs

Field Sample Value
resource.urn redash.dashboard_name
resource.name dashboard_slug
resource.service redash
resource.type dashboard
resource.url https://redash.example.com/dashboard_slug
resource.description ID: dashboard_id, version: dashboard_version
Chart

Currently, no Redash public API is exposed to fetch charts detail in a particular dashboard.

Contributing

Refer to the contribution guidelines for information on contributing to this module.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	BaseURL string `mapstructure:"base_url" validate:"required"`
	ApiKey  string `mapstructure:"api_key" validate:"required"`
}

Config holds the set of configuration for the redash extractor

type Extractor

type Extractor struct {
	plugins.BaseExtractor
	// contains filtered or unexported fields
}

Extractor manages the extraction of data from the redash server

func New

func New(logger log.Logger) *Extractor

New returns a pointer to an initialized Extractor Object

func (*Extractor) Extract

func (e *Extractor) Extract(ctx context.Context, emit plugins.Emit) error

Extract collects metadata of each dashboard through emitter

func (*Extractor) Init

func (e *Extractor) Init(ctx context.Context, config plugins.Config) error

Init initializes the extractor

type Results

type Results struct {
	Tags                    []interface{} `json:"tags"`
	IsArchived              bool          `json:"is_archived"`
	UpdatedAt               time.Time     `json:"updated_at"`
	IsFavorite              bool          `json:"is_favorite"`
	User                    User          `json:"user"`
	Layout                  []interface{} `json:"layout"`
	IsDraft                 bool          `json:"is_draft"`
	Id                      int           `json:"id"`
	UserId                  int           `json:"user_id"`
	Name                    string        `json:"name"`
	CreatedAt               time.Time     `json:"created_at"`
	Slug                    string        `json:"slug"`
	Version                 int           `json:"version"`
	Widgets                 interface{}   `json:"widgets"`
	DashboardFiltersEnabled bool          `json:"dashboard_filters_enabled"`
}

type User

type User struct {
	AuthType            string      `json:"auth_type"`
	IsDisabled          bool        `json:"is_disabled"`
	UpdatedAt           time.Time   `json:"updated_at"`
	ProfileImageUrl     string      `json:"profile_image_url"`
	IsInvitationPending bool        `json:"is_invitation_pending"`
	Groups              []int       `json:"groups"`
	Id                  int         `json:"id"`
	Name                string      `json:"name"`
	CreatedAt           time.Time   `json:"created_at"`
	DisabledAt          interface{} `json:"disabled_at"`
	IsEmailVerified     bool        `json:"is_email_verified"`
	ActiveAt            time.Time   `json:"active_at"`
	Email               string      `json:"email"`
}

Jump to

Keyboard shortcuts

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