Documentation ¶
Index ¶
- 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) 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) 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) FindByDashboardFolder(ctx context.Context, dashboard *dashboards.Dashboard) ([]*models.PublicDashboard, error)
- func (_m *FakePublicDashboardStore) FindByDashboardUid(ctx context.Context, orgId int64, dashboardUid string) (*models.PublicDashboard, error)
- func (_m *FakePublicDashboardStore) FindDashboard(ctx context.Context, orgId int64, dashboardUid string) (*dashboards.Dashboard, 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 Service
- type ServiceWrapper
- type Store
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FakePublicDashboardService ¶
FakePublicDashboardService is an autogenerated mock type for the Service type
func NewFakePublicDashboardService ¶
func NewFakePublicDashboardService(t mockConstructorTestingTNewFakePublicDashboardService) *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.
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) error
Delete provides a mock function with given fields: ctx, uid
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) 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 mockConstructorTestingTNewFakePublicDashboardServiceWrapper) *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.
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 mockConstructorTestingTNewFakePublicDashboardStore) *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.
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) FindByDashboardFolder ¶
func (_m *FakePublicDashboardStore) FindByDashboardFolder(ctx context.Context, dashboard *dashboards.Dashboard) ([]*models.PublicDashboard, error)
FindByDashboardFolder provides a mock function with given fields: ctx, dashboard
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) FindDashboard ¶
func (_m *FakePublicDashboardStore) FindDashboard(ctx context.Context, orgId int64, dashboardUid string) (*dashboards.Dashboard, error)
FindDashboard provides a mock function with given fields: ctx, orgId, dashboardUid
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 Service ¶
type Service interface { 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) 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) FindDashboard(ctx context.Context, orgId int64, dashboardUid string) (*dashboards.Dashboard, 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) FindByDashboardFolder(ctx context.Context, dashboard *dashboards.Dashboard) ([]*PublicDashboard, error) ExistsEnabledByAccessToken(ctx context.Context, accessToken string) (bool, error) ExistsEnabledByDashboardUid(ctx context.Context, dashboardUid string) (bool, error) GetMetrics(ctx context.Context) (*Metrics, error) }