dtos

package
v4.0.0+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 29, 2016 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetGravatarUrl

func GetGravatarUrl(text string) string

Types

type AddInviteForm

type AddInviteForm struct {
	LoginOrEmail string     `json:"loginOrEmail" binding:"Required"`
	Name         string     `json:"name"`
	Role         m.RoleType `json:"role" binding:"Required"`
	SkipEmails   bool       `json:"skipEmails"`
}

type AdminCreateUserForm

type AdminCreateUserForm struct {
	Email    string `json:"email"`
	Login    string `json:"login"`
	Name     string `json:"name"`
	Password string `json:"password" binding:"Required"`
}

type AdminUpdateUserForm

type AdminUpdateUserForm struct {
	Email string `json:"email"`
	Login string `json:"login"`
	Name  string `json:"name"`
}

type AdminUpdateUserPasswordForm

type AdminUpdateUserPasswordForm struct {
	Password string `json:"password" binding:"Required"`
}

type AdminUpdateUserPermissionsForm

type AdminUpdateUserPermissionsForm struct {
	IsGrafanaAdmin bool `json:"IsGrafanaAdmin"`
}

type AdminUserListItem

type AdminUserListItem struct {
	Email          string `json:"email"`
	Name           string `json:"name"`
	Login          string `json:"login"`
	IsGrafanaAdmin bool   `json:"isGrafanaAdmin"`
}

type AlertNotification

type AlertNotification struct {
	Id        int64     `json:"id"`
	Name      string    `json:"name"`
	Type      string    `json:"type"`
	IsDefault bool      `json:"isDefault"`
	Created   time.Time `json:"created"`
	Updated   time.Time `json:"updated"`
}

type AlertRule

type AlertRule struct {
	Id             int64            `json:"id"`
	DashboardId    int64            `json:"dashboardId"`
	PanelId        int64            `json:"panelId"`
	Name           string           `json:"name"`
	Message        string           `json:"message"`
	State          m.AlertStateType `json:"state"`
	NewStateDate   time.Time        `json:"newStateDate"`
	EvalDate       time.Time        `json:"evalDate"`
	ExecutionError string           `json:"executionError"`
	DashbboardUri  string           `json:"dashboardUri"`
}

type AlertTestCommand

type AlertTestCommand struct {
	Dashboard *simplejson.Json `json:"dashboard" binding:"Required"`
	PanelId   int64            `json:"panelId" binding:"Required"`
}

type AlertTestResult

type AlertTestResult struct {
	Firing         bool                  `json:"firing"`
	ConditionEvals string                `json:"conditionEvals"`
	TimeMs         string                `json:"timeMs"`
	Error          string                `json:"error,omitempty"`
	EvalMatches    []*EvalMatch          `json:"matches,omitempty"`
	Logs           []*AlertTestResultLog `json:"logs,omitempty"`
}

type AlertTestResultLog

type AlertTestResultLog struct {
	Message string      `json:"message"`
	Data    interface{} `json:"data"`
}

type Annotation

type Annotation struct {
	AlertId     int64  `json:"alertId"`
	DashboardId int64  `json:"dashboardId"`
	PanelId     int64  `json:"panelId"`
	NewState    string `json:"newState"`
	PrevState   string `json:"prevState"`
	Time        int64  `json:"time"`
	Title       string `json:"title"`
	Text        string `json:"text"`
	Metric      string `json:"metric"`

	Data *simplejson.Json `json:"data"`
}

type AnyId

type AnyId struct {
	Id int64 `json:"id"`
}

type CompleteInviteForm

type CompleteInviteForm struct {
	InviteCode      string `json:"inviteCode"`
	Email           string `json:"email" binding:"Required"`
	Name            string `json:"name"`
	Username        string `json:"username"`
	Password        string `json:"password"`
	ConfirmPassword string `json:"confirmPassword"`
}

type CurrentUser

type CurrentUser struct {
	IsSignedIn     bool       `json:"isSignedIn"`
	Id             int64      `json:"id"`
	Login          string     `json:"login"`
	Email          string     `json:"email"`
	Name           string     `json:"name"`
	LightTheme     bool       `json:"lightTheme"`
	OrgId          int64      `json:"orgId"`
	OrgName        string     `json:"orgName"`
	OrgRole        m.RoleType `json:"orgRole"`
	IsGrafanaAdmin bool       `json:"isGrafanaAdmin"`
	GravatarUrl    string     `json:"gravatarUrl"`
	Timezone       string     `json:"timezone"`
	Locale         string     `json:"locale"`
}

type DashboardFullWithMeta

