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 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 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 SearchHit
- type SearchOrgsQuery
- type SearchUsersQuery
- type SendEmailCommand
- type SendResetPasswordEmailCommand
- type SetUsingOrgCommand
- type SignedInUser
- type Star
- type StarDashboardCommand
- type SystemStats
- type UnstarDashboardCommand
- type UpdateApiKeyCommand
- type UpdateDataSourceCommand
- type UpdateOrgCommand
- type UpdateOrgUserCommand
- type UpdateUserCommand
- type UpdateUserPermissionsCommand
- type User
- type UserOrgDTO
- type UserProfileDTO
- type UserSearchHitDTO
- type ValidateResetPasswordCodeQuery
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("Dashboard not found") ErrDashboardSnapshotNotFound = errors.New("Dashboard snapshot 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 ( DashTypeJson = "file" DashTypeDB = "db" DashTypeScript = "script" DashTypeSnapshot = "snapshot" )
View Source
var ( ErrInvalidRoleType = errors.New("Invalid role type") ErrLastOrgAdmin = errors.New("Cannot remove last organization admin") ErrOrgUserNotFound = errors.New("Cannot find the organization user") )
Typed errors
Typed errors
Typed errors
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 ApiKey ¶
type ApiKeyDTO ¶
type ChangeUserPasswordCommand ¶
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
func (*Dashboard) GetTags ¶
GetTags turns the tags in data json into go string array
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 DeleteDashboardSnapshotCommand ¶
type DeleteDashboardSnapshotCommand struct {
DeleteKey string `json:"-"`
}
type GetApiKeyByNameQuery ¶
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 GetOrgUsersQuery ¶
type GetOrgUsersQuery struct { OrgId int64 Result []*OrgUserDTO }
type GetSignedInUserQuery ¶
type GetSignedInUserQuery struct { UserId int64 Login string Email string Result *SignedInUser }
type GetSystemStatsQuery ¶
type GetSystemStatsQuery struct {
Result *SystemStats
}
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 OrgUser ¶
type OrgUserDTO ¶
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 SearchHit ¶
type SearchOrgsQuery ¶
type SearchUsersQuery ¶
type SearchUsersQuery struct { Query string Page int Limit int Result []*UserSearchHitDTO }
type SendEmailCommand ¶
type SignedInUser ¶
type UpdateApiKeyCommand ¶
type UpdateDataSourceCommand ¶
type UpdateDataSourceCommand 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"` 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:"-"` Id int64 `json:"-"` }
Also acts as api DTO
type UpdateOrgCommand ¶
type UpdateOrgUserCommand ¶
type UpdateUserCommand ¶
type UpdateUserPermissionsCommand ¶
type User ¶
type UserOrgDTO ¶
type UserProfileDTO ¶
type UserSearchHitDTO ¶
Click to show internal directories.
Click to hide internal directories.