func WithBasicAuth(username string, password string) Option {
	return func(client *Client) {
		client.requestModifiers = append(client.requestModifiers, func(request *http.Request) {
			request.SetBasicAuth(username, password)
		})
	}
}
WithBasicAuth sets up the client to use the given credentials to authenticate.
package grabana
import (
	"bytes"
	"context"
	"encoding/json"
	"errors"
	"fmt"
	"io"
	"io/ioutil"
	"net/http"
	"strings"
	"github.com/K-Phoen/grabana/alert"
	"github.com/K-Phoen/grabana/dashboard"
	"github.com/grafana-tools/sdk"
)
var ErrFolderNotFound = errors.New("folder not found")
var ErrAlertChannelNotFound = errors.New("alert channel not found")
type Dashboard struct {
	ID  uint   `json:"id"`
	UID string `json:"uid"`
	URL string `json:"url"`
}
type Folder struct {
	ID    uint   `json:"id"`
	UID   string `json:"uid"`
	Title string `json:"title"`
}
type Option func(client *Client)
type requestModifier func(request *http.Request)
type Client struct {
	http             *http.Client
	host             string
	requestModifiers []requestModifier
}
func NewClient(http *http.Client, host string, options ...Option) *Client {
	client := &Client{
		http: http,
		host: host,
	}
	for _, opt := range options {
		opt(client)
	}
	return client
}
func WithAPIToken(token string) Option {
	return func(client *Client) {
		client.requestModifiers = append(client.requestModifiers, func(request *http.Request) {
			request.Header.Add("Authorization", fmt.Sprintf("Bearer %s", token))
		})
	}
}