Versions in this module Expand all Collapse all v0 v0.0.3 Oct 7, 2018 Changes in this version + const FoldersEndpoint + const TeamsSearchEndpoint + var ErrConflict = newError(409, "Conflict") + var ErrGatewayTimeout = newError(504, "Gateway timeout") type Client + func (c *Client) CreateFolder(folder Folder) (Folder, error) + func (c *Client) CreateTeam(team Team) (int, error) + func (c *Client) DeleteDashboard(uid string) (string, error) + func (c *Client) DeleteFolder(folder Folder) error + func (c *Client) DeleteTeam(team Team) error + func (c *Client) GetFolder(uid string) (Folder, error) + func (c *Client) GetTeam(teamID string) (Team, error) + func (c *Client) ListFolders() ([]Folder, error) + type Folder struct + CanAdmin bool + CanEdit bool + CanSave bool + CreatedBy string + HasACL bool + ID int + Title string + UID string + URL string + UpdatedBy string + Version int v0.0.2 Sep 25, 2018 Changes in this version + const DashboardsImportEndpoint + const DashboardsUIDEndpoint + const SearchEndpoint + var ErrBadGateway = newError(502, "Bad Gateway") + var ErrForbidden = newError(403, "Access refused or not allowed") + var ErrNotFound = newError(404, "Access refused or not allowed") + var ErrNotImplemented = newError(501, "Not Implemented") + var ErrServiceUnavailable = newError(503, "Service Unavailable") + var ErrTooManyRequests = newError(429, "You have exceeded the API call rate limit") + var ErrUnauthorized = newError(401, "Not authenticated") type Client + func (c *Client) CreateDashboard(db DashboardRequest) (DashboardResponse, error) + func (c *Client) GetDashboard(uid string) (DashboardExport, error) + func (c *Client) GetUser(ID string) (User, error) + func (c *Client) ListDashboards() ([]Dashboard, error) + type Dashboard struct + ID int + IsStarred bool + Tags []string + Title string + Type string + UID string + URI string + URL string + type DashboardExport struct + Dashboard interface{} + Meta DashboardMetadata + type DashboardMetadata struct + CanAdmin bool + CanEdit bool + CanSave bool + CanStar bool + CreatedBy string + FolderID int + FolderTitle string + HasACL bool + Slug string + Type string + URL string + UpdatedBy string + Version int + type DashboardRequest struct + Dashboard interface{} + FolderID int + Message string + Overwrite *bool + type DashboardResponse struct + DashboardID int + Description string + Imported bool + ImportedRevision int + ImportedURI string + ImportedURL string + Path string + PluginID string + Removed bool + Revision int + Slug string + Title string + type Error struct + Message string + StatusCode int + func (e *Error) Error() string v0.0.1 Sep 3, 2018 Changes in this version + const AuthorizationHeader + const AuthorizationTypeBasic + const DatasourcesEndpoint + const OrgsEndpoint + const OrgsUsersEndpoint + const TeamsEndpoint + const UsersEndpoint + type Address struct + Address1 string + Address2 string + City string + Country string + State string + ZipCode string + type Client struct + func New(apiURI, username, password string) *Client + func (c *Client) CreateDatasource(ds Datasource) (Datasource, error) + func (c *Client) DeleteDatasource(ds Datasource) error + func (c *Client) GetDatasource(id string) (Datasource, error) + func (c *Client) ListDatasources() ([]Datasource, error) + func (c *Client) ListOrgs() ([]Org, error) + func (c *Client) ListUsers(opt *ListUserOptions) ([]User, error) + func (c *Client) SearchTeams(opt *SearchTeamsOptions) (TeamPage, error) + func (c *Client) SetVerbose(verbose bool) + type Datasource struct + Access string + BasicAuth bool + Database string + ID int + IsDeReadOnlyfault bool + IsDefault bool + Name string + OrgID int + Password string + Type string + TypeLogoURL string + URL string + User string + type ListUserOptions struct + CurrentOrg bool + type Org struct + Address Address + ID int + Name string + type SearchTeamsOptions struct + Query string + type Team struct + AvatarURL string + Email string + ID int + MemberCount int + Name string + OrgID int + type TeamPage struct + Page int + PerPage int + Teams []Team + TotalCount int + type User struct + AvatarURL string + Email string + ID int + IsAdmin bool + LastSeenAge string + Login string + Name string + OrgID int + UserID int