metabase

package module
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: May 7, 2024 License: Apache-2.0 Imports: 0 Imported by: 0

README ยถ

Metabase SDK Go


An SDK for interacting with the Metabase REST API for the Go programming language.

๐Ÿง About

Metabase is an analytics tool which allows anyone to easily learn and make decisions from their company's data. It allows you to query data directly from your databases (called "questions"), which you can store and share with others, as well as generate reports.

This module provides an SDK to interact with the Metabase API for the Go programming language.

[!NOTE] This SDK is not officially maintained or endorsed by Metabase.

๐ŸŽˆ Usage

  1. Add the SDK to your project using go get

    go get github.com:bnjns/metabase-sdk-go
    
  2. Create an authenticator, to tell the client how to authenticate with the API

     package main
    
     import "github.com/bnjns/metabase-sdk-go/metabase"
    
     func main()  { 
         // Both session-based and API key-based authentication is supported
         authenticator, err := metabase.NewApiKeyAuthenticator("<api key>")
         if err != nil {
             panic(err)
         }
     }
    
  3. Create the client

     func main() {
         // ...
         client, err := metabase.NewClient("<host>", authenticator)
         if err != nil {
             panic(err)
         }	
     }
    

See the docs for more details.

๐Ÿ”ง Contributing

Prerequisites

If you wish to update the documentation, you will also need:

Install

To get started, simply clone the repository:

git clone git@github.com:bnjns/metabase-sdk-go.git

Then install the Go dependencies:

go mod download

Running Metabase

Use Task to run and set up Metabase using Docker:

task run:metabase
task setup:metabase

Running tests

go test -v ./...

or, using Task:

task check:test

Linting

task check:lint

๐Ÿ“ Additional Documentation

โœ๏ธ Authors

Documentation ยถ

Overview ยถ

Package metabase is an SDK for the Go programming language that can be used to interact with the Metabase REST API. Please note, this is not an official SDK or endorsed by Metabase.

Directories ยถ

Path Synopsis
internal
Package metabase provides the functionality to create a new client.
Package metabase provides the functionality to create a new client.
Package service provides the types and services for each group of Metabase APIs.
Package service provides the types and services for each group of Metabase APIs.
database
Package database contains the functionality and types needed to interact with the Database API.
Package database contains the functionality and types needed to interact with the Database API.
permissions
Package permissions contains the functionality and types needed to interact with the Permissions API.
Package permissions contains the functionality and types needed to interact with the Permissions API.
user
Package user contains the functionality and types needed to interact with the User API.
Package user contains the functionality and types needed to interact with the User API.

Jump to

Keyboard shortcuts

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