Documentation ¶
Index ¶
- Constants
- Variables
- type AddApiKeyCommand
- type AddDataSourceCommand
- type AddOrgUserCommand
- type ApiKey
- type ApiKeyDTO
- type ChangeUserPasswordCommand
- type CreateDashboardSnapshotCommand
- type CreateOrgCommand
- type CreateUserCommand
- type Dashboard
- type DashboardSearchHit
- type DashboardSnapshot
- type DashboardTagCloudItem
- type DataSource
- type DataSourceCreatedEvent
- type DeleteApiKeyCommand
- type DeleteDashboardCommand
- type DeleteDashboardSnapshotCommand
- type DeleteDataSourceCommand
- type DeleteOrgCommand
- type DeleteUserCommand
- type DsAccess
- type GetApiKeyByIdQuery
- type GetApiKeyByNameQuery
- type GetApiKeysQuery
- type GetDashboardQuery
- type GetDashboardSnapshotQuery
- type GetDashboardTagsQuery
- type GetDataSourceByIdQuery
- type GetDataSourceByNameQuery
- type GetDataSourcesQuery
- type GetOrgByIdQuery
- type GetOrgByNameQuery
- type GetOrgListQuery
- type GetOrgUsersQuery
- type GetSignedInUserQuery
- type GetSystemStatsQuery
- type GetUserByIdQuery
- type GetUserByLoginQuery
- type GetUserOrgListQuery
- type GetUserProfileQuery
- type GetUserStarsQuery
- type HomeDashboard
- type IsStarredByUserQuery
- type OAuthType
- type Org
- type OrgDTO
- type OrgUser
- type OrgUserDTO
- type RemoveOrgUserCommand
- type RoleType
- type SaveDashboardCommand
- type SearchDashboardsQuery
- type SearchResult
- type SearchUsersQuery
- type SetUsingOrgCommand
- type SignedInUser
- type Star
- type StarDashboardCommand
- type SystemStats
- type UnstarDashboardCommand
- type UpdateApiKeyCommand
- type UpdateDataSourceCommand
- type UpdateOrgCommand
- type UpdateUserCommand
- type UpdateUserPermissionsCommand
- type User
- type UserOrgDTO
- type UserProfileDTO
- type UserSearchHitDTO
Constants ¶
View Source
const ( DS_GRAPHITE = "graphite" DS_INFLUXDB = "influxdb" DS_INFLUXDB_08 = "influxdb_08" DS_ES = "elasticsearch" DS_OPENTSDB = "opentsdb" DS_ACCESS_DIRECT = "direct" DS_ACCESS_PROXY = "proxy" )
Variables ¶
View Source
var ( ErrDashboardNotFound = errors.New("Account not found") ErrDashboardWithSameNameExists = errors.New("A dashboard with the same name already exists") ErrDashboardVersionMismatch = errors.New("The dashboard has been changed by someone else") )
Typed errors
View Source
var ( ErrInvalidRoleType = errors.New("Invalid role type") ErrLastOrgAdmin = errors.New("Cannot remove last organization admin") )
Typed errors
View Source
var ErrCommandValidationFailed = errors.New("Command missing required fields")
View Source
var (
ErrDataSourceNotFound = errors.New("Data source not found")
)
Typed errors
View Source
var ErrInvalidApiKey = errors.New("Invalid API Key")
View Source
var ErrNotFound = errors.New("Not found")
View Source
var (
ErrOrgNotFound = errors.New("Organization not found")
)
Typed errors
View Source
var (
ErrUserNotFound = errors.New("User not found")
)
Typed errors
Functions ¶
This section is empty.
Types ¶
type AddApiKeyCommand ¶
type AddApiKeyCommand struct { Name string `json:"name" binding:"Required"` Role RoleType `json:"role" binding:"Required"` OrgId int64 `json:"-"` Key string `json:"-"` Result *ApiKey `json:"-"` }
--------------------- COMMANDS
type AddDataSourceCommand ¶
type AddDataSourceCommand struct { Name string `json:"name" binding:"Required"` Type string `json:"type" binding:"Required"` Access DsAccess `json:"access" binding:"Required"` Url string `json:"url"` Password string `json:"password"` Database string `json:"database"` User string `json:"user"` BasicAuth bool `json:"basicAuth"` BasicAuthUser string `json:"basicAuthUser"` BasicAuthPassword string `json:"basicAuthPassword"` IsDefault bool `json:"isDefault"` JsonData map[string]interface{} `json:"jsonData"` OrgId int64 `json:"-"` Result *DataSource }
Also acts as api DTO
type AddOrgUserCommand ¶
type CreateDashboardSnapshotCommand ¶
type CreateDashboardSnapshotCommand struct { Dashboard map[string]interface{} `json:"dashboard" binding:"Required"` Expires int64 `json:"expires"` // these are passed when storing an external snapshot ref External bool `json:"external"` Key string `json:"key"` DeleteKey string `json:"deleteKey"` OrgId int64 `json:"-"` UserId int64 `json:"-"` Result *DashboardSnapshot }
type CreateOrgCommand ¶
type CreateUserCommand ¶
type Dashboard ¶
type Dashboard struct { Id int64 Slug string OrgId int64 Version int Created time.Time Updated time.Time Title string Data map[string]interface{} }
Dashboard model
type DashboardSearchHit ¶
type DashboardSnapshot ¶
type DashboardSnapshot struct { Id int64 Name string Key string DeleteKey string OrgId int64 UserId int64 External bool ExternalUrl string Expires time.Time Created time.Time Updated time.Time Dashboard map[string]interface{} }
DashboardSnapshot model
type DashboardTagCloudItem ¶
type DataSource ¶
type DeleteApiKeyCommand ¶
type DeleteDashboardCommand ¶
type DeleteDashboardSnapshotCommand ¶
type DeleteDashboardSnapshotCommand struct {
DeleteKey string `json:"-"`
}
type DeleteDataSourceCommand ¶
type DeleteOrgCommand ¶
type DeleteOrgCommand struct {
Id int64
}
type DeleteUserCommand ¶
type DeleteUserCommand struct {
UserId int64
}
type GetApiKeyByIdQuery ¶
type GetApiKeyByNameQuery ¶
type GetApiKeysQuery ¶
type GetDashboardQuery ¶
type GetDashboardSnapshotQuery ¶
type GetDashboardSnapshotQuery struct { Key string Result *DashboardSnapshot }
type GetDashboardTagsQuery ¶
type GetDashboardTagsQuery struct { OrgId int64 Result []*DashboardTagCloudItem }
type GetDataSourceByIdQuery ¶
type GetDataSourceByIdQuery struct { Id int64 OrgId int64 Result DataSource }
type GetDataSourceByNameQuery ¶
type GetDataSourceByNameQuery struct { Name string OrgId int64 Result DataSource }
type GetDataSourcesQuery ¶
type GetDataSourcesQuery struct { OrgId int64 Result []*DataSource }
type GetOrgByIdQuery ¶
type GetOrgByNameQuery ¶
type GetOrgListQuery ¶
type GetOrgListQuery struct {
Result []*Org
}
type GetOrgUsersQuery ¶
type GetOrgUsersQuery struct { OrgId int64 Result []*OrgUserDTO }
type GetSignedInUserQuery ¶
type GetSignedInUserQuery struct { UserId int64 Result *SignedInUser }
type GetSystemStatsQuery ¶
type GetSystemStatsQuery struct {
Result *SystemStats
}
type GetUserByIdQuery ¶
type GetUserByLoginQuery ¶
type GetUserOrgListQuery ¶
type GetUserOrgListQuery struct { UserId int64 Result []*UserOrgDTO }
type GetUserProfileQuery ¶
type GetUserProfileQuery struct { UserId int64 Result UserProfileDTO }
type GetUserStarsQuery ¶
type HomeDashboard ¶
type IsStarredByUserQuery ¶
type OrgUserDTO ¶
type RemoveOrgUserCommand ¶
type SaveDashboardCommand ¶
type SaveDashboardCommand struct { Dashboard map[string]interface{} `json:"dashboard" binding:"Required"` Overwrite bool `json:"overwrite"` OrgId int64 `json:"-"` Result *Dashboard }
func (*SaveDashboardCommand) GetDashboardModel ¶
func (cmd *SaveDashboardCommand) GetDashboardModel() *Dashboard
GetDashboardModel turns the command into the savable model
type SearchDashboardsQuery ¶
type SearchResult ¶
type SearchResult struct { Dashboards []*DashboardSearchHit `json:"dashboards"` Tags []*DashboardTagCloudItem `json:"tags"` TagsOnly bool `json:"tagsOnly"` }
type SearchUsersQuery ¶
type SearchUsersQuery struct { Query string Page int Limit int Result []*UserSearchHitDTO }
type SetUsingOrgCommand ¶
type SignedInUser ¶
type StarDashboardCommand ¶
type SystemStats ¶
type UnstarDashboardCommand ¶
type UpdateApiKeyCommand ¶
type UpdateDataSourceCommand ¶
type UpdateDataSourceCommand struct { Id int64 `json:"id" binding:"Required"` Name string `json:"name" binding:"Required"` Type string `json:"type" binding:"Required"` Access DsAccess `json:"access" binding:"Required"` Url string `json:"url"` Password string `json:"password"` User string `json:"user"` Database string `json:"database"` BasicAuth bool `json:"basicAuth"` BasicAuthUser string `json:"basicAuthUser"` BasicAuthPassword string `json:"basicAuthPassword"` IsDefault bool `json:"isDefault"` JsonData map[string]interface{} `json:"jsonData"` OrgId int64 `json:"-"` }
Also acts as api DTO
type UpdateOrgCommand ¶
type UpdateUserCommand ¶
type UserOrgDTO ¶
type UserProfileDTO ¶
Click to show internal directories.
Click to hide internal directories.