type DashboardFullWithMeta struct {
	Meta      DashboardMeta    `json:"meta"`
	Dashboard *simplejson.Json `json:"dashboard"`
}

type DashboardMeta

type DashboardMeta struct {
	IsStarred  bool      `json:"isStarred,omitempty"`
	IsHome     bool      `json:"isHome,omitempty"`
	IsSnapshot bool      `json:"isSnapshot,omitempty"`
	Type       string    `json:"type,omitempty"`
	CanSave    bool      `json:"canSave"`
	CanEdit    bool      `json:"canEdit"`
	CanStar    bool      `json:"canStar"`
	Slug       string    `json:"slug"`
	Expires    time.Time `json:"expires"`
	Created    time.Time `json:"created"`
	Updated    time.Time `json:"updated"`
	UpdatedBy  string    `json:"updatedBy"`
	CreatedBy  string    `json:"createdBy"`
	Version    int       `json:"version"`
}

type DashboardRedirect

type DashboardRedirect struct {
	RedirectUri string `json:"redirectUri"`
}

type DataSource

type DataSource struct {
	Id                int64             `json:"id"`
	OrgId             int64             `json:"orgId"`
	Name              string            `json:"name"`
	Type              string            `json:"type"`
	TypeLogoUrl       string            `json:"typeLogoUrl"`
	Access            m.DsAccess        `json:"access"`
	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"`
	WithCredentials   bool              `json:"withCredentials"`
	IsDefault         bool              `json:"isDefault"`
	JsonData          *simplejson.Json  `json:"jsonData,omitempty"`
	SecureJsonData    map[string]string `json:"secureJsonData,omitempty"`
	TLSAuth           TLSAuth           `json:"tlsAuth,omitempty"`
}

type DataSourceList

type DataSourceList []DataSource

func (DataSourceList) Len

func (slice DataSourceList) Len() int

func (DataSourceList) Less

func (slice DataSourceList) Less(i, j int) bool

func (DataSourceList) Swap

func (slice DataSourceList) Swap(i, j int)

type DeleteAnnotationsCmd

type DeleteAnnotationsCmd struct {
	AlertId     int64 `json:"alertId"`
	DashboardId int64 `json:"dashboardId"`
	PanelId     int64 `json:"panelId"`
}

type EvalMatch

type EvalMatch struct {
	Tags   map[string]string `json:"tags,omitempty"`
	Metric string            `json:"metric"`
	Value  float64           `json:"value"`
}

type ImportDashboardCommand

type ImportDashboardCommand struct {
	PluginId  string                         `json:"pluginId"`
	Path      string                         `json:"path"`
	Overwrite bool                           `json:"overwrite"`
	Dashboard *simplejson.Json               `json:"dashboard"`
	Inputs    []plugins.ImportDashboardInput `json:"inputs"`
}

type IndexViewData

type IndexViewData struct {
	User                    *CurrentUser
	Settings                map[string]interface{}
	AppUrl                  string
	AppSubUrl               string
	GoogleAnalyticsId       string
	GoogleTagManagerId      string
	MainNavLinks            []*NavLink
	BuildVersion            string
	BuildCommit             string
	NewGrafanaVersionExists bool
	NewGrafanaVersion       string
}

type InviteInfo

type InviteInfo struct {
	Email     string `json:"email"`
	Name      string `json:"name"`
	Username  string `json:"username"`
	InvitedBy string `json:"invitedBy"`
}

type LoginCommand

type LoginCommand struct {
	User     string `json:"user" binding:"Required"`
	Password string `json:"password" binding:"Required"`
	Remember bool   `json:"remember"`
}

type MetricRequest

type MetricRequest struct {
	From    string             `json:"from"`
	To      string             `json:"to"`
	Queries []*simplejson.Json `json:"queries"`
}
type NavLink struct {
	Text     string     `json:"text,omitempty"`
	Icon     string     `json:"icon,omitempty"`
	Img      string     `json:"img,omitempty"`
	Url      string     `json:"url,omitempty"`
	Divider  bool       `json:"divider,omitempty"`
	Children []*NavLink `json:"children,omitempty"`
}

type NewApiKeyResult

type NewApiKeyResult struct {
	Name string `json:"name"`
	Key  string `json:"key"`
}

type NotificationTestCommand

type NotificationTestCommand struct {
	Name     string           `json:"name"`
	Type     string           `json:"type"`
	Settings *simplejson.Json `json:"settings"`
}

type PauseAlertCommand

type PauseAlertCommand struct {
	AlertId int64 `json:"alertId"`
	Paused  bool  `json:"paused"`
}

type PlaylistDashboard

type PlaylistDashboard struct {
	Id    int64  `json:"id"`
	Slug  string `json:"slug"`
	Title string `json:"title"`
	Uri   string `json:"uri"`
	Order int    `json:"order"`
}

type PlaylistDashboardsSlice

type PlaylistDashboardsSlice []PlaylistDashboard

func (PlaylistDashboardsSlice) Len

func (slice PlaylistDashboardsSlice) Len() int

func (PlaylistDashboardsSlice) Less

func (slice PlaylistDashboardsSlice) Less(i, j int) bool

func (PlaylistDashboardsSlice) Swap

func (slice PlaylistDashboardsSlice) Swap(i, j int)

type PluginCss

type PluginCss struct {
	Light string `json:"light"`
	Dark  string `json:"dark"`
}

type PluginList

type PluginList []PluginListItem

func (PluginList) Len

func (slice PluginList) Len() int

func (PluginList) Less

func (slice PluginList) Less(i, j int) bool

func (PluginList) Swap

func (slice PluginList) Swap(i, j int)

type PluginListItem

type PluginListItem struct {
	Name          string              `json:"name"`
	Type          string              `json:"type"`
	Id            string              `json:"id"`
	Enabled       bool                `json:"enabled"`
	Pinned        bool                `json:"pinned"`
	Info          *plugins.PluginInfo `json:"info"`
	LatestVersion string              `json:"latestVersion"`
	HasUpdate     bool                `json:"hasUpdate"`
	DefaultNavUrl string              `json:"defaultNavUrl"`
}

type PluginSetting

type PluginSetting struct {
	Name          string                      `json:"name"`
	Type          string                      `json:"type"`
	Id            string                      `json:"id"`
	Enabled       bool                        `json:"enabled"`
	Pinned        bool                        `json:"pinned"`
	Module        string                      `json:"module"`
	BaseUrl       string                      `json:"baseUrl"`
	Info          *plugins.PluginInfo         `json:"info"`
	Includes      []*plugins.PluginInclude    `json:"includes"`
	Dependencies  *plugins.PluginDependencies `json:"dependencies"`
	JsonData      map[string]interface{}      `json:"jsonData"`
	DefaultNavUrl string                      `json:"defaultNavUrl"`

	LatestVersion string `json:"latestVersion"`
	HasUpdate     bool   `json:"hasUpdate"`
}

type Prefs

type Prefs struct {
	Theme           string `json:"theme"`
	HomeDashboardId int64  `json:"homeDashboardId"`
	Timezone        string `json:"timezone"`
}

type ResetUserPasswordForm

type ResetUserPasswordForm struct {
	Code            string `json:"code"`
	NewPassword     string `json:"newPassword"`
	ConfirmPassword string `json:"confirmPassword"`
}

type SendResetPasswordEmailForm

type SendResetPasswordEmailForm struct {
	UserOrEmail string `json:"userOrEmail" binding:"Required"`
}

type SignUpForm

type SignUpForm struct {
	Email string `json:"email" binding:"Required"`
}

type SignUpStep2Form

type SignUpStep2Form struct {
	Email    string `json:"email"`
	Name     string `json:"name"`
	Username string `json:"username"`
	Password string `json:"password"`
	Code     string `json:"code"`
	OrgName  string `json:"orgName"`
}

type StreamMessage

type StreamMessage struct {
	Stream string                `json:"stream"`
	Series []StreamMessageSeries `json:"series"`
}

type StreamMessageSeries

type StreamMessageSeries struct {
	Name       string          `json:"name"`
	Datapoints [][]json.Number `json:"datapoints"`
}

type TLSAuth

type TLSAuth struct {
	CACertSet     bool `json:"tlsCACertSet"`
	ClientCertSet bool `json:"tlsClientCertSet"`
	ClientKeySet  bool `json:"tlsClientKeySet"`
}

TLSAuth is used to show if TLS certs have been uploaded already

type UpdateOrgAddressForm

type UpdateOrgAddressForm struct {
	Address1 string `json:"address1"`
	Address2 string `json:"address2"`
	City     string `json:"city"`
	ZipCode  string `json:"zipcode"`
	State    string `json:"state"`
	Country  string `json:"country"`
}

type UpdateOrgForm

type UpdateOrgForm struct {
	Name string `json:"name" binding:"Required"`
}

type UpdatePrefsCmd

type UpdatePrefsCmd struct {
	Theme           string `json:"theme"`
	HomeDashboardId int64  `json:"homeDashboardId"`
	Timezone        string `json:"timezone"`
}

type UserStars

type UserStars struct {
	DashboardIds map[string]bool `json:"dashboardIds"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL