func ID(id uint) Option {
	return func(builder *Builder) {
		builder.board.ID = id
	}
}
ID sets the ID used by the dashboard.
package dashboard
import (
	"crypto/sha1"
	"encoding/hex"
	"encoding/json"
	"github.com/K-Phoen/grabana/row"
	"github.com/K-Phoen/grabana/variable/constant"
	"github.com/K-Phoen/grabana/variable/custom"
	"github.com/K-Phoen/grabana/variable/datasource"
	"github.com/K-Phoen/grabana/variable/interval"
	"github.com/K-Phoen/grabana/variable/query"
	"github.com/grafana-tools/sdk"
)
type TagAnnotation struct {
	Name       string
	Datasource string
	IconColor  string   `yaml:"color"`
	Tags       []string `yaml:",flow"`
}
type Option func(dashboard *Builder)
type TimezoneOption string
const DefaultTimezone TimezoneOption = ""
const UTC TimezoneOption = "utc"
const Browser TimezoneOption = "browser"
type Builder struct {
	board *sdk.Board
}
func New(title string, options ...Option) Builder {
	board := sdk.NewBoard(title)
	board.ID = 0
	builder := &Builder{board: board}
	for _, opt := range append(defaults(), options...) {
		opt(builder)
	}
	return *builder
}
func defaults() []Option {
	return []Option{
		defaultTimePicker(),
		Timezone(DefaultTimezone),
		Time("now-3h", "now"),
		SharedCrossHair(),
	}
}
func defaultTimePicker() Option {
	return func(builder *Builder) {
		builder.board.Timepicker = sdk.Timepicker{
			RefreshIntervals: []string{"5s", "10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d"},
			TimeOptions:      []string{"5m", "15m", "1h", "6h", "12h", "24h", "2d", "7d", "30d"},
		}
	}
}
func (builder *Builder) MarshalJSON() ([]byte, error) {
	return json.Marshal(builder.board)
}
func (builder *Builder) MarshalIndentJSON() ([]byte, error) {
	return json.MarshalIndent(builder.board, "", "  ")
}
func (builder *Builder) Internal() *sdk.Board {
	return builder.board
}
func VariableAsConst(name string, options ...constant.Option) Option {
	return func(builder *Builder) {
		templatedVar := constant.New(name, options...)
		builder.board.Templating.List = append(builder.board.Templating.List, templatedVar.Builder)
	}
}