Documentation ¶
Index ¶
- type FakePublicDashboardMiddleware
- func (_m *FakePublicDashboardMiddleware) HandleAccessView(c *contextmodel.ReqContext)
- func (_m *FakePublicDashboardMiddleware) HandleApi(c *contextmodel.ReqContext)
- func (_m *FakePublicDashboardMiddleware) HandleConfirmAccessView(c *contextmodel.ReqContext)
- func (_m *FakePublicDashboardMiddleware) HandleView(c *contextmodel.ReqContext)
- type FakePublicDashboardService
- func (_m *FakePublicDashboardService) Create(ctx context.Context, u *user.SignedInUser, dto *models.SavePublicDashboardDTO) (*models.PublicDashboard, error)
- func (_m *FakePublicDashboardService) Delete(ctx context.Context, uid string, dashboardUid string) error
- func (_m *FakePublicDashboardService) DeleteByDashboard(ctx context.Context, dashboard *dashboards.Dashboard) error
- func (_m *FakePublicDashboardService) ExistsEnabledByAccessToken(ctx context.Context, accessToken string) (bool, error)
- func (_m *FakePublicDashboardService) ExistsEnabledByDashboardUid(ctx context.Context, dashboardUid string) (bool, error)
- func (_m *FakePublicDashboardService) Find(ctx context.Context, uid string) (*models.PublicDashboard, error)
- func (_m *FakePublicDashboardService) FindAllWithPagination(ctx context.Context, query *models.PublicDashboardListQuery) (*models.PublicDashboardListResponseWithPagination, error)
- func (_m *FakePublicDashboardService) FindAnnotations(ctx context.Context, reqDTO models.AnnotationsQueryDTO, accessToken string) ([]models.AnnotationEvent, error)
- func (_m *FakePublicDashboardService) FindByAccessToken(ctx context.Context, accessToken string) (*models.PublicDashboard, error)
- func (_m *FakePublicDashboardService) FindByDashboardUid(ctx context.Context, orgId int64, dashboardUid string) (*models.PublicDashboard, error)
- func (_m *FakePublicDashboardService) FindDashboard(ctx context.Context, orgId int64, dashboardUid string) (*dashboards.Dashboard, error)
- func (_m *FakePublicDashboardService) FindEnabledPublicDashboardAndDashboardByAccessToken(ctx context.Context, accessToken string) (*models.PublicDashboard, *dashboards.Dashboard, error)
- func (_m *FakePublicDashboardService) FindPublicDashboardAndDashboardByAccessToken(ctx context.Context, accessToken string) (*models.PublicDashboard, *dashboards.Dashboard, error)
- func (_m *FakePublicDashboardService) GetMetricRequest(ctx context.Context, dashboard *dashboards.Dashboard, ...) (dtos.MetricRequest, error)
- func (_m *FakePublicDashboardService) GetOrgIdByAccessToken(ctx context.Context, accessToken string) (int64, error)
- func (_m *FakePublicDashboardService) GetPublicDashboardForView(ctx context.Context, accessToken string) (*dtos.DashboardFullWithMeta, error)
- func (_m *FakePublicDashboardService) GetQueryDataResponse(ctx context.Context, skipDSCache bool, reqDTO models.PublicDashboardQueryDTO, ...) (*backend.QueryDataResponse, error)
- func (_m *FakePublicDashboardService) NewPublicDashboardAccessToken(ctx context.Context) (string, error)
- func (_m *FakePublicDashboardService) NewPublicDashboardUid(ctx context.Context) (string, error)
- func (_m *FakePublicDashboardService) Update(ctx context.Context, u *user.SignedInUser, dto *models.SavePublicDashboardDTO) (*models.PublicDashboard, error)
- type FakePublicDashboardServiceWrapper
- type FakePublicDashboardStore
- func (_m *FakePublicDashboardStore) Create(ctx context.Context, cmd models.SavePublicDashboardCommand) (int64, error)
- func (_m *FakePublicDashboardStore) Delete(ctx context.Context, uid string) (int64, error)
- func (_m *FakePublicDashboardStore) ExistsEnabledByAccessToken(ctx context.Context, accessToken string) (bool, error)
- func (_m *FakePublicDashboardStore) ExistsEnabledByDashboardUid(ctx context.Context, dashboardUid string) (bool, error)
- func (_m *FakePublicDashboardStore) Find(ctx context.Context, uid string) (*models.PublicDashboard, error)
- func (_m *FakePublicDashboardStore) FindAllWithPagination(ctx context.Context, query *models.PublicDashboardListQuery) (*models.PublicDashboardListResponseWithPagination, error)
- func (_m *FakePublicDashboardStore) FindByAccessToken(ctx context.Context, accessToken string) (*models.PublicDashboard, error)
- func (_m *FakePublicDashboardStore) FindByDashboardUid(ctx context.Context, orgId int64, dashboardUid string) (*models.PublicDashboard, error)
- func (_m *FakePublicDashboardStore) FindByFolder(ctx context.Context, orgId int64, folderUid string) ([]*models.PublicDashboard, error)
- func (_m *FakePublicDashboardStore) GetMetrics(ctx context.Context) (*models.Metrics, error)
- func (_m *FakePublicDashboardStore) GetOrgIdByAccessToken(ctx context.Context, accessToken string) (int64, error)
- func (_m *FakePublicDashboardStore) Update(ctx context.Context, cmd models.SavePublicDashboardCommand) (int64, error)
- type Middleware
- type Service
- type ServiceWrapper
- type Store
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FakePublicDashboardMiddleware ¶
FakePublicDashboardMiddleware is an autogenerated mock type for the Middleware type
func NewFakePublicDashboardMiddleware ¶
func NewFakePublicDashboardMiddleware(t interface { mock.TestingT Cleanup(func()) }) *FakePublicDashboardMiddleware
NewFakePublicDashboardMiddleware creates a new instance of FakePublicDashboardMiddleware. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*FakePublicDashboardMiddleware) HandleAccessView ¶
func (_m *FakePublicDashboardMiddleware) HandleAccessView(c *contextmodel.ReqContext)
HandleAccessView provides a mock function with given fields: c
func (*FakePublicDashboardMiddleware) HandleApi ¶
func (_m *FakePublicDashboardMiddleware) HandleApi(c *contextmodel.ReqContext)
HandleApi provides a mock function with given fields: c
func (*FakePublicDashboardMiddleware) HandleConfirmAccessView ¶
func (_m *FakePublicDashboardMiddleware) HandleConfirmAccessView(c *contextmodel.ReqContext)
HandleConfirmAccessView provides a mock function with given fields: c
func (*FakePublicDashboardMiddleware) HandleView ¶
func (_m *FakePublicDashboardMiddleware) HandleView(c *contextmodel.ReqContext)
HandleView provides a mock function with given fields: c
type FakePublicDashboardService ¶
FakePublicDashboardService is an autogenerated mock type for the Service type
func NewFakePublicDashboardService ¶
func NewFakePublicDashboardService(t interface { mock.TestingT Cleanup(func()) }) *FakePublicDashboardService
NewFakePublicDashboardService creates a new instance of FakePublicDashboardService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*FakePublicDashboardService) Create ¶
func (_m *FakePublicDashboardService) Create(ctx context.Context, u *user.SignedInUser, dto *models.SavePublicDashboardDTO) (*models.PublicDashboard, error)
Create provides a mock function with given fields: ctx, u, dto
func (*FakePublicDashboardService) Delete ¶
func (_m *FakePublicDashboardService) Delete(ctx context.Context, uid string, dashboardUid string) error
Delete provides a mock function with given fields: ctx, uid, dashboardUid
func (*FakePublicDashboardService) DeleteByDashboard ¶
func (_m *FakePublicDashboardService) DeleteByDashboard(ctx context.Context, dashboard *dashboards.Dashboard) error
DeleteByDashboard provides a mock function with given fields: ctx, dashboard
func (*FakePublicDashboardService) ExistsEnabledByAccessToken ¶
func (_m *FakePublicDashboardService) ExistsEnabledByAccessToken(ctx context.Context, accessToken string) (bool, error)
ExistsEnabledByAccessToken provides a mock function with given fields: ctx, accessToken
func (*FakePublicDashboardService) ExistsEnabledByDashboardUid ¶
func (_m *FakePublicDashboardService) ExistsEnabledByDashboardUid(ctx context.Context, dashboardUid string) (bool, error)
ExistsEnabledByDashboardUid provides a mock function with given fields: ctx, dashboardUid
func (*FakePublicDashboardService) Find ¶
func (_m *FakePublicDashboardService) Find(ctx context.Context, uid string) (*models.PublicDashboard, error)
Find provides a mock function with given fields: ctx, uid
func (*FakePublicDashboardService) FindAllWithPagination ¶
func (_m *FakePublicDashboardService) FindAllWithPagination(ctx context.Context, query *models.PublicDashboardListQuery) (*models.PublicDashboardListResponseWithPagination, error)
FindAllWithPagination provides a mock function with given fields: ctx, query
func (*FakePublicDashboardService) FindAnnotations ¶
func (_m *FakePublicDashboardService) FindAnnotations(ctx context.Context, reqDTO models.AnnotationsQueryDTO, accessToken string) ([]models.AnnotationEvent, error)
FindAnnotations provides a mock function with given fields: ctx, reqDTO, accessToken
func (*FakePublicDashboardService) FindByAccessToken ¶
func (_m *FakePublicDashboardService) FindByAccessToken(ctx context.Context, accessToken string) (*models.PublicDashboard, error)
FindByAccessToken provides a mock function with given fields: ctx, accessToken
func (*FakePublicDashboardService) FindByDashboardUid ¶
func (_m *FakePublicDashboardService) FindByDashboardUid(ctx context.Context, orgId int64, dashboardUid string) (*models.PublicDashboard, error)
FindByDashboardUid provides a mock function with given fields: ctx, orgId, dashboardUid
func (*FakePublicDashboardService) FindDashboard ¶
func (_m *FakePublicDashboardService) FindDashboard(ctx context.Context, orgId int64, dashboardUid string) (*dashboards.Dashboard, error)
FindDashboard provides a mock function with given fields: ctx, orgId, dashboardUid
func (*FakePublicDashboardService) FindEnabledPublicDashboardAndDashboardByAccessToken ¶
func (_m *FakePublicDashboardService) FindEnabledPublicDashboardAndDashboardByAccessToken(ctx context.Context, accessToken string) (*models.PublicDashboard, *dashboards.Dashboard, error)
FindEnabledPublicDashboardAndDashboardByAccessToken provides a mock function with given fields: ctx, accessToken
func (*FakePublicDashboardService) FindPublicDashboardAndDashboardByAccessToken ¶
func (_m *FakePublicDashboardService) FindPublicDashboardAndDashboardByAccessToken(ctx context.Context, accessToken string) (*models.PublicDashboard, *dashboards.Dashboard, error)
FindPublicDashboardAndDashboardByAccessToken provides a mock function with given fields: ctx, accessToken
func (*FakePublicDashboardService) GetMetricRequest ¶
func (_m *FakePublicDashboardService) GetMetricRequest(ctx context.Context, dashboard *dashboards.Dashboard, publicDashboard *models.PublicDashboard, panelId int64, reqDTO models.PublicDashboardQueryDTO) (dtos.MetricRequest, error)
GetMetricRequest provides a mock function with given fields: ctx, dashboard, publicDashboard, panelId, reqDTO
func (*FakePublicDashboardService) GetOrgIdByAccessToken ¶
func (_m *FakePublicDashboardService) GetOrgIdByAccessToken(ctx context.Context, accessToken string) (int64, error)
GetOrgIdByAccessToken provides a mock function with given fields: ctx, accessToken
func (*FakePublicDashboardService) GetPublicDashboardForView ¶
func (_m *FakePublicDashboardService) GetPublicDashboardForView(ctx context.Context, accessToken string) (*dtos.DashboardFullWithMeta, error)
GetPublicDashboardForView provides a mock function with given fields: ctx, accessToken
func (*FakePublicDashboardService) GetQueryDataResponse ¶
func (_m *FakePublicDashboardService) GetQueryDataResponse(ctx context.Context, skipDSCache bool, reqDTO models.PublicDashboardQueryDTO, panelId int64, accessToken string) (*backend.QueryDataResponse, error)
GetQueryDataResponse provides a mock function with given fields: ctx, skipDSCache, reqDTO, panelId, accessToken
func (*FakePublicDashboardService) NewPublicDashboardAccessToken ¶
func (_m *FakePublicDashboardService) NewPublicDashboardAccessToken(ctx context.Context) (string, error)
NewPublicDashboardAccessToken provides a mock function with given fields: ctx
func (*FakePublicDashboardService) NewPublicDashboardUid ¶
func (_m *FakePublicDashboardService) NewPublicDashboardUid(ctx context.Context) (string, error)
NewPublicDashboardUid provides a mock function with given fields: ctx
func (*FakePublicDashboardService) Update ¶
func (_m *FakePublicDashboardService) Update(ctx context.Context, u *user.SignedInUser, dto *models.SavePublicDashboardDTO) (*models.PublicDashboard, error)
Update provides a mock function with given fields: ctx, u, dto
type FakePublicDashboardServiceWrapper ¶
FakePublicDashboardServiceWrapper is an autogenerated mock type for the ServiceWrapper type
func NewFakePublicDashboardServiceWrapper ¶
func NewFakePublicDashboardServiceWrapper(t interface { mock.TestingT Cleanup(func()) }) *FakePublicDashboardServiceWrapper
NewFakePublicDashboardServiceWrapper creates a new instance of FakePublicDashboardServiceWrapper. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*FakePublicDashboardServiceWrapper) Delete ¶
func (_m *FakePublicDashboardServiceWrapper) Delete(ctx context.Context, uid string) error
Delete provides a mock function with given fields: ctx, uid
func (*FakePublicDashboardServiceWrapper) FindByDashboardUid ¶
func (_m *FakePublicDashboardServiceWrapper) FindByDashboardUid(ctx context.Context, orgId int64, dashboardUid string) (*models.PublicDashboard, error)
FindByDashboardUid provides a mock function with given fields: ctx, orgId, dashboardUid
type FakePublicDashboardStore ¶
FakePublicDashboardStore is an autogenerated mock type for the Store type
func NewFakePublicDashboardStore ¶
func NewFakePublicDashboardStore(t interface { mock.TestingT Cleanup(func()) }) *FakePublicDashboardStore
NewFakePublicDashboardStore creates a new instance of FakePublicDashboardStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*FakePublicDashboardStore) Create ¶
func (_m *FakePublicDashboardStore) Create(ctx context.Context, cmd models.SavePublicDashboardCommand) (int64, error)
Create provides a mock function with given fields: ctx, cmd
func (*FakePublicDashboardStore) Delete ¶
Delete provides a mock function with given fields: ctx, uid
func (*FakePublicDashboardStore) ExistsEnabledByAccessToken ¶
func (_m *FakePublicDashboardStore) ExistsEnabledByAccessToken(ctx context.Context, accessToken string) (bool, error)
ExistsEnabledByAccessToken provides a mock function with given fields: ctx, accessToken
func (*FakePublicDashboardStore) ExistsEnabledByDashboardUid ¶
func (_m *FakePublicDashboardStore) ExistsEnabledByDashboardUid(ctx context.Context, dashboardUid string) (bool, error)
ExistsEnabledByDashboardUid provides a mock function with given fields: ctx, dashboardUid
func (*FakePublicDashboardStore) Find ¶
func (_m *FakePublicDashboardStore) Find(ctx context.Context, uid string) (*models.PublicDashboard, error)
Find provides a mock function with given fields: ctx, uid
func (*FakePublicDashboardStore) FindAllWithPagination ¶
func (_m *FakePublicDashboardStore) FindAllWithPagination(ctx context.Context, query *models.PublicDashboardListQuery) (*models.PublicDashboardListResponseWithPagination, error)
FindAllWithPagination provides a mock function with given fields: ctx, query
func (*FakePublicDashboardStore) FindByAccessToken ¶
func (_m *FakePublicDashboardStore) FindByAccessToken(ctx context.Context, accessToken string) (*models.PublicDashboard, error)
FindByAccessToken provides a mock function with given fields: ctx, accessToken
func (*FakePublicDashboardStore) FindByDashboardUid ¶
func (_m *FakePublicDashboardStore) FindByDashboardUid(ctx context.Context, orgId int64, dashboardUid string) (*models.PublicDashboard, error)
FindByDashboardUid provides a mock function with given fields: ctx, orgId, dashboardUid
func (*FakePublicDashboardStore) FindByFolder ¶
func (_m *FakePublicDashboardStore) FindByFolder(ctx context.Context, orgId int64, folderUid string) ([]*models.PublicDashboard, error)
FindByFolder provides a mock function with given fields: ctx, orgId, folderUid
func (*FakePublicDashboardStore) GetMetrics ¶
GetMetrics provides a mock function with given fields: ctx
func (*FakePublicDashboardStore) GetOrgIdByAccessToken ¶
func (_m *FakePublicDashboardStore) GetOrgIdByAccessToken(ctx context.Context, accessToken string) (int64, error)
GetOrgIdByAccessToken provides a mock function with given fields: ctx, accessToken
func (*FakePublicDashboardStore) Update ¶
func (_m *FakePublicDashboardStore) Update(ctx context.Context, cmd models.SavePublicDashboardCommand) (int64, error)
Update provides a mock function with given fields: ctx, cmd
type Middleware ¶
type Middleware interface { HandleApi(c *contextmodel.ReqContext) HandleView(c *contextmodel.ReqContext) HandleAccessView(c *contextmodel.ReqContext) HandleConfirmAccessView(c *contextmodel.ReqContext) }
type Service ¶
type Service interface { GetPublicDashboardForView(ctx context.Context, accessToken string) (*dtos.DashboardFullWithMeta, error) FindPublicDashboardAndDashboardByAccessToken(ctx context.Context, accessToken string) (*PublicDashboard, *dashboards.Dashboard, error) FindEnabledPublicDashboardAndDashboardByAccessToken(ctx context.Context, accessToken string) (*PublicDashboard, *dashboards.Dashboard, error) FindByAccessToken(ctx context.Context, accessToken string) (*PublicDashboard, error) FindByDashboardUid(ctx context.Context, orgId int64, dashboardUid string) (*PublicDashboard, error) FindAnnotations(ctx context.Context, reqDTO AnnotationsQueryDTO, accessToken string) ([]AnnotationEvent, error) FindDashboard(ctx context.Context, orgId int64, dashboardUid string) (*dashboards.Dashboard, error) FindAllWithPagination(ctx context.Context, query *PublicDashboardListQuery) (*PublicDashboardListResponseWithPagination, error) Find(ctx context.Context, uid string) (*PublicDashboard, error) Create(ctx context.Context, u *user.SignedInUser, dto *SavePublicDashboardDTO) (*PublicDashboard, error) Update(ctx context.Context, u *user.SignedInUser, dto *SavePublicDashboardDTO) (*PublicDashboard, error) Delete(ctx context.Context, uid string, dashboardUid string) error DeleteByDashboard(ctx context.Context, dashboard *dashboards.Dashboard) error GetMetricRequest(ctx context.Context, dashboard *dashboards.Dashboard, publicDashboard *PublicDashboard, panelId int64, reqDTO PublicDashboardQueryDTO) (dtos.MetricRequest, error) GetQueryDataResponse(ctx context.Context, skipDSCache bool, reqDTO PublicDashboardQueryDTO, panelId int64, accessToken string) (*backend.QueryDataResponse, error) GetOrgIdByAccessToken(ctx context.Context, accessToken string) (int64, error) NewPublicDashboardAccessToken(ctx context.Context) (string, error) NewPublicDashboardUid(ctx context.Context) (string, error) ExistsEnabledByAccessToken(ctx context.Context, accessToken string) (bool, error) ExistsEnabledByDashboardUid(ctx context.Context, dashboardUid string) (bool, error) }
type ServiceWrapper ¶
type ServiceWrapper interface { FindByDashboardUid(ctx context.Context, orgId int64, dashboardUid string) (*PublicDashboard, error) Delete(ctx context.Context, uid string) error }
ServiceWrapper these methods have different behavior between OSS and Enterprise. The latter would call the OSS service first
type Store ¶
type Store interface { Find(ctx context.Context, uid string) (*PublicDashboard, error) FindByAccessToken(ctx context.Context, accessToken string) (*PublicDashboard, error) FindByDashboardUid(ctx context.Context, orgId int64, dashboardUid string) (*PublicDashboard, error) FindAllWithPagination(ctx context.Context, query *PublicDashboardListQuery) (*PublicDashboardListResponseWithPagination, error) Create(ctx context.Context, cmd SavePublicDashboardCommand) (int64, error) Update(ctx context.Context, cmd SavePublicDashboardCommand) (int64, error) Delete(ctx context.Context, uid string) (int64, error) GetOrgIdByAccessToken(ctx context.Context, accessToken string) (int64, error) FindByFolder(ctx context.Context, orgId int64, folderUid string) ([]*PublicDashboard, error) ExistsEnabledByAccessToken(ctx context.Context, accessToken string) (bool, error) ExistsEnabledByDashboardUid(ctx context.Context, dashboardUid string) (bool, error) GetMetrics(ctx context.Context) (*Metrics, error) }