Documentation ¶
Overview ¶
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.
Index ¶
- Constants
- func SetIDForFunc(gen *platform.IDGenerator, id platform.ID, fn func())
- type AuthorizationService
- func (s *AuthorizationService) CreateAuthorization(ctx context.Context, authorization *platform.Authorization) error
- func (s *AuthorizationService) DeleteAuthorization(ctx context.Context, id platform2.ID) error
- func (s *AuthorizationService) FindAuthorizationByID(ctx context.Context, id platform2.ID) (*platform.Authorization, error)
- func (s *AuthorizationService) FindAuthorizationByToken(ctx context.Context, t string) (*platform.Authorization, error)
- func (s *AuthorizationService) FindAuthorizations(ctx context.Context, filter platform.AuthorizationFilter, ...) ([]*platform.Authorization, int, error)
- func (s *AuthorizationService) UpdateAuthorization(ctx context.Context, id platform2.ID, upd *platform.AuthorizationUpdate) (*platform.Authorization, error)
- type Authorizer
- type AuthorizerV1
- type Bucket
- func (b *Bucket) Cursor(opts ...kv.CursorHint) (kv.Cursor, error)
- func (b *Bucket) Delete(key []byte) error
- func (b *Bucket) ForwardCursor(seek []byte, opts ...kv.CursorOption) (kv.ForwardCursor, error)
- func (b *Bucket) Get(key []byte) ([]byte, error)
- func (b *Bucket) GetBatch(keys ...[]byte) ([][]byte, error)
- func (b *Bucket) Put(key, value []byte) error
- type BucketLookup
- type BucketOperationLogService
- type BucketService
- func (s *BucketService) Close() error
- func (s *BucketService) CreateBucket(ctx context.Context, bucket *platform.Bucket) error
- func (s *BucketService) DeleteBucket(ctx context.Context, id platform2.ID) error
- func (s *BucketService) FindBucket(ctx context.Context, filter platform.BucketFilter) (*platform.Bucket, error)
- func (s *BucketService) FindBucketByID(ctx context.Context, id platform2.ID) (*platform.Bucket, error)
- func (s *BucketService) FindBucketByName(ctx context.Context, orgID platform2.ID, name string) (*platform.Bucket, error)
- func (s *BucketService) FindBuckets(ctx context.Context, filter platform.BucketFilter, ...) ([]*platform.Bucket, int, error)
- func (s *BucketService) Open() error
- func (s *BucketService) UpdateBucket(ctx context.Context, id platform2.ID, upd platform.BucketUpdate) (*platform.Bucket, error)
- type CheckService
- func (s *CheckService) CreateCheck(ctx context.Context, check influxdb.CheckCreate, userID platform.ID) error
- func (s *CheckService) DeleteCheck(ctx context.Context, id platform.ID) error
- func (s *CheckService) FindCheck(ctx context.Context, filter influxdb.CheckFilter) (influxdb.Check, error)
- func (s *CheckService) FindCheckByID(ctx context.Context, id platform.ID) (influxdb.Check, error)
- func (s *CheckService) FindChecks(ctx context.Context, filter influxdb.CheckFilter, opts ...influxdb.FindOptions) ([]influxdb.Check, int, error)
- func (s *CheckService) PatchCheck(ctx context.Context, id platform.ID, upd influxdb.CheckUpdate) (influxdb.Check, error)
- func (s *CheckService) UpdateCheck(ctx context.Context, id platform.ID, chk influxdb.CheckCreate) (influxdb.Check, error)
- type Cursor
- type DBRPMappingService
- func (s *DBRPMappingService) Create(ctx context.Context, dbrp *influxdb.DBRPMapping) error
- func (s *DBRPMappingService) Delete(ctx context.Context, orgID, id platform.ID) error
- func (s *DBRPMappingService) FindByID(ctx context.Context, orgID, id platform.ID) (*influxdb.DBRPMapping, error)
- func (s *DBRPMappingService) FindMany(ctx context.Context, dbrp influxdb.DBRPMappingFilter, ...) ([]*influxdb.DBRPMapping, int, error)
- func (s *DBRPMappingService) Update(ctx context.Context, dbrp *influxdb.DBRPMapping) error
- type DashboardOperationLogService
- type DashboardService
- func (s *DashboardService) AddDashboardCell(ctx context.Context, id platform2.ID, c *platform.Cell, ...) error
- func (s *DashboardService) CopyDashboardCell(ctx context.Context, dashboardID platform2.ID, cellID platform2.ID) (*platform.Cell, error)
- func (s *DashboardService) CreateDashboard(ctx context.Context, b *platform.Dashboard) error
- func (s *DashboardService) DeleteDashboard(ctx context.Context, id platform2.ID) error
- func (s *DashboardService) FindDashboardByID(ctx context.Context, id platform2.ID) (*platform.Dashboard, error)
- func (s *DashboardService) FindDashboards(ctx context.Context, filter platform.DashboardFilter, ...) ([]*platform.Dashboard, int, error)
- func (s *DashboardService) GetDashboardCellView(ctx context.Context, dashboardID, cellID platform2.ID) (*platform.View, error)
- func (s *DashboardService) RemoveDashboardCell(ctx context.Context, dashboardID platform2.ID, cellID platform2.ID) error
- func (s *DashboardService) ReplaceDashboardCells(ctx context.Context, id platform2.ID, cs []*platform.Cell) error
- func (s *DashboardService) UpdateDashboard(ctx context.Context, id platform2.ID, upd platform.DashboardUpdate) (*platform.Dashboard, error)
- func (s *DashboardService) UpdateDashboardCell(ctx context.Context, dashboardID platform2.ID, cellID platform2.ID, ...) (*platform.Cell, error)
- func (s *DashboardService) UpdateDashboardCellView(ctx context.Context, dashboardID, cellID platform2.ID, upd platform.ViewUpdate) (*platform.View, error)
- type DeleteService
- type DocumentService
- type DocumentStore
- type Flagger
- type GeneratorOptionFn
- type GeneratorResultSet
- type IDGenerator
- type LabelService
- func (s *LabelService) CreateLabel(ctx context.Context, l *platform.Label) error
- func (s *LabelService) CreateLabelMapping(ctx context.Context, m *platform.LabelMapping) error
- func (s *LabelService) DeleteLabel(ctx context.Context, id platform2.ID) error
- func (s *LabelService) DeleteLabelMapping(ctx context.Context, m *platform.LabelMapping) error
- func (s *LabelService) FindLabelByID(ctx context.Context, id platform2.ID) (*platform.Label, error)
- func (s *LabelService) FindLabels(ctx context.Context, filter platform.LabelFilter, opt ...platform.FindOptions) ([]*platform.Label, error)
- func (s *LabelService) FindResourceLabels(ctx context.Context, filter platform.LabelMappingFilter) ([]*platform.Label, error)
- func (s *LabelService) UpdateLabel(ctx context.Context, id platform2.ID, upd platform.LabelUpdate) (*platform.Label, error)
- type LookupService
- type MockAnnotationService
- func (m *MockAnnotationService) CreateAnnotations(ctx context.Context, orgID platform.ID, create []influxdb.AnnotationCreate) ([]influxdb.AnnotationEvent, error)
- func (m *MockAnnotationService) CreateOrUpdateStream(ctx context.Context, orgID platform.ID, stream influxdb.Stream) (*influxdb.ReadStream, error)
- func (m *MockAnnotationService) DeleteAnnotation(ctx context.Context, id platform.ID) error
- func (m *MockAnnotationService) DeleteAnnotations(ctx context.Context, orgID platform.ID, delete influxdb.AnnotationDeleteFilter) error
- func (m *MockAnnotationService) DeleteStreamByID(ctx context.Context, id platform.ID) error
- func (m *MockAnnotationService) DeleteStreams(ctx context.Context, orgID platform.ID, delete influxdb.BasicStream) error
- func (m *MockAnnotationService) EXPECT() *MockAnnotationServiceMockRecorder
- func (m *MockAnnotationService) GetAnnotation(ctx context.Context, id platform.ID) (*influxdb.StoredAnnotation, error)
- func (m *MockAnnotationService) GetStream(ctx context.Context, id platform.ID) (*influxdb.StoredStream, error)
- func (m *MockAnnotationService) ListAnnotations(ctx context.Context, orgID platform.ID, filter influxdb.AnnotationListFilter) ([]influxdb.StoredAnnotation, error)
- func (m *MockAnnotationService) ListStreams(ctx context.Context, orgID platform.ID, filter influxdb.StreamListFilter) ([]influxdb.StoredStream, error)
- func (m *MockAnnotationService) UpdateAnnotation(ctx context.Context, id platform.ID, update influxdb.AnnotationCreate) (*influxdb.AnnotationEvent, error)
- func (m *MockAnnotationService) UpdateStream(ctx context.Context, id platform.ID, stream influxdb.Stream) (*influxdb.ReadStream, error)
- type MockAnnotationServiceMockRecorder
- func (mr *MockAnnotationServiceMockRecorder) CreateAnnotations(ctx, orgID, create interface{}) *gomock.Call
- func (mr *MockAnnotationServiceMockRecorder) CreateOrUpdateStream(ctx, orgID, stream interface{}) *gomock.Call
- func (mr *MockAnnotationServiceMockRecorder) DeleteAnnotation(ctx, id interface{}) *gomock.Call
- func (mr *MockAnnotationServiceMockRecorder) DeleteAnnotations(ctx, orgID, delete interface{}) *gomock.Call
- func (mr *MockAnnotationServiceMockRecorder) DeleteStreamByID(ctx, id interface{}) *gomock.Call
- func (mr *MockAnnotationServiceMockRecorder) DeleteStreams(ctx, orgID, delete interface{}) *gomock.Call
- func (mr *MockAnnotationServiceMockRecorder) GetAnnotation(ctx, id interface{}) *gomock.Call
- func (mr *MockAnnotationServiceMockRecorder) GetStream(ctx, id interface{}) *gomock.Call
- func (mr *MockAnnotationServiceMockRecorder) ListAnnotations(ctx, orgID, filter interface{}) *gomock.Call
- func (mr *MockAnnotationServiceMockRecorder) ListStreams(ctx, orgID, filter interface{}) *gomock.Call
- func (mr *MockAnnotationServiceMockRecorder) UpdateAnnotation(ctx, id, update interface{}) *gomock.Call
- func (mr *MockAnnotationServiceMockRecorder) UpdateStream(ctx, id, stream interface{}) *gomock.Call
- type MockBackupService
- func (m *MockBackupService) BackupKVStore(ctx context.Context, w io.Writer) error
- func (m *MockBackupService) BackupShard(ctx context.Context, w io.Writer, shardID uint64, since time.Time) error
- func (m *MockBackupService) EXPECT() *MockBackupServiceMockRecorder
- func (m *MockBackupService) RLockKVStore()
- func (m *MockBackupService) RUnlockKVStore()
- type MockBackupServiceMockRecorder
- func (mr *MockBackupServiceMockRecorder) BackupKVStore(ctx, w interface{}) *gomock.Call
- func (mr *MockBackupServiceMockRecorder) BackupShard(ctx, w, shardID, since interface{}) *gomock.Call
- func (mr *MockBackupServiceMockRecorder) RLockKVStore() *gomock.Call
- func (mr *MockBackupServiceMockRecorder) UnlockKVStore() *gomock.Call
- type MockBucketManifestWriter
- type MockBucketManifestWriterMockRecorder
- type MockIDGenerator
- type MockNotebookService
- func (m *MockNotebookService) CreateNotebook(ctx context.Context, create *influxdb.NotebookReqBody) (*influxdb.Notebook, error)
- func (m *MockNotebookService) DeleteNotebook(ctx context.Context, id platform.ID) error
- func (m *MockNotebookService) EXPECT() *MockNotebookServiceMockRecorder
- func (m *MockNotebookService) GetNotebook(ctx context.Context, id platform.ID) (*influxdb.Notebook, error)
- func (m *MockNotebookService) ListNotebooks(ctx context.Context, filter influxdb.NotebookListFilter) ([]*influxdb.Notebook, error)
- func (m *MockNotebookService) UpdateNotebook(ctx context.Context, id platform.ID, update *influxdb.NotebookReqBody) (*influxdb.Notebook, error)
- type MockNotebookServiceMockRecorder
- func (mr *MockNotebookServiceMockRecorder) CreateNotebook(ctx, create interface{}) *gomock.Call
- func (mr *MockNotebookServiceMockRecorder) DeleteNotebook(ctx, id interface{}) *gomock.Call
- func (mr *MockNotebookServiceMockRecorder) GetNotebook(ctx, id interface{}) *gomock.Call
- func (mr *MockNotebookServiceMockRecorder) ListNotebooks(ctx, filter interface{}) *gomock.Call
- func (mr *MockNotebookServiceMockRecorder) UpdateNotebook(ctx, id, update interface{}) *gomock.Call
- type MockPasswordsService
- func (m *MockPasswordsService) CompareAndSetPassword(arg0 context.Context, arg1 platform.ID, arg2, arg3 string) error
- func (m *MockPasswordsService) ComparePassword(arg0 context.Context, arg1 platform.ID, arg2 string) error
- func (m *MockPasswordsService) EXPECT() *MockPasswordsServiceMockRecorder
- func (m *MockPasswordsService) SetPassword(arg0 context.Context, arg1 platform.ID, arg2 string) error
- type MockPasswordsServiceMockRecorder
- func (mr *MockPasswordsServiceMockRecorder) CompareAndSetPassword(arg0, arg1, arg2, arg3 interface{}) *gomock.Call
- func (mr *MockPasswordsServiceMockRecorder) ComparePassword(arg0, arg1, arg2 interface{}) *gomock.Call
- func (mr *MockPasswordsServiceMockRecorder) SetPassword(arg0, arg1, arg2 interface{}) *gomock.Call
- type MockRestoreService
- func (m *MockRestoreService) EXPECT() *MockRestoreServiceMockRecorder
- func (m *MockRestoreService) RestoreBucket(ctx context.Context, id platform.ID, rpiData []byte) (map[uint64]uint64, error)
- func (m *MockRestoreService) RestoreKVStore(ctx context.Context, r io.Reader) error
- func (m *MockRestoreService) RestoreShard(ctx context.Context, shardID uint64, r io.Reader) error
- type MockRestoreServiceMockRecorder
- type MockSqlBackupRestoreService
- func (m *MockSqlBackupRestoreService) BackupSqlStore(ctx context.Context, w io.Writer) error
- func (m *MockSqlBackupRestoreService) EXPECT() *MockSqlBackupRestoreServiceMockRecorder
- func (m *MockSqlBackupRestoreService) RLockSqlStore()
- func (m *MockSqlBackupRestoreService) RUnlockSqlStore()
- func (m *MockSqlBackupRestoreService) RestoreSqlStore(ctx context.Context, r io.Reader) error
- type MockSqlBackupRestoreServiceMockRecorder
- func (mr *MockSqlBackupRestoreServiceMockRecorder) BackupSqlStore(ctx, w interface{}) *gomock.Call
- func (mr *MockSqlBackupRestoreServiceMockRecorder) RLockSqlStore() *gomock.Call
- func (mr *MockSqlBackupRestoreServiceMockRecorder) RUnlockSqlStore() *gomock.Call
- func (mr *MockSqlBackupRestoreServiceMockRecorder) RestoreSqlStore(ctx, r interface{}) *gomock.Call
- type NotificationEndpointService
- func (s *NotificationEndpointService) CreateNotificationEndpoint(ctx context.Context, nr influxdb.NotificationEndpoint, userID platform.ID) error
- func (s *NotificationEndpointService) DeleteNotificationEndpoint(ctx context.Context, id platform.ID) ([]influxdb.SecretField, platform.ID, error)
- func (s *NotificationEndpointService) FindNotificationEndpointByID(ctx context.Context, id platform.ID) (influxdb.NotificationEndpoint, error)
- func (s *NotificationEndpointService) FindNotificationEndpoints(ctx context.Context, filter influxdb.NotificationEndpointFilter, ...) ([]influxdb.NotificationEndpoint, int, error)
- func (s *NotificationEndpointService) PatchNotificationEndpoint(ctx context.Context, id platform.ID, upd influxdb.NotificationEndpointUpdate) (influxdb.NotificationEndpoint, error)
- func (s *NotificationEndpointService) UpdateNotificationEndpoint(ctx context.Context, id platform.ID, nr influxdb.NotificationEndpoint, ...) (influxdb.NotificationEndpoint, error)
- type NotificationRuleStore
- func (s *NotificationRuleStore) CreateNotificationRule(ctx context.Context, nr influxdb.NotificationRuleCreate, userID platform.ID) error
- func (s *NotificationRuleStore) DeleteNotificationRule(ctx context.Context, id platform.ID) error
- func (s *NotificationRuleStore) FindNotificationRuleByID(ctx context.Context, id platform.ID) (influxdb.NotificationRule, error)
- func (s *NotificationRuleStore) FindNotificationRules(ctx context.Context, filter influxdb.NotificationRuleFilter, ...) ([]influxdb.NotificationRule, int, error)
- func (s *NotificationRuleStore) PatchNotificationRule(ctx context.Context, id platform.ID, upd influxdb.NotificationRuleUpdate) (influxdb.NotificationRule, error)
- func (s *NotificationRuleStore) UpdateNotificationRule(ctx context.Context, id platform.ID, nr influxdb.NotificationRuleCreate, ...) (influxdb.NotificationRule, error)
- type OnboardingService
- type OrganizationLookup
- type OrganizationOperationLogService
- type OrganizationService
- func (s *OrganizationService) CreateOrganization(ctx context.Context, b *platform.Organization) error
- func (s *OrganizationService) DeleteOrganization(ctx context.Context, id platform2.ID) error
- func (s *OrganizationService) FindOrganization(ctx context.Context, filter platform.OrganizationFilter) (*platform.Organization, error)
- func (s *OrganizationService) FindOrganizationByID(ctx context.Context, id platform2.ID) (*platform.Organization, error)
- func (s *OrganizationService) FindOrganizations(ctx context.Context, filter platform.OrganizationFilter, ...) ([]*platform.Organization, int, error)
- func (s *OrganizationService) FindResourceOrganizationID(ctx context.Context, rt platform.ResourceType, id platform2.ID) (platform2.ID, error)
- func (s *OrganizationService) UpdateOrganization(ctx context.Context, id platform2.ID, upd platform.OrganizationUpdate) (*platform.Organization, error)
- type PagingFilter
- type PasswordsService
- func (s *PasswordsService) CompareAndSetPassword(ctx context.Context, userID platform.ID, old string, new string) error
- func (s *PasswordsService) ComparePassword(ctx context.Context, userID platform.ID, password string) error
- func (s *PasswordsService) SetPassword(ctx context.Context, userID platform.ID, password string) error
- type PointsWriter
- type ReadsStore
- func (s *ReadsStore) GetSource(orgID, bucketID uint64) proto.Message
- func (s *ReadsStore) ReadFilter(ctx context.Context, req *datatypes.ReadFilterRequest) (reads.ResultSet, error)
- func (s *ReadsStore) ReadGroup(ctx context.Context, req *datatypes.ReadGroupRequest) (reads.GroupResultSet, error)
- func (s *ReadsStore) ReadSeriesCardinality(ctx context.Context, req *datatypes.ReadSeriesCardinalityRequest) (cursors.Int64Iterator, error)
- func (s *ReadsStore) SupportReadSeriesCardinality(ctx context.Context) bool
- func (s *ReadsStore) TagKeys(ctx context.Context, req *datatypes.TagKeysRequest) (cursors.StringIterator, error)
- func (s *ReadsStore) TagValues(ctx context.Context, req *datatypes.TagValuesRequest) (cursors.StringIterator, error)
- func (s *ReadsStore) WindowAggregate(ctx context.Context, req *datatypes.ReadWindowAggregateRequest) (reads.ResultSet, error)
- type RetentionService
- type SafeCount
- type ScraperTargetStoreService
- func (s *ScraperTargetStoreService) AddTarget(ctx context.Context, t *platform.ScraperTarget, userID platform2.ID) error
- func (s *ScraperTargetStoreService) GetTargetByID(ctx context.Context, id platform2.ID) (*platform.ScraperTarget, error)
- func (s *ScraperTargetStoreService) ListTargets(ctx context.Context, filter platform.ScraperTargetFilter) ([]platform.ScraperTarget, error)
- func (s *ScraperTargetStoreService) RemoveTarget(ctx context.Context, id platform2.ID) error
- func (s *ScraperTargetStoreService) UpdateTarget(ctx context.Context, t *platform.ScraperTarget, userID platform2.ID) (*platform.ScraperTarget, error)
- type SecretService
- func (s *SecretService) DeleteSecret(ctx context.Context, orgID platform2.ID, ks ...string) error
- func (s *SecretService) GetSecretKeys(ctx context.Context, orgID platform2.ID) ([]string, error)
- func (s *SecretService) LoadSecret(ctx context.Context, orgID platform2.ID, k string) (string, error)
- func (s *SecretService) PatchSecrets(ctx context.Context, orgID platform2.ID, m map[string]string) error
- func (s *SecretService) PutSecret(ctx context.Context, orgID platform2.ID, k string, v string) error
- func (s *SecretService) PutSecrets(ctx context.Context, orgID platform2.ID, m map[string]string) error
- type SessionService
- func (s *SessionService) CreateSession(ctx context.Context, user string) (*platform.Session, error)
- func (s *SessionService) ExpireSession(ctx context.Context, key string) error
- func (s *SessionService) FindSession(ctx context.Context, key string) (*platform.Session, error)
- func (s *SessionService) RenewSession(ctx context.Context, session *platform.Session, expiredAt time.Time) error
- type SourceService
- func (s *SourceService) CreateSource(ctx context.Context, source *platform.Source) error
- func (s *SourceService) DefaultSource(ctx context.Context) (*platform.Source, error)
- func (s *SourceService) DeleteSource(ctx context.Context, id platform2.ID) error
- func (s *SourceService) FindSourceByID(ctx context.Context, id platform2.ID) (*platform.Source, error)
- func (s *SourceService) FindSources(ctx context.Context, opts platform.FindOptions) ([]*platform.Source, int, error)
- func (s *SourceService) UpdateSource(ctx context.Context, id platform2.ID, upd platform.SourceUpdate) (*platform.Source, error)
- type StorageReader
- func (s *StorageReader) Close()
- func (s *StorageReader) ReadFilter(ctx context.Context, spec query.ReadFilterSpec, alloc memory.Allocator) (query.TableIterator, error)
- func (s *StorageReader) ReadGroup(ctx context.Context, spec query.ReadGroupSpec, alloc memory.Allocator) (query.TableIterator, error)
- func (s *StorageReader) ReadSeriesCardinality(ctx context.Context, spec query.ReadSeriesCardinalitySpec, ...) (query.TableIterator, error)
- func (s *StorageReader) ReadTagKeys(ctx context.Context, spec query.ReadTagKeysSpec, alloc memory.Allocator) (query.TableIterator, error)
- func (s *StorageReader) ReadTagValues(ctx context.Context, spec query.ReadTagValuesSpec, alloc memory.Allocator) (query.TableIterator, error)
- func (s *StorageReader) ReadWindowAggregate(ctx context.Context, spec query.ReadWindowAggregateSpec, ...) (query.TableIterator, error)
- func (s *StorageReader) SupportReadSeriesCardinality(ctx context.Context) bool
- type Store
- func (s *Store) Backup(ctx context.Context, w io.Writer) error
- func (s *Store) RLock()
- func (s *Store) RUnlock()
- func (s *Store) Restore(ctx context.Context, r io.Reader) error
- func (s *Store) Update(ctx context.Context, fn func(kv.Tx) error) error
- func (s *Store) View(ctx context.Context, fn func(kv.Tx) error) error
- type TaskControlService
- func (tcs *TaskControlService) AddRunLog(ctx context.Context, taskID, runID platform.ID, when time.Time, log string) error
- func (tcs *TaskControlService) CreateRun(ctx context.Context, taskID platform.ID, scheduledFor time.Time, ...) (*taskmodel.Run, error)
- func (tcs *TaskControlService) CurrentlyRunning(ctx context.Context, taskID platform.ID) ([]*taskmodel.Run, error)
- func (tcs *TaskControlService) FinishRun(ctx context.Context, taskID, runID platform.ID) (*taskmodel.Run, error)
- func (tcs *TaskControlService) ManualRuns(ctx context.Context, taskID platform.ID) ([]*taskmodel.Run, error)
- func (tcs *TaskControlService) StartManualRun(ctx context.Context, taskID, runID platform.ID) (*taskmodel.Run, error)
- func (tcs *TaskControlService) UpdateRunState(ctx context.Context, taskID, runID platform.ID, when time.Time, ...) error
- type TaskService
- func (s *TaskService) CancelRun(ctx context.Context, taskID, runID platform.ID) error
- func (s *TaskService) CreateTask(ctx context.Context, t taskmodel.TaskCreate) (*taskmodel.Task, error)
- func (s *TaskService) DeleteTask(ctx context.Context, id platform.ID) error
- func (s *TaskService) FindLogs(ctx context.Context, filter taskmodel.LogFilter) ([]*taskmodel.Log, int, error)
- func (s *TaskService) FindRunByID(ctx context.Context, taskID, runID platform.ID) (*taskmodel.Run, error)
- func (s *TaskService) FindRuns(ctx context.Context, filter taskmodel.RunFilter) ([]*taskmodel.Run, int, error)
- func (s *TaskService) FindTaskByID(ctx context.Context, id platform.ID) (*taskmodel.Task, error)
- func (s *TaskService) FindTasks(ctx context.Context, filter taskmodel.TaskFilter) ([]*taskmodel.Task, int, error)
- func (s *TaskService) ForceRun(ctx context.Context, taskID platform.ID, scheduledFor int64) (*taskmodel.Run, error)
- func (s *TaskService) RetryRun(ctx context.Context, taskID, runID platform.ID) (*taskmodel.Run, error)
- func (s *TaskService) UpdateTask(ctx context.Context, id platform.ID, upd taskmodel.TaskUpdate) (*taskmodel.Task, error)
- type TelegrafConfigStore
- func (s *TelegrafConfigStore) CreateTelegrafConfig(ctx context.Context, tc *platform.TelegrafConfig, userID platform2.ID) error
- func (s *TelegrafConfigStore) DeleteTelegrafConfig(ctx context.Context, id platform2.ID) error
- func (s *TelegrafConfigStore) FindTelegrafConfigByID(ctx context.Context, id platform2.ID) (*platform.TelegrafConfig, error)
- func (s *TelegrafConfigStore) FindTelegrafConfigs(ctx context.Context, filter platform.TelegrafConfigFilter, ...) ([]*platform.TelegrafConfig, int, error)
- func (s *TelegrafConfigStore) UpdateTelegrafConfig(ctx context.Context, id platform2.ID, tc *platform.TelegrafConfig, ...) (*platform.TelegrafConfig, error)
- type TimeGenerator
- type TokenGenerator
- type Tx
- type UserOperationLogService
- type UserResourceMappingService
- func (s *UserResourceMappingService) CreateUserResourceMapping(ctx context.Context, m *platform.UserResourceMapping) error
- func (s *UserResourceMappingService) DeleteUserResourceMapping(ctx context.Context, resourceID platform2.ID, userID platform2.ID) error
- func (s *UserResourceMappingService) FindUserResourceMappings(ctx context.Context, filter platform.UserResourceMappingFilter, ...) ([]*platform.UserResourceMapping, int, error)
- type UserService
- func (s *UserService) CreateUser(ctx context.Context, User *platform.User) error
- func (s *UserService) DeleteUser(ctx context.Context, id platform2.ID) error
- func (s *UserService) FindPermissionForUser(ctx context.Context, uid platform2.ID) (platform.PermissionSet, error)
- func (s *UserService) FindUser(ctx context.Context, filter platform.UserFilter) (*platform.User, error)
- func (s *UserService) FindUserByID(ctx context.Context, id platform2.ID) (*platform.User, error)
- func (s *UserService) FindUsers(ctx context.Context, filter platform.UserFilter, opts ...platform.FindOptions) ([]*platform.User, int, error)
- func (s *UserService) UpdateUser(ctx context.Context, id platform2.ID, upd platform.UserUpdate) (*platform.User, error)
- type VariableService
- func (s *VariableService) CreateVariable(ctx context.Context, variable *influxdb.Variable) error
- func (s *VariableService) DeleteVariable(ctx context.Context, id platform.ID) error
- func (s *VariableService) FindVariableByID(ctx context.Context, id platform.ID) (*influxdb.Variable, error)
- func (s *VariableService) FindVariables(ctx context.Context, filter influxdb.VariableFilter, ...) ([]*influxdb.Variable, error)
- func (s *VariableService) ReplaceVariable(ctx context.Context, variable *influxdb.Variable) error
- func (s *VariableService) UpdateVariable(ctx context.Context, id platform.ID, update *influxdb.VariableUpdate) (*influxdb.Variable, error)
- type WriteService
Constants ¶
const FirstMockID int = 65536
Variables ¶
This section is empty.
Functions ¶
func SetIDForFunc ¶
func SetIDForFunc(gen *platform.IDGenerator, id platform.ID, fn func())
SetIDForFunc replaces the id generator at the end of the pointer with one which returns the provided id. It then invokes the provided function before restoring the original value at the end of the pointer.
Types ¶
type AuthorizationService ¶
type AuthorizationService struct { // Methods for a retention.AuthorizationService OpenFn func() error CloseFn func() error // Methods for an platform.AuthorizationService FindAuthorizationByIDFn func(context.Context, platform2.ID) (*platform.Authorization, error) FindAuthorizationByTokenFn func(context.Context, string) (*platform.Authorization, error) FindAuthorizationsFn func(context.Context, platform.AuthorizationFilter, ...platform.FindOptions) ([]*platform.Authorization, int, error) CreateAuthorizationFn func(context.Context, *platform.Authorization) error DeleteAuthorizationFn func(context.Context, platform2.ID) error UpdateAuthorizationFn func(context.Context, platform2.ID, *platform.AuthorizationUpdate) (*platform.Authorization, error) }
AuthorizationService is a mock implementation of a retention.AuthorizationService, which also makes it a suitable mock to use wherever an platform.AuthorizationService is required.
func NewAuthorizationService ¶
func NewAuthorizationService() *AuthorizationService
NewAuthorizationService returns a mock AuthorizationService where its methods will return zero values.
func (*AuthorizationService) CreateAuthorization ¶
func (s *AuthorizationService) CreateAuthorization(ctx context.Context, authorization *platform.Authorization) error
CreateAuthorization creates a new authorization and sets b.ID with the new identifier.
func (*AuthorizationService) DeleteAuthorization ¶
DeleteAuthorization removes a authorization by ID.
func (*AuthorizationService) FindAuthorizationByID ¶
func (s *AuthorizationService) FindAuthorizationByID(ctx context.Context, id platform2.ID) (*platform.Authorization, error)
FindAuthorizationByID returns a single authorization by ID.
func (*AuthorizationService) FindAuthorizationByToken ¶
func (s *AuthorizationService) FindAuthorizationByToken(ctx context.Context, t string) (*platform.Authorization, error)
func (*AuthorizationService) FindAuthorizations ¶
func (s *AuthorizationService) FindAuthorizations(ctx context.Context, filter platform.AuthorizationFilter, opts ...platform.FindOptions) ([]*platform.Authorization, int, error)
FindAuthorizations returns a list of authorizations that match filter and the total count of matching authorizations.
func (*AuthorizationService) UpdateAuthorization ¶
func (s *AuthorizationService) UpdateAuthorization(ctx context.Context, id platform2.ID, upd *platform.AuthorizationUpdate) (*platform.Authorization, error)
UpdateAuthorization updates the status and description if available.
type Authorizer ¶
type Authorizer struct { Permissions []influxdb.Permission AllowAll bool UserID platform.ID }
Authorizer is an Authorizer for testing that can allow everything or use specific permissions
func NewMockAuthorizer ¶
func NewMockAuthorizer(allowAll bool, permissions []influxdb.Permission) *Authorizer
func (*Authorizer) GetUserID ¶
func (a *Authorizer) GetUserID() platform.ID
func (*Authorizer) Identifier ¶
func (a *Authorizer) Identifier() platform.ID
func (Authorizer) Kind ¶
func (Authorizer) Kind() string
func (*Authorizer) PermissionSet ¶
func (a *Authorizer) PermissionSet() (influxdb.PermissionSet, error)
type AuthorizerV1 ¶
type Bucket ¶
type Bucket struct { GetFn func(key []byte) ([]byte, error) GetBatchFn func(keys ...[]byte) ([][]byte, error) CursorFn func() (kv.Cursor, error) PutFn func(key, value []byte) error DeleteFn func(key []byte) error ForwardCursorFn func([]byte, ...kv.CursorOption) kv.ForwardCursor }
Bucket is the abstraction used to perform get/put/delete/get-many operations in a key value store
func (*Bucket) ForwardCursor ¶
func (b *Bucket) ForwardCursor(seek []byte, opts ...kv.CursorOption) (kv.ForwardCursor, error)
ForwardCursor returns a cursor from the seek points in the configured direction.
type BucketLookup ¶
type BucketLookup struct{}
BucketLookup implements the BucketLookup interface needed by flux "from" and "to".
func (BucketLookup) LookupName ¶
type BucketOperationLogService ¶
type BucketOperationLogService struct {
GetBucketOperationLogFn func(context.Context, platform2.ID, platform.FindOptions) ([]*platform.OperationLogEntry, int, error)
}
BucketOperationLogService is a mock implementation of platform.BucketOperationLogService.
func NewBucketOperationLogService ¶
func NewBucketOperationLogService() *BucketOperationLogService
NewBucketOperationLogService returns a mock of BucketOperationLogService.
func (*BucketOperationLogService) GetBucketOperationLog ¶
func (s *BucketOperationLogService) GetBucketOperationLog(ctx context.Context, id platform2.ID, opts platform.FindOptions) ([]*platform.OperationLogEntry, int, error)
GetBucketOperationLog retrieves the operation log for the bucket with the provided id.
type BucketService ¶
type BucketService struct { // Methods for a retention.BucketService OpenFn func() error CloseFn func() error // Methods for an platform.BucketService FindBucketByIDFn func(context.Context, platform2.ID) (*platform.Bucket, error) FindBucketByIDCalls SafeCount FindBucketByNameFn func(context.Context, platform2.ID, string) (*platform.Bucket, error) FindBucketByNameCalls SafeCount FindBucketFn func(context.Context, platform.BucketFilter) (*platform.Bucket, error) FindBucketCalls SafeCount FindBucketsFn func(context.Context, platform.BucketFilter, ...platform.FindOptions) ([]*platform.Bucket, int, error) FindBucketsCalls SafeCount CreateBucketFn func(context.Context, *platform.Bucket) error CreateBucketCalls SafeCount UpdateBucketFn func(context.Context, platform2.ID, platform.BucketUpdate) (*platform.Bucket, error) UpdateBucketCalls SafeCount DeleteBucketFn func(context.Context, platform2.ID) error DeleteBucketCalls SafeCount }
BucketService is a mock implementation of a retention.BucketService, which also makes it a suitable mock to use wherever an platform.BucketService is required.
func NewBucketService ¶
func NewBucketService() *BucketService
NewBucketService returns a mock BucketService where its methods will return zero values.
func (*BucketService) CreateBucket ¶
CreateBucket creates a new bucket and sets b.ID with the new identifier.
func (*BucketService) DeleteBucket ¶
DeleteBucket removes a bucket by ID.
func (*BucketService) FindBucket ¶
func (s *BucketService) FindBucket(ctx context.Context, filter platform.BucketFilter) (*platform.Bucket, error)
FindBucket returns the first bucket that matches filter.
func (*BucketService) FindBucketByID ¶
func (s *BucketService) FindBucketByID(ctx context.Context, id platform2.ID) (*platform.Bucket, error)
FindBucketByID returns a single bucket by ID.
func (*BucketService) FindBucketByName ¶
func (s *BucketService) FindBucketByName(ctx context.Context, orgID platform2.ID, name string) (*platform.Bucket, error)
FindBucketByName returns a single bucket by name.
func (*BucketService) FindBuckets ¶
func (s *BucketService) FindBuckets(ctx context.Context, filter platform.BucketFilter, opts ...platform.FindOptions) ([]*platform.Bucket, int, error)
FindBuckets returns a list of buckets that match filter and the total count of matching buckets.
func (*BucketService) UpdateBucket ¶
func (s *BucketService) UpdateBucket(ctx context.Context, id platform2.ID, upd platform.BucketUpdate) (*platform.Bucket, error)
UpdateBucket updates a single bucket with changeset.
type CheckService ¶
type CheckService struct { OrganizationService UserResourceMappingService // Methods for an influxdb.CheckService FindCheckByIDFn func(context.Context, platform.ID) (influxdb.Check, error) FindCheckByIDCalls SafeCount FindCheckFn func(context.Context, influxdb.CheckFilter) (influxdb.Check, error) FindCheckCalls SafeCount FindChecksFn func(context.Context, influxdb.CheckFilter, ...influxdb.FindOptions) ([]influxdb.Check, int, error) FindChecksCalls SafeCount CreateCheckFn func(context.Context, influxdb.CheckCreate, platform.ID) error CreateCheckCalls SafeCount UpdateCheckFn func(context.Context, platform.ID, influxdb.CheckCreate) (influxdb.Check, error) UpdateCheckCalls SafeCount PatchCheckFn func(context.Context, platform.ID, influxdb.CheckUpdate) (influxdb.Check, error) PatchCheckCalls SafeCount DeleteCheckFn func(context.Context, platform.ID) error DeleteCheckCalls SafeCount }
CheckService is a mock implementation of a retention.CheckService, which also makes it a suitable mock to use wherever an influxdb.CheckService is required.
func NewCheckService ¶
func NewCheckService() *CheckService
NewCheckService returns a mock CheckService where its methods will return zero values.
func (*CheckService) CreateCheck ¶
func (s *CheckService) CreateCheck(ctx context.Context, check influxdb.CheckCreate, userID platform.ID) error
CreateCheck creates a new check and sets b.ID with the new identifier.
func (*CheckService) DeleteCheck ¶
DeleteCheck removes a check by ID.
func (*CheckService) FindCheck ¶
func (s *CheckService) FindCheck(ctx context.Context, filter influxdb.CheckFilter) (influxdb.Check, error)
FindCheck returns the first check that matches filter.
func (*CheckService) FindCheckByID ¶
FindCheckByID returns a single check by ID.
func (*CheckService) FindChecks ¶
func (s *CheckService) FindChecks(ctx context.Context, filter influxdb.CheckFilter, opts ...influxdb.FindOptions) ([]influxdb.Check, int, error)
FindChecks returns a list of checks that match filter and the total count of matching checks.
func (*CheckService) PatchCheck ¶
func (s *CheckService) PatchCheck(ctx context.Context, id platform.ID, upd influxdb.CheckUpdate) (influxdb.Check, error)
PatchCheck updates a single check with changeset.
func (*CheckService) UpdateCheck ¶
func (s *CheckService) UpdateCheck(ctx context.Context, id platform.ID, chk influxdb.CheckCreate) (influxdb.Check, error)
UpdateCheck updates everything except id orgID.
type Cursor ¶
type Cursor struct { SeekFn func(prefix []byte) (k []byte, v []byte) FirstFn func() (k []byte, v []byte) LastFn func() (k []byte, v []byte) NextFn func() (k []byte, v []byte) PrevFn func() (k []byte, v []byte) }
Cursor is an abstraction for iterating/ranging through data. A concrete implementation of a cursor can be found in cursor.go.
type DBRPMappingService ¶
type DBRPMappingService struct { FindByIDFn func(ctx context.Context, orgID, id platform.ID) (*influxdb.DBRPMapping, error) FindManyFn func(ctx context.Context, dbrp influxdb.DBRPMappingFilter, opts ...influxdb.FindOptions) ([]*influxdb.DBRPMapping, int, error) CreateFn func(ctx context.Context, dbrp *influxdb.DBRPMapping) error UpdateFn func(ctx context.Context, dbrp *influxdb.DBRPMapping) error DeleteFn func(ctx context.Context, orgID, id platform.ID) error }
func (*DBRPMappingService) Create ¶
func (s *DBRPMappingService) Create(ctx context.Context, dbrp *influxdb.DBRPMapping) error
type DashboardOperationLogService ¶
type DashboardOperationLogService struct {
GetDashboardOperationLogFn func(context.Context, platform2.ID, platform.FindOptions) ([]*platform.OperationLogEntry, int, error)
}
DashboardOperationLogService is a mock implementation of platform.DashboardOperationLogService.
func NewDashboardOperationLogService ¶
func NewDashboardOperationLogService() *DashboardOperationLogService
NewDashboardOperationLogService returns a mock of DashboardOperationLogService.
func (*DashboardOperationLogService) GetDashboardOperationLog ¶
func (s *DashboardOperationLogService) GetDashboardOperationLog(ctx context.Context, id platform2.ID, opts platform.FindOptions) ([]*platform.OperationLogEntry, int, error)
GetDashboardOperationLog retrieves the operation log for the dashboard with the provided id.
type DashboardService ¶
type DashboardService struct { CreateDashboardF func(context.Context, *platform.Dashboard) error CreateDashboardCalls SafeCount FindDashboardByIDF func(context.Context, platform2.ID) (*platform.Dashboard, error) FindDashboardByIDCalls SafeCount FindDashboardsF func(context.Context, platform.DashboardFilter, platform.FindOptions) ([]*platform.Dashboard, int, error) FindDashboardsCalls SafeCount UpdateDashboardF func(context.Context, platform2.ID, platform.DashboardUpdate) (*platform.Dashboard, error) UpdateDashboardCalls SafeCount DeleteDashboardF func(context.Context, platform2.ID) error DeleteDashboardCalls SafeCount AddDashboardCellF func(ctx context.Context, id platform2.ID, c *platform.Cell, opts platform.AddDashboardCellOptions) error AddDashboardCellCalls SafeCount RemoveDashboardCellF func(ctx context.Context, dashboardID platform2.ID, cellID platform2.ID) error RemoveDashboardCellCalls SafeCount GetDashboardCellViewF func(ctx context.Context, dashboardID platform2.ID, cellID platform2.ID) (*platform.View, error) GetDashboardCellViewCalls SafeCount UpdateDashboardCellViewF func(ctx context.Context, dashboardID platform2.ID, cellID platform2.ID, upd platform.ViewUpdate) (*platform.View, error) UpdateDashboardCellViewCalls SafeCount UpdateDashboardCellF func(ctx context.Context, dashboardID platform2.ID, cellID platform2.ID, upd platform.CellUpdate) (*platform.Cell, error) UpdateDashboardCellCalls SafeCount CopyDashboardCellF func(ctx context.Context, dashboardID platform2.ID, cellID platform2.ID) (*platform.Cell, error) CopyDashboardCellCalls SafeCount ReplaceDashboardCellsF func(ctx context.Context, id platform2.ID, cs []*platform.Cell) error ReplaceDashboardCellsCalls SafeCount }
func NewDashboardService ¶
func NewDashboardService() *DashboardService
NewDashboardService returns a mock of DashboardService where its methods will return zero values.
func (*DashboardService) AddDashboardCell ¶
func (s *DashboardService) AddDashboardCell(ctx context.Context, id platform2.ID, c *platform.Cell, opts platform.AddDashboardCellOptions) error
func (*DashboardService) CopyDashboardCell ¶
func (*DashboardService) CreateDashboard ¶
func (*DashboardService) DeleteDashboard ¶
func (*DashboardService) FindDashboardByID ¶
func (*DashboardService) FindDashboards ¶
func (s *DashboardService) FindDashboards(ctx context.Context, filter platform.DashboardFilter, opts platform.FindOptions) ([]*platform.Dashboard, int, error)
func (*DashboardService) GetDashboardCellView ¶
func (*DashboardService) RemoveDashboardCell ¶
func (*DashboardService) ReplaceDashboardCells ¶
func (*DashboardService) UpdateDashboard ¶
func (s *DashboardService) UpdateDashboard(ctx context.Context, id platform2.ID, upd platform.DashboardUpdate) (*platform.Dashboard, error)
func (*DashboardService) UpdateDashboardCell ¶
func (*DashboardService) UpdateDashboardCellView ¶
func (s *DashboardService) UpdateDashboardCellView(ctx context.Context, dashboardID, cellID platform2.ID, upd platform.ViewUpdate) (*platform.View, error)
type DeleteService ¶
type DeleteService struct {
DeleteBucketRangePredicateF func(tx context.Context, orgID, bucketID platform.ID, min, max int64, pred influxdb.Predicate, measurement influxql.Expr) error
}
DeleteService is a mock delete server.
func NewDeleteService ¶
func NewDeleteService() DeleteService
NewDeleteService returns a mock DeleteService where its methods will return zero values.
type DocumentService ¶
type DocumentService struct { CreateDocumentStoreFn func(ctx context.Context, name string) (influxdb.DocumentStore, error) FindDocumentStoreFn func(ctx context.Context, name string) (influxdb.DocumentStore, error) }
DocumentService is mocked document service.
func NewDocumentService ¶
func NewDocumentService() *DocumentService
NewDocumentService returns a mock of DocumentService where its methods will return zero values.
func (*DocumentService) CreateDocumentStore ¶
func (s *DocumentService) CreateDocumentStore(ctx context.Context, name string) (influxdb.DocumentStore, error)
CreateDocumentStore calls the mocked CreateDocumentStoreFn.
func (*DocumentService) FindDocumentStore ¶
func (s *DocumentService) FindDocumentStore(ctx context.Context, name string) (influxdb.DocumentStore, error)
FindDocumentStore calls the mocked FindDocumentStoreFn.
type DocumentStore ¶
type DocumentStore struct { TimeGenerator TimeGenerator CreateDocumentFn func(ctx context.Context, d *influxdb.Document) error FindDocumentFn func(ctx context.Context, id platform.ID) (*influxdb.Document, error) FindDocumentsFn func(ctx context.Context, oid platform.ID) ([]*influxdb.Document, error) }
DocumentStore is the mocked document store.
func NewDocumentStore ¶
func NewDocumentStore() *DocumentStore
NewDocumentStore returns a mock of DocumentStore where its methods will return zero values.
func (*DocumentStore) CreateDocument ¶
func (s *DocumentStore) CreateDocument(ctx context.Context, d *influxdb.Document) error
CreateDocument will call the mocked CreateDocumentFn.
func (*DocumentStore) FindDocument ¶
func (s *DocumentStore) FindDocument(ctx context.Context, id platform.ID) (*influxdb.Document, error)
FindDocument will call the mocked FindDocumentFn.
func (*DocumentStore) FindDocuments ¶
func (s *DocumentStore) FindDocuments(ctx context.Context, oid platform.ID) ([]*influxdb.Document, error)
FindDocuments will call the mocked FindDocumentsFn.
type Flagger ¶
type Flagger struct {
// contains filtered or unexported fields
}
Flagger is a mock.
func NewFlagger ¶
NewFlagger returns a mock Flagger.
type GeneratorOptionFn ¶
type GeneratorOptionFn func(*GeneratorResultSet)
func WithGeneratorMaxValues ¶
func WithGeneratorMaxValues(n int) GeneratorOptionFn
WithGeneratorMaxValues limits the number of values produced by GeneratorResultSet to n.
type GeneratorResultSet ¶
type GeneratorResultSet struct {
// contains filtered or unexported fields
}
func NewResultSetFromSeriesGenerator ¶
func NewResultSetFromSeriesGenerator(sg gen.SeriesGenerator, opts ...GeneratorOptionFn) *GeneratorResultSet
NewResultSetFromSeriesGenerator transforms a SeriesGenerator into a ResultSet, and therefore may be used anywhere a ResultSet is required.
func (*GeneratorResultSet) Close ¶
func (g *GeneratorResultSet) Close()
func (*GeneratorResultSet) Cursor ¶
func (g *GeneratorResultSet) Cursor() cursors.Cursor
func (*GeneratorResultSet) Err ¶
func (g *GeneratorResultSet) Err() error
func (*GeneratorResultSet) Next ¶
func (g *GeneratorResultSet) Next() bool
func (*GeneratorResultSet) Stats ¶
func (g *GeneratorResultSet) Stats() cursors.CursorStats
func (*GeneratorResultSet) Tags ¶
func (g *GeneratorResultSet) Tags() models.Tags
type IDGenerator ¶
IDGenerator is mock implementation of influxdb.IDGenerator.
func NewIDGenerator ¶
func NewIDGenerator(s string, t *testing.T) IDGenerator
NewIDGenerator is a simple way to create immutable id generator
func NewIncrementingIDGenerator ¶
func NewIncrementingIDGenerator(start platform.ID) IDGenerator
NewIncrementingIDGenerator returns an ID generator which starts at the provided ID and increments on each call to ID().
func NewStaticIDGenerator ¶
func NewStaticIDGenerator(id platform.ID) IDGenerator
NewStaticIDGenerator returns an IDGenerator which produces the ID provided to this function on a call to ID().
func (IDGenerator) ID ¶
func (g IDGenerator) ID() platform.ID
ID generates a new influxdb.ID from a mock function.
type LabelService ¶
type LabelService struct { CreateLabelFn func(context.Context, *platform.Label) error CreateLabelCalls SafeCount DeleteLabelFn func(context.Context, platform2.ID) error DeleteLabelCalls SafeCount FindLabelByIDFn func(ctx context.Context, id platform2.ID) (*platform.Label, error) FindLabelByIDCalls SafeCount FindLabelsFn func(context.Context, platform.LabelFilter) ([]*platform.Label, error) FindLabelsCalls SafeCount FindResourceLabelsFn func(context.Context, platform.LabelMappingFilter) ([]*platform.Label, error) FindResourceLabelsCalls SafeCount UpdateLabelFn func(context.Context, platform2.ID, platform.LabelUpdate) (*platform.Label, error) UpdateLabelCalls SafeCount CreateLabelMappingFn func(context.Context, *platform.LabelMapping) error CreateLabelMappingCalls SafeCount DeleteLabelMappingFn func(context.Context, *platform.LabelMapping) error DeleteLabelMappingCalls SafeCount }
LabelService is a mock implementation of platform.LabelService
func NewLabelService ¶
func NewLabelService() *LabelService
NewLabelService returns a mock of LabelService where its methods will return zero values.
func (*LabelService) CreateLabel ¶
CreateLabel creates a new Label.
func (*LabelService) CreateLabelMapping ¶
func (s *LabelService) CreateLabelMapping(ctx context.Context, m *platform.LabelMapping) error
CreateLabelMapping creates a new Label mapping.
func (*LabelService) DeleteLabel ¶
DeleteLabel removes a Label.
func (*LabelService) DeleteLabelMapping ¶
func (s *LabelService) DeleteLabelMapping(ctx context.Context, m *platform.LabelMapping) error
DeleteLabelMapping removes a Label mapping.
func (*LabelService) FindLabelByID ¶
FindLabelByID finds mappings by their ID
func (*LabelService) FindLabels ¶
func (s *LabelService) FindLabels(ctx context.Context, filter platform.LabelFilter, opt ...platform.FindOptions) ([]*platform.Label, error)
FindLabels finds mappings that match a given filter.
func (*LabelService) FindResourceLabels ¶
func (s *LabelService) FindResourceLabels(ctx context.Context, filter platform.LabelMappingFilter) ([]*platform.Label, error)
FindResourceLabels finds mappings that match a given filter.
func (*LabelService) UpdateLabel ¶
func (s *LabelService) UpdateLabel(ctx context.Context, id platform2.ID, upd platform.LabelUpdate) (*platform.Label, error)
UpdateLabel updates a label.
type LookupService ¶
type LookupService struct {
NameFn func(ctx context.Context, resource platform.ResourceType, id platform2.ID) (string, error)
}
LookupService provides field lookup for the resource and ID.
func NewLookupService ¶
func NewLookupService() *LookupService
NewLookupService returns a mock of LookupService where its methods will return zero values.
func (*LookupService) FindResourceName ¶
func (s *LookupService) FindResourceName(ctx context.Context, resource platform.ResourceType, id platform2.ID) (string, error)
FindResourceName returns the name for the resource and ID.
type MockAnnotationService ¶ added in v2.1.0
type MockAnnotationService struct {
// contains filtered or unexported fields
}
MockAnnotationService is a mock of AnnotationService interface
func NewMockAnnotationService ¶ added in v2.1.0
func NewMockAnnotationService(ctrl *gomock.Controller) *MockAnnotationService
NewMockAnnotationService creates a new mock instance
func (*MockAnnotationService) CreateAnnotations ¶ added in v2.1.0
func (m *MockAnnotationService) CreateAnnotations(ctx context.Context, orgID platform.ID, create []influxdb.AnnotationCreate) ([]influxdb.AnnotationEvent, error)
CreateAnnotations mocks base method
func (*MockAnnotationService) CreateOrUpdateStream ¶ added in v2.1.0
func (m *MockAnnotationService) CreateOrUpdateStream(ctx context.Context, orgID platform.ID, stream influxdb.Stream) (*influxdb.ReadStream, error)
CreateOrUpdateStream mocks base method
func (*MockAnnotationService) DeleteAnnotation ¶ added in v2.1.0
DeleteAnnotation mocks base method
func (*MockAnnotationService) DeleteAnnotations ¶ added in v2.1.0
func (m *MockAnnotationService) DeleteAnnotations(ctx context.Context, orgID platform.ID, delete influxdb.AnnotationDeleteFilter) error
DeleteAnnotations mocks base method
func (*MockAnnotationService) DeleteStreamByID ¶ added in v2.1.0
DeleteStreamByID mocks base method
func (*MockAnnotationService) DeleteStreams ¶ added in v2.1.0
func (m *MockAnnotationService) DeleteStreams(ctx context.Context, orgID platform.ID, delete influxdb.BasicStream) error
DeleteStreams mocks base method
func (*MockAnnotationService) EXPECT ¶ added in v2.1.0
func (m *MockAnnotationService) EXPECT() *MockAnnotationServiceMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockAnnotationService) GetAnnotation ¶ added in v2.1.0
func (m *MockAnnotationService) GetAnnotation(ctx context.Context, id platform.ID) (*influxdb.StoredAnnotation, error)
GetAnnotation mocks base method
func (*MockAnnotationService) GetStream ¶ added in v2.1.0
func (m *MockAnnotationService) GetStream(ctx context.Context, id platform.ID) (*influxdb.StoredStream, error)
GetStream mocks base method
func (*MockAnnotationService) ListAnnotations ¶ added in v2.1.0
func (m *MockAnnotationService) ListAnnotations(ctx context.Context, orgID platform.ID, filter influxdb.AnnotationListFilter) ([]influxdb.StoredAnnotation, error)
ListAnnotations mocks base method
func (*MockAnnotationService) ListStreams ¶ added in v2.1.0
func (m *MockAnnotationService) ListStreams(ctx context.Context, orgID platform.ID, filter influxdb.StreamListFilter) ([]influxdb.StoredStream, error)
ListStreams mocks base method
func (*MockAnnotationService) UpdateAnnotation ¶ added in v2.1.0
func (m *MockAnnotationService) UpdateAnnotation(ctx context.Context, id platform.ID, update influxdb.AnnotationCreate) (*influxdb.AnnotationEvent, error)
UpdateAnnotation mocks base method
func (*MockAnnotationService) UpdateStream ¶ added in v2.1.0
func (m *MockAnnotationService) UpdateStream(ctx context.Context, id platform.ID, stream influxdb.Stream) (*influxdb.ReadStream, error)
UpdateStream mocks base method
type MockAnnotationServiceMockRecorder ¶ added in v2.1.0
type MockAnnotationServiceMockRecorder struct {
// contains filtered or unexported fields
}
MockAnnotationServiceMockRecorder is the mock recorder for MockAnnotationService
func (*MockAnnotationServiceMockRecorder) CreateAnnotations ¶ added in v2.1.0
func (mr *MockAnnotationServiceMockRecorder) CreateAnnotations(ctx, orgID, create interface{}) *gomock.Call
CreateAnnotations indicates an expected call of CreateAnnotations
func (*MockAnnotationServiceMockRecorder) CreateOrUpdateStream ¶ added in v2.1.0
func (mr *MockAnnotationServiceMockRecorder) CreateOrUpdateStream(ctx, orgID, stream interface{}) *gomock.Call
CreateOrUpdateStream indicates an expected call of CreateOrUpdateStream
func (*MockAnnotationServiceMockRecorder) DeleteAnnotation ¶ added in v2.1.0
func (mr *MockAnnotationServiceMockRecorder) DeleteAnnotation(ctx, id interface{}) *gomock.Call
DeleteAnnotation indicates an expected call of DeleteAnnotation
func (*MockAnnotationServiceMockRecorder) DeleteAnnotations ¶ added in v2.1.0
func (mr *MockAnnotationServiceMockRecorder) DeleteAnnotations(ctx, orgID, delete interface{}) *gomock.Call
DeleteAnnotations indicates an expected call of DeleteAnnotations
func (*MockAnnotationServiceMockRecorder) DeleteStreamByID ¶ added in v2.1.0
func (mr *MockAnnotationServiceMockRecorder) DeleteStreamByID(ctx, id interface{}) *gomock.Call
DeleteStreamByID indicates an expected call of DeleteStreamByID
func (*MockAnnotationServiceMockRecorder) DeleteStreams ¶ added in v2.1.0
func (mr *MockAnnotationServiceMockRecorder) DeleteStreams(ctx, orgID, delete interface{}) *gomock.Call
DeleteStreams indicates an expected call of DeleteStreams
func (*MockAnnotationServiceMockRecorder) GetAnnotation ¶ added in v2.1.0
func (mr *MockAnnotationServiceMockRecorder) GetAnnotation(ctx, id interface{}) *gomock.Call
GetAnnotation indicates an expected call of GetAnnotation
func (*MockAnnotationServiceMockRecorder) GetStream ¶ added in v2.1.0
func (mr *MockAnnotationServiceMockRecorder) GetStream(ctx, id interface{}) *gomock.Call
GetStream indicates an expected call of GetStream
func (*MockAnnotationServiceMockRecorder) ListAnnotations ¶ added in v2.1.0
func (mr *MockAnnotationServiceMockRecorder) ListAnnotations(ctx, orgID, filter interface{}) *gomock.Call
ListAnnotations indicates an expected call of ListAnnotations
func (*MockAnnotationServiceMockRecorder) ListStreams ¶ added in v2.1.0
func (mr *MockAnnotationServiceMockRecorder) ListStreams(ctx, orgID, filter interface{}) *gomock.Call
ListStreams indicates an expected call of ListStreams
func (*MockAnnotationServiceMockRecorder) UpdateAnnotation ¶ added in v2.1.0
func (mr *MockAnnotationServiceMockRecorder) UpdateAnnotation(ctx, id, update interface{}) *gomock.Call
UpdateAnnotation indicates an expected call of UpdateAnnotation
func (*MockAnnotationServiceMockRecorder) UpdateStream ¶ added in v2.1.0
func (mr *MockAnnotationServiceMockRecorder) UpdateStream(ctx, id, stream interface{}) *gomock.Call
UpdateStream indicates an expected call of UpdateStream
type MockBackupService ¶ added in v2.1.0
type MockBackupService struct {
// contains filtered or unexported fields
}
MockBackupService is a mock of BackupService interface.
func NewMockBackupService ¶ added in v2.1.0
func NewMockBackupService(ctrl *gomock.Controller) *MockBackupService
NewMockBackupService creates a new mock instance.
func (*MockBackupService) BackupKVStore ¶ added in v2.1.0
BackupKVStore mocks base method.
func (*MockBackupService) BackupShard ¶ added in v2.1.0
func (m *MockBackupService) BackupShard(ctx context.Context, w io.Writer, shardID uint64, since time.Time) error
BackupShard mocks base method.
func (*MockBackupService) EXPECT ¶ added in v2.1.0
func (m *MockBackupService) EXPECT() *MockBackupServiceMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockBackupService) RLockKVStore ¶ added in v2.1.0
func (m *MockBackupService) RLockKVStore()
LockKVStore mocks base method.
func (*MockBackupService) RUnlockKVStore ¶ added in v2.1.0
func (m *MockBackupService) RUnlockKVStore()
UnlockKVStore mocks base method.
type MockBackupServiceMockRecorder ¶ added in v2.1.0
type MockBackupServiceMockRecorder struct {
// contains filtered or unexported fields
}
MockBackupServiceMockRecorder is the mock recorder for MockBackupService.
func (*MockBackupServiceMockRecorder) BackupKVStore ¶ added in v2.1.0
func (mr *MockBackupServiceMockRecorder) BackupKVStore(ctx, w interface{}) *gomock.Call
BackupKVStore indicates an expected call of BackupKVStore.
func (*MockBackupServiceMockRecorder) BackupShard ¶ added in v2.1.0
func (mr *MockBackupServiceMockRecorder) BackupShard(ctx, w, shardID, since interface{}) *gomock.Call
BackupShard indicates an expected call of BackupShard.
func (*MockBackupServiceMockRecorder) RLockKVStore ¶ added in v2.1.0
func (mr *MockBackupServiceMockRecorder) RLockKVStore() *gomock.Call
LockKVStore indicates an expected call of LockKVStore.
func (*MockBackupServiceMockRecorder) UnlockKVStore ¶ added in v2.1.0
func (mr *MockBackupServiceMockRecorder) UnlockKVStore() *gomock.Call
UnlockKVStore indicates an expected call of UnlockKVStore.
type MockBucketManifestWriter ¶ added in v2.1.0
type MockBucketManifestWriter struct {
// contains filtered or unexported fields
}
MockBucketManifestWriter is a mock of BucketManifestWriter interface.
func NewMockBucketManifestWriter ¶ added in v2.1.0
func NewMockBucketManifestWriter(ctrl *gomock.Controller) *MockBucketManifestWriter
NewMockBucketManifestWriter creates a new mock instance.
func (*MockBucketManifestWriter) EXPECT ¶ added in v2.1.0
func (m *MockBucketManifestWriter) EXPECT() *MockBucketManifestWriterMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockBucketManifestWriter) WriteManifest ¶ added in v2.1.0
WriteManifest mocks base method.
type MockBucketManifestWriterMockRecorder ¶ added in v2.1.0
type MockBucketManifestWriterMockRecorder struct {
// contains filtered or unexported fields
}
MockBucketManifestWriterMockRecorder is the mock recorder for MockBucketManifestWriter.
func (*MockBucketManifestWriterMockRecorder) WriteManifest ¶ added in v2.1.0
func (mr *MockBucketManifestWriterMockRecorder) WriteManifest(ctx, w interface{}) *gomock.Call
WriteManifest indicates an expected call of WriteManifest.
type MockIDGenerator ¶
func NewMockIDGenerator ¶
func NewMockIDGenerator() *MockIDGenerator
func (*MockIDGenerator) ID ¶
func (g *MockIDGenerator) ID() platform.ID
type MockNotebookService ¶ added in v2.1.0
type MockNotebookService struct {
// contains filtered or unexported fields
}
MockNotebookService is a mock of NotebookService interface.
func NewMockNotebookService ¶ added in v2.1.0
func NewMockNotebookService(ctrl *gomock.Controller) *MockNotebookService
NewMockNotebookService creates a new mock instance.
func (*MockNotebookService) CreateNotebook ¶ added in v2.1.0
func (m *MockNotebookService) CreateNotebook(ctx context.Context, create *influxdb.NotebookReqBody) (*influxdb.Notebook, error)
CreateNotebook mocks base method.
func (*MockNotebookService) DeleteNotebook ¶ added in v2.1.0
DeleteNotebook mocks base method.
func (*MockNotebookService) EXPECT ¶ added in v2.1.0
func (m *MockNotebookService) EXPECT() *MockNotebookServiceMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockNotebookService) GetNotebook ¶ added in v2.1.0
func (m *MockNotebookService) GetNotebook(ctx context.Context, id platform.ID) (*influxdb.Notebook, error)
GetNotebook mocks base method.
func (*MockNotebookService) ListNotebooks ¶ added in v2.1.0
func (m *MockNotebookService) ListNotebooks(ctx context.Context, filter influxdb.NotebookListFilter) ([]*influxdb.Notebook, error)
ListNotebooks mocks base method.
func (*MockNotebookService) UpdateNotebook ¶ added in v2.1.0
func (m *MockNotebookService) UpdateNotebook(ctx context.Context, id platform.ID, update *influxdb.NotebookReqBody) (*influxdb.Notebook, error)
UpdateNotebook mocks base method.
type MockNotebookServiceMockRecorder ¶ added in v2.1.0
type MockNotebookServiceMockRecorder struct {
// contains filtered or unexported fields
}
MockNotebookServiceMockRecorder is the mock recorder for MockNotebookService.
func (*MockNotebookServiceMockRecorder) CreateNotebook ¶ added in v2.1.0
func (mr *MockNotebookServiceMockRecorder) CreateNotebook(ctx, create interface{}) *gomock.Call
CreateNotebook indicates an expected call of CreateNotebook.
func (*MockNotebookServiceMockRecorder) DeleteNotebook ¶ added in v2.1.0
func (mr *MockNotebookServiceMockRecorder) DeleteNotebook(ctx, id interface{}) *gomock.Call
DeleteNotebook indicates an expected call of DeleteNotebook.
func (*MockNotebookServiceMockRecorder) GetNotebook ¶ added in v2.1.0
func (mr *MockNotebookServiceMockRecorder) GetNotebook(ctx, id interface{}) *gomock.Call
GetNotebook indicates an expected call of GetNotebook.
func (*MockNotebookServiceMockRecorder) ListNotebooks ¶ added in v2.1.0
func (mr *MockNotebookServiceMockRecorder) ListNotebooks(ctx, filter interface{}) *gomock.Call
ListNotebooks indicates an expected call of ListNotebooks.
func (*MockNotebookServiceMockRecorder) UpdateNotebook ¶ added in v2.1.0
func (mr *MockNotebookServiceMockRecorder) UpdateNotebook(ctx, id, update interface{}) *gomock.Call
UpdateNotebook indicates an expected call of UpdateNotebook.
type MockPasswordsService ¶
type MockPasswordsService struct {
// contains filtered or unexported fields
}
MockPasswordsService is a mock of PasswordsService interface
func NewMockPasswordsService ¶
func NewMockPasswordsService(ctrl *gomock.Controller) *MockPasswordsService
NewMockPasswordsService creates a new mock instance
func (*MockPasswordsService) CompareAndSetPassword ¶
func (m *MockPasswordsService) CompareAndSetPassword(arg0 context.Context, arg1 platform.ID, arg2, arg3 string) error
CompareAndSetPassword mocks base method
func (*MockPasswordsService) ComparePassword ¶
func (m *MockPasswordsService) ComparePassword(arg0 context.Context, arg1 platform.ID, arg2 string) error
ComparePassword mocks base method
func (*MockPasswordsService) EXPECT ¶
func (m *MockPasswordsService) EXPECT() *MockPasswordsServiceMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockPasswordsService) SetPassword ¶
func (m *MockPasswordsService) SetPassword(arg0 context.Context, arg1 platform.ID, arg2 string) error
SetPassword mocks base method
type MockPasswordsServiceMockRecorder ¶
type MockPasswordsServiceMockRecorder struct {
// contains filtered or unexported fields
}
MockPasswordsServiceMockRecorder is the mock recorder for MockPasswordsService
func (*MockPasswordsServiceMockRecorder) CompareAndSetPassword ¶
func (mr *MockPasswordsServiceMockRecorder) CompareAndSetPassword(arg0, arg1, arg2, arg3 interface{}) *gomock.Call
CompareAndSetPassword indicates an expected call of CompareAndSetPassword
func (*MockPasswordsServiceMockRecorder) ComparePassword ¶
func (mr *MockPasswordsServiceMockRecorder) ComparePassword(arg0, arg1, arg2 interface{}) *gomock.Call
ComparePassword indicates an expected call of ComparePassword
func (*MockPasswordsServiceMockRecorder) SetPassword ¶
func (mr *MockPasswordsServiceMockRecorder) SetPassword(arg0, arg1, arg2 interface{}) *gomock.Call
SetPassword indicates an expected call of SetPassword
type MockRestoreService ¶ added in v2.1.0
type MockRestoreService struct {
// contains filtered or unexported fields
}
MockRestoreService is a mock of RestoreService interface.
func NewMockRestoreService ¶ added in v2.1.0
func NewMockRestoreService(ctrl *gomock.Controller) *MockRestoreService
NewMockRestoreService creates a new mock instance.
func (*MockRestoreService) EXPECT ¶ added in v2.1.0
func (m *MockRestoreService) EXPECT() *MockRestoreServiceMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockRestoreService) RestoreBucket ¶ added in v2.1.0
func (m *MockRestoreService) RestoreBucket(ctx context.Context, id platform.ID, rpiData []byte) (map[uint64]uint64, error)
RestoreBucket mocks base method.
func (*MockRestoreService) RestoreKVStore ¶ added in v2.1.0
RestoreKVStore mocks base method.
func (*MockRestoreService) RestoreShard ¶ added in v2.1.0
RestoreShard mocks base method.
type MockRestoreServiceMockRecorder ¶ added in v2.1.0
type MockRestoreServiceMockRecorder struct {
// contains filtered or unexported fields
}
MockRestoreServiceMockRecorder is the mock recorder for MockRestoreService.
func (*MockRestoreServiceMockRecorder) RestoreBucket ¶ added in v2.1.0
func (mr *MockRestoreServiceMockRecorder) RestoreBucket(ctx, id, rpiData interface{}) *gomock.Call
RestoreBucket indicates an expected call of RestoreBucket.
func (*MockRestoreServiceMockRecorder) RestoreKVStore ¶ added in v2.1.0
func (mr *MockRestoreServiceMockRecorder) RestoreKVStore(ctx, r interface{}) *gomock.Call
RestoreKVStore indicates an expected call of RestoreKVStore.
func (*MockRestoreServiceMockRecorder) RestoreShard ¶ added in v2.1.0
func (mr *MockRestoreServiceMockRecorder) RestoreShard(ctx, shardID, r interface{}) *gomock.Call
RestoreShard indicates an expected call of RestoreShard.
type MockSqlBackupRestoreService ¶ added in v2.1.0
type MockSqlBackupRestoreService struct {
// contains filtered or unexported fields
}
MockSqlBackupRestoreService is a mock of SqlBackupRestoreService interface.
func NewMockSqlBackupRestoreService ¶ added in v2.1.0
func NewMockSqlBackupRestoreService(ctrl *gomock.Controller) *MockSqlBackupRestoreService
NewMockSqlBackupRestoreService creates a new mock instance.
func (*MockSqlBackupRestoreService) BackupSqlStore ¶ added in v2.1.0
BackupSqlStore mocks base method.
func (*MockSqlBackupRestoreService) EXPECT ¶ added in v2.1.0
func (m *MockSqlBackupRestoreService) EXPECT() *MockSqlBackupRestoreServiceMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockSqlBackupRestoreService) RLockSqlStore ¶ added in v2.1.0
func (m *MockSqlBackupRestoreService) RLockSqlStore()
LockSqlStore mocks base method.
func (*MockSqlBackupRestoreService) RUnlockSqlStore ¶ added in v2.1.0
func (m *MockSqlBackupRestoreService) RUnlockSqlStore()
UnlockSqlStore mocks base method.
func (*MockSqlBackupRestoreService) RestoreSqlStore ¶ added in v2.1.0
RestoreSqlStore mocks base method.
type MockSqlBackupRestoreServiceMockRecorder ¶ added in v2.1.0
type MockSqlBackupRestoreServiceMockRecorder struct {
// contains filtered or unexported fields
}
MockSqlBackupRestoreServiceMockRecorder is the mock recorder for MockSqlBackupRestoreService.
func (*MockSqlBackupRestoreServiceMockRecorder) BackupSqlStore ¶ added in v2.1.0
func (mr *MockSqlBackupRestoreServiceMockRecorder) BackupSqlStore(ctx, w interface{}) *gomock.Call
BackupSqlStore indicates an expected call of BackupSqlStore.
func (*MockSqlBackupRestoreServiceMockRecorder) RLockSqlStore ¶ added in v2.1.0
func (mr *MockSqlBackupRestoreServiceMockRecorder) RLockSqlStore() *gomock.Call
LockSqlStore indicates an expected call of LockSqlStore.
func (*MockSqlBackupRestoreServiceMockRecorder) RUnlockSqlStore ¶ added in v2.1.0
func (mr *MockSqlBackupRestoreServiceMockRecorder) RUnlockSqlStore() *gomock.Call
UnlockSqlStore indicates an expected call of UnlockSqlStore.
func (*MockSqlBackupRestoreServiceMockRecorder) RestoreSqlStore ¶ added in v2.1.0
func (mr *MockSqlBackupRestoreServiceMockRecorder) RestoreSqlStore(ctx, r interface{}) *gomock.Call
RestoreSqlStore indicates an expected call of RestoreSqlStore.
type NotificationEndpointService ¶
type NotificationEndpointService struct { *OrganizationService *UserResourceMappingService FindNotificationEndpointByIDF func(ctx context.Context, id platform.ID) (influxdb.NotificationEndpoint, error) FindNotificationEndpointByIDCalls SafeCount FindNotificationEndpointsF func(ctx context.Context, filter influxdb.NotificationEndpointFilter, opt ...influxdb.FindOptions) ([]influxdb.NotificationEndpoint, int, error) FindNotificationEndpointsCalls SafeCount CreateNotificationEndpointF func(ctx context.Context, nr influxdb.NotificationEndpoint, userID platform.ID) error CreateNotificationEndpointCalls SafeCount UpdateNotificationEndpointF func(ctx context.Context, id platform.ID, nr influxdb.NotificationEndpoint, userID platform.ID) (influxdb.NotificationEndpoint, error) UpdateNotificationEndpointCalls SafeCount PatchNotificationEndpointF func(ctx context.Context, id platform.ID, upd influxdb.NotificationEndpointUpdate) (influxdb.NotificationEndpoint, error) PatchNotificationEndpointCalls SafeCount DeleteNotificationEndpointF func(ctx context.Context, id platform.ID) ([]influxdb.SecretField, platform.ID, error) DeleteNotificationEndpointCalls SafeCount }
NotificationEndpointService represents a service for managing notification rule data.
func NewNotificationEndpointService ¶
func NewNotificationEndpointService() *NotificationEndpointService
func (*NotificationEndpointService) CreateNotificationEndpoint ¶
func (s *NotificationEndpointService) CreateNotificationEndpoint(ctx context.Context, nr influxdb.NotificationEndpoint, userID platform.ID) error
CreateNotificationEndpoint creates a new notification rule and sets ID with the new identifier.
func (*NotificationEndpointService) DeleteNotificationEndpoint ¶
func (s *NotificationEndpointService) DeleteNotificationEndpoint(ctx context.Context, id platform.ID) ([]influxdb.SecretField, platform.ID, error)
DeleteNotificationEndpoint removes a notification rule by ID.
func (*NotificationEndpointService) FindNotificationEndpointByID ¶
func (s *NotificationEndpointService) FindNotificationEndpointByID(ctx context.Context, id platform.ID) (influxdb.NotificationEndpoint, error)
FindNotificationEndpointByID returns a single telegraf config by ID.
func (*NotificationEndpointService) FindNotificationEndpoints ¶
func (s *NotificationEndpointService) FindNotificationEndpoints(ctx context.Context, filter influxdb.NotificationEndpointFilter, opt ...influxdb.FindOptions) ([]influxdb.NotificationEndpoint, int, error)
FindNotificationEndpoints returns a list of notification rules that match filter and the total count of matching notification rules. Additional options provide pagination & sorting.
func (*NotificationEndpointService) PatchNotificationEndpoint ¶
func (s *NotificationEndpointService) PatchNotificationEndpoint(ctx context.Context, id platform.ID, upd influxdb.NotificationEndpointUpdate) (influxdb.NotificationEndpoint, error)
PatchNotificationEndpoint updates a single notification rule with changeset. Returns the new notification rule after update.
func (*NotificationEndpointService) UpdateNotificationEndpoint ¶
func (s *NotificationEndpointService) UpdateNotificationEndpoint(ctx context.Context, id platform.ID, nr influxdb.NotificationEndpoint, userID platform.ID) (influxdb.NotificationEndpoint, error)
UpdateNotificationEndpoint updates a single notification rule. Returns the new notification rule after update.
type NotificationRuleStore ¶
type NotificationRuleStore struct { *OrganizationService *UserResourceMappingService FindNotificationRuleByIDF func(ctx context.Context, id platform.ID) (influxdb.NotificationRule, error) FindNotificationRuleByIDCalls SafeCount FindNotificationRulesF func(ctx context.Context, filter influxdb.NotificationRuleFilter, opt ...influxdb.FindOptions) ([]influxdb.NotificationRule, int, error) FindNotificationRulesCalls SafeCount CreateNotificationRuleF func(ctx context.Context, nr influxdb.NotificationRuleCreate, userID platform.ID) error CreateNotificationRuleCalls SafeCount UpdateNotificationRuleF func(ctx context.Context, id platform.ID, nr influxdb.NotificationRuleCreate, userID platform.ID) (influxdb.NotificationRule, error) UpdateNotificationRuleCalls SafeCount PatchNotificationRuleF func(ctx context.Context, id platform.ID, upd influxdb.NotificationRuleUpdate) (influxdb.NotificationRule, error) PatchNotificationRuleCalls SafeCount DeleteNotificationRuleF func(ctx context.Context, id platform.ID) error DeleteNotificationRuleCalls SafeCount }
NotificationRuleStore represents a service for managing notification rule data.
func NewNotificationRuleStore ¶
func NewNotificationRuleStore() *NotificationRuleStore
NewNotificationRuleStore creats a fake notification rules tore.
func (*NotificationRuleStore) CreateNotificationRule ¶
func (s *NotificationRuleStore) CreateNotificationRule(ctx context.Context, nr influxdb.NotificationRuleCreate, userID platform.ID) error
CreateNotificationRule creates a new notification rule and sets ID with the new identifier.
func (*NotificationRuleStore) DeleteNotificationRule ¶
DeleteNotificationRule removes a notification rule by ID.
func (*NotificationRuleStore) FindNotificationRuleByID ¶
func (s *NotificationRuleStore) FindNotificationRuleByID(ctx context.Context, id platform.ID) (influxdb.NotificationRule, error)
FindNotificationRuleByID returns a single telegraf config by ID.
func (*NotificationRuleStore) FindNotificationRules ¶
func (s *NotificationRuleStore) FindNotificationRules(ctx context.Context, filter influxdb.NotificationRuleFilter, opt ...influxdb.FindOptions) ([]influxdb.NotificationRule, int, error)
FindNotificationRules returns a list of notification rules that match filter and the total count of matching notification rules. Additional options provide pagination & sorting.
func (*NotificationRuleStore) PatchNotificationRule ¶
func (s *NotificationRuleStore) PatchNotificationRule(ctx context.Context, id platform.ID, upd influxdb.NotificationRuleUpdate) (influxdb.NotificationRule, error)
PatchNotificationRule updates a single notification rule with changeset. Returns the new notification rule after update.
func (*NotificationRuleStore) UpdateNotificationRule ¶
func (s *NotificationRuleStore) UpdateNotificationRule(ctx context.Context, id platform.ID, nr influxdb.NotificationRuleCreate, userID platform.ID) (influxdb.NotificationRule, error)
UpdateNotificationRule updates a single notification rule. Returns the new notification rule after update.
type OnboardingService ¶
type OnboardingService struct { PasswordsService BucketService OrganizationService UserService AuthorizationService IsOnboardingFn func(context.Context) (bool, error) OnboardInitialUserFn func(context.Context, *platform.OnboardingRequest) (*platform.OnboardingResults, error) OnboardUserFn func(context.Context, *platform.OnboardingRequest) (*platform.OnboardingResults, error) }
OnboardingService is a mock implementation of platform.OnboardingService.
func NewOnboardingService ¶
func NewOnboardingService() *OnboardingService
NewOnboardingService returns a mock of OnboardingService where its methods will return zero values.
func (*OnboardingService) IsOnboarding ¶
func (s *OnboardingService) IsOnboarding(ctx context.Context) (bool, error)
IsOnboarding determine if onboarding request is allowed.
func (*OnboardingService) OnboardInitialUser ¶
func (s *OnboardingService) OnboardInitialUser(ctx context.Context, req *platform.OnboardingRequest) (*platform.OnboardingResults, error)
OnboardInitialUser OnboardingResults.
type OrganizationLookup ¶
type OrganizationLookup struct{}
OrganizationLookup implements the OrganizationLookup interface needed by flux "from" and "to".
func (OrganizationLookup) LookupName ¶
type OrganizationOperationLogService ¶
type OrganizationOperationLogService struct {
GetOrganizationOperationLogFn func(context.Context, platform2.ID, platform.FindOptions) ([]*platform.OperationLogEntry, int, error)
}
OrganizationOperationLogService is a mock implementation of platform.OrganizationOperationLogService.
func NewOrganizationOperationLogService ¶
func NewOrganizationOperationLogService() *OrganizationOperationLogService
NewOrganizationOperationLogService returns a mock of OrganizationOperationLogService.
func (*OrganizationOperationLogService) GetOrganizationOperationLog ¶
func (s *OrganizationOperationLogService) GetOrganizationOperationLog(ctx context.Context, id platform2.ID, opts platform.FindOptions) ([]*platform.OperationLogEntry, int, error)
GetOrganizationOperationLog retrieves the operation log for the org with the provided id.
type OrganizationService ¶
type OrganizationService struct { FindOrganizationByIDF func(ctx context.Context, id platform2.ID) (*platform.Organization, error) FindOrganizationF func(ctx context.Context, filter platform.OrganizationFilter) (*platform.Organization, error) FindOrganizationsF func(ctx context.Context, filter platform.OrganizationFilter, opt ...platform.FindOptions) ([]*platform.Organization, int, error) CreateOrganizationF func(ctx context.Context, b *platform.Organization) error UpdateOrganizationF func(ctx context.Context, id platform2.ID, upd platform.OrganizationUpdate) (*platform.Organization, error) DeleteOrganizationF func(ctx context.Context, id platform2.ID) error FindResourceOrganizationIDF func(ctx context.Context, rt platform.ResourceType, id platform2.ID) (platform2.ID, error) }
OrganizationService is a mock organization server.
func NewOrganizationService ¶
func NewOrganizationService() *OrganizationService
NewOrganizationService returns a mock OrganizationService where its methods will return zero values.
func (*OrganizationService) CreateOrganization ¶
func (s *OrganizationService) CreateOrganization(ctx context.Context, b *platform.Organization) error
CreateOrganization calls CreateOrganizationF.
func (*OrganizationService) DeleteOrganization ¶
DeleteOrganization calls DeleteOrganizationF.
func (*OrganizationService) FindOrganization ¶
func (s *OrganizationService) FindOrganization(ctx context.Context, filter platform.OrganizationFilter) (*platform.Organization, error)
FindOrganization calls FindOrganizationF.
func (*OrganizationService) FindOrganizationByID ¶
func (s *OrganizationService) FindOrganizationByID(ctx context.Context, id platform2.ID) (*platform.Organization, error)
FindOrganizationByID calls FindOrganizationByIDF.
func (*OrganizationService) FindOrganizations ¶
func (s *OrganizationService) FindOrganizations(ctx context.Context, filter platform.OrganizationFilter, opt ...platform.FindOptions) ([]*platform.Organization, int, error)
FindOrganizations calls FindOrganizationsF.
func (*OrganizationService) FindResourceOrganizationID ¶
func (s *OrganizationService) FindResourceOrganizationID(ctx context.Context, rt platform.ResourceType, id platform2.ID) (platform2.ID, error)
FindResourceOrganizationID calls FindResourceOrganizationIDF.
func (*OrganizationService) UpdateOrganization ¶
func (s *OrganizationService) UpdateOrganization(ctx context.Context, id platform2.ID, upd platform.OrganizationUpdate) (*platform.Organization, error)
UpdateOrganization calls UpdateOrganizationF.
type PagingFilter ¶
func (PagingFilter) QueryParams ¶
func (f PagingFilter) QueryParams() map[string][]string
type PasswordsService ¶
type PasswordsService struct { SetPasswordFn func(context.Context, platform.ID, string) error ComparePasswordFn func(context.Context, platform.ID, string) error CompareAndSetPasswordFn func(context.Context, platform.ID, string, string) error }
PasswordsService is a mock implementation of a retention.PasswordsService, which also makes it a suitable mock to use wherever an platform.PasswordsService is required.
func NewPasswordsService ¶
func NewPasswordsService() *PasswordsService
NewPasswordsService returns a mock PasswordsService where its methods will return zero values.
func (*PasswordsService) CompareAndSetPassword ¶
func (s *PasswordsService) CompareAndSetPassword(ctx context.Context, userID platform.ID, old string, new string) error
CompareAndSetPassword compares the provided password and sets it to the new password.
func (*PasswordsService) ComparePassword ¶
func (s *PasswordsService) ComparePassword(ctx context.Context, userID platform.ID, password string) error
ComparePassword password compares the provided password.
func (*PasswordsService) SetPassword ¶
func (s *PasswordsService) SetPassword(ctx context.Context, userID platform.ID, password string) error
SetPassword sets the users current password to be the provided password.
type PointsWriter ¶
type PointsWriter struct { Points []models.Point Err error WritePointsFn func(ctx context.Context, orgID platform.ID, bucketID platform.ID, points []models.Point) error // contains filtered or unexported fields }
PointsWriter is a mock structure for writing points.
func (*PointsWriter) ForceError ¶
func (p *PointsWriter) ForceError(err error)
ForceError is for error testing, if WritePoints is called after ForceError, it will return that error.
func (*PointsWriter) Next ¶
func (p *PointsWriter) Next() models.Point
Next returns the next (oldest) batch of values.
func (*PointsWriter) WritePoints ¶
func (p *PointsWriter) WritePoints(ctx context.Context, orgID platform.ID, bucketID platform.ID, points []models.Point) error
WritePoints writes points to the PointsWriter that will be exposed in the Values.
func (*PointsWriter) WritePointsCalled ¶
func (p *PointsWriter) WritePointsCalled() int
type ReadsStore ¶ added in v2.0.9
type ReadsStore struct { ReadFilterFn func(ctx context.Context, req *datatypes.ReadFilterRequest) (reads.ResultSet, error) ReadGroupFn func(ctx context.Context, req *datatypes.ReadGroupRequest) (reads.GroupResultSet, error) WindowAggregateFn func(ctx context.Context, req *datatypes.ReadWindowAggregateRequest) (reads.ResultSet, error) TagKeysFn func(ctx context.Context, req *datatypes.TagKeysRequest) (cursors.StringIterator, error) TagValuesFn func(ctx context.Context, req *datatypes.TagValuesRequest) (cursors.StringIterator, error) ReadSeriesCardinalityFn func(ctx context.Context, req *datatypes.ReadSeriesCardinalityRequest) (cursors.Int64Iterator, error) SupportReadSeriesCardinalityFn func(ctx context.Context) bool GetSourceFn func(orgID, bucketID uint64) proto.Message }
func (*ReadsStore) GetSource ¶ added in v2.0.9
func (s *ReadsStore) GetSource(orgID, bucketID uint64) proto.Message
func (*ReadsStore) ReadFilter ¶ added in v2.0.9
func (s *ReadsStore) ReadFilter(ctx context.Context, req *datatypes.ReadFilterRequest) (reads.ResultSet, error)
func (*ReadsStore) ReadGroup ¶ added in v2.0.9
func (s *ReadsStore) ReadGroup(ctx context.Context, req *datatypes.ReadGroupRequest) (reads.GroupResultSet, error)
func (*ReadsStore) ReadSeriesCardinality ¶ added in v2.0.9
func (s *ReadsStore) ReadSeriesCardinality(ctx context.Context, req *datatypes.ReadSeriesCardinalityRequest) (cursors.Int64Iterator, error)
func (*ReadsStore) SupportReadSeriesCardinality ¶ added in v2.0.9
func (s *ReadsStore) SupportReadSeriesCardinality(ctx context.Context) bool
func (*ReadsStore) TagKeys ¶ added in v2.0.9
func (s *ReadsStore) TagKeys(ctx context.Context, req *datatypes.TagKeysRequest) (cursors.StringIterator, error)
func (*ReadsStore) TagValues ¶ added in v2.0.9
func (s *ReadsStore) TagValues(ctx context.Context, req *datatypes.TagValuesRequest) (cursors.StringIterator, error)
func (*ReadsStore) WindowAggregate ¶ added in v2.0.9
func (s *ReadsStore) WindowAggregate(ctx context.Context, req *datatypes.ReadWindowAggregateRequest) (reads.ResultSet, error)
type RetentionService ¶
type RetentionService struct { OpenFn func() error CloseFn func() error PrometheusCollectorsFn func() []prometheus.Collector }
func NewRetentionService ¶
func NewRetentionService() *RetentionService
func (*RetentionService) Close ¶
func (s *RetentionService) Close() error
func (*RetentionService) Open ¶
func (s *RetentionService) Open() error
func (*RetentionService) PrometheusCollectors ¶
func (s *RetentionService) PrometheusCollectors() []prometheus.Collector
type SafeCount ¶
type SafeCount struct {
// contains filtered or unexported fields
}
SafeCount provides a safe counter, useful for call counts to maintain thread safety. Removes burden of having to introduce serialization when concurrency is brought in.
type ScraperTargetStoreService ¶
type ScraperTargetStoreService struct { UserResourceMappingService OrganizationService ListTargetsF func(ctx context.Context, filter platform.ScraperTargetFilter) ([]platform.ScraperTarget, error) AddTargetF func(ctx context.Context, t *platform.ScraperTarget, userID platform2.ID) error GetTargetByIDF func(ctx context.Context, id platform2.ID) (*platform.ScraperTarget, error) RemoveTargetF func(ctx context.Context, id platform2.ID) error UpdateTargetF func(ctx context.Context, t *platform.ScraperTarget, userID platform2.ID) (*platform.ScraperTarget, error) }
ScraperTargetStoreService is a mock implementation of a platform.ScraperTargetStoreService.
func (*ScraperTargetStoreService) AddTarget ¶
func (s *ScraperTargetStoreService) AddTarget(ctx context.Context, t *platform.ScraperTarget, userID platform2.ID) error
AddTarget adds a scraper target.
func (*ScraperTargetStoreService) GetTargetByID ¶
func (s *ScraperTargetStoreService) GetTargetByID(ctx context.Context, id platform2.ID) (*platform.ScraperTarget, error)
GetTargetByID retrieves a scraper target by id.
func (*ScraperTargetStoreService) ListTargets ¶
func (s *ScraperTargetStoreService) ListTargets(ctx context.Context, filter platform.ScraperTargetFilter) ([]platform.ScraperTarget, error)
ListTargets lists all the scraper targets.
func (*ScraperTargetStoreService) RemoveTarget ¶
RemoveTarget deletes a scraper target.
func (*ScraperTargetStoreService) UpdateTarget ¶
func (s *ScraperTargetStoreService) UpdateTarget(ctx context.Context, t *platform.ScraperTarget, userID platform2.ID) (*platform.ScraperTarget, error)
UpdateTarget updates a scraper target.
type SecretService ¶
type SecretService struct { LoadSecretFn func(ctx context.Context, orgID platform2.ID, k string) (string, error) GetSecretKeysFn func(ctx context.Context, orgID platform2.ID) ([]string, error) PutSecretFn func(ctx context.Context, orgID platform2.ID, k string, v string) error PutSecretsFn func(ctx context.Context, orgID platform2.ID, m map[string]string) error PatchSecretsFn func(ctx context.Context, orgID platform2.ID, m map[string]string) error DeleteSecretFn func(ctx context.Context, orgID platform2.ID, ks ...string) error }
SecretService is a mock implementation of a retention.SecretService, which also makes it a suitable mock to use wherever an platform.SecretService is required.
func NewSecretService ¶
func NewSecretService() *SecretService
NewSecretService returns a mock SecretService where its methods will return zero values.
func (*SecretService) DeleteSecret ¶
DeleteSecret removes a single secret from the secret store.
func (*SecretService) GetSecretKeys ¶
GetSecretKeys retrieves all secret keys that are stored for the organization orgID.
func (*SecretService) LoadSecret ¶
func (s *SecretService) LoadSecret(ctx context.Context, orgID platform2.ID, k string) (string, error)
LoadSecret retrieves the secret value v found at key k for organization orgID.
func (*SecretService) PatchSecrets ¶
func (s *SecretService) PatchSecrets(ctx context.Context, orgID platform2.ID, m map[string]string) error
PatchSecrets patches all provided secrets and updates any previous values.
func (*SecretService) PutSecret ¶
func (s *SecretService) PutSecret(ctx context.Context, orgID platform2.ID, k string, v string) error
PutSecret stores the secret pair (k,v) for the organization orgID.
func (*SecretService) PutSecrets ¶
func (s *SecretService) PutSecrets(ctx context.Context, orgID platform2.ID, m map[string]string) error
PutSecrets puts all provided secrets and overwrites any previous values.
type SessionService ¶
type SessionService struct { FindSessionFn func(context.Context, string) (*platform.Session, error) ExpireSessionFn func(context.Context, string) error CreateSessionFn func(context.Context, string) (*platform.Session, error) RenewSessionFn func(ctx context.Context, session *platform.Session, newExpiration time.Time) error }
SessionService is a mock implementation of a retention.SessionService, which also makes it a suitable mock to use wherever an platform.SessionService is required.
func NewSessionService ¶
func NewSessionService() *SessionService
NewSessionService returns a mock SessionService where its methods will return zero values.
func (*SessionService) CreateSession ¶
CreateSession creates a session for a user with the users maximal privileges.
func (*SessionService) ExpireSession ¶
func (s *SessionService) ExpireSession(ctx context.Context, key string) error
ExpireSession expires the session provided at key.
func (*SessionService) FindSession ¶
FindSession returns the session found at the provided key.
func (*SessionService) RenewSession ¶
func (s *SessionService) RenewSession(ctx context.Context, session *platform.Session, expiredAt time.Time) error
RenewSession extends the expire time to newExpiration.
type SourceService ¶
type SourceService struct { DefaultSourceFn func(context.Context) (*platform.Source, error) FindSourceByIDFn func(context.Context, platform2.ID) (*platform.Source, error) FindSourcesFn func(context.Context, platform.FindOptions) ([]*platform.Source, int, error) CreateSourceFn func(context.Context, *platform.Source) error UpdateSourceFn func(context.Context, platform2.ID, platform.SourceUpdate) (*platform.Source, error) DeleteSourceFn func(context.Context, platform2.ID) error }
SourceService is a mock implementation of platform.SourceService.
func NewSourceService ¶
func NewSourceService() *SourceService
NewSourceService returns a mock of SourceService where its methods will return zero values.
func (*SourceService) CreateSource ¶
CreateSource sets the sources ID and stores it.
func (*SourceService) DefaultSource ¶
DefaultSource retrieves the default source.
func (*SourceService) DeleteSource ¶
DeleteSource removes the source.
func (*SourceService) FindSourceByID ¶
func (s *SourceService) FindSourceByID(ctx context.Context, id platform2.ID) (*platform.Source, error)
FindSourceByID retrieves a source by its ID.
func (*SourceService) FindSources ¶
func (s *SourceService) FindSources(ctx context.Context, opts platform.FindOptions) ([]*platform.Source, int, error)
FindSources returns a list of all sources.
func (*SourceService) UpdateSource ¶
func (s *SourceService) UpdateSource(ctx context.Context, id platform2.ID, upd platform.SourceUpdate) (*platform.Source, error)
UpdateSource updates the source.
type StorageReader ¶
type StorageReader struct { ReadFilterFn func(ctx context.Context, spec query.ReadFilterSpec, alloc memory.Allocator) (query.TableIterator, error) ReadGroupFn func(ctx context.Context, spec query.ReadGroupSpec, alloc memory.Allocator) (query.TableIterator, error) ReadTagKeysFn func(ctx context.Context, spec query.ReadTagKeysSpec, alloc memory.Allocator) (query.TableIterator, error) ReadTagValuesFn func(ctx context.Context, spec query.ReadTagValuesSpec, alloc memory.Allocator) (query.TableIterator, error) ReadWindowAggregateFn func(ctx context.Context, spec query.ReadWindowAggregateSpec, alloc memory.Allocator) (query.TableIterator, error) ReadSeriesCardinalityFn func(ctx context.Context, spec query.ReadSeriesCardinalitySpec, alloc memory.Allocator) (query.TableIterator, error) SupportReadSeriesCardinalityFn func(ctx context.Context) bool CloseFn func() }
func (*StorageReader) Close ¶
func (s *StorageReader) Close()
func (*StorageReader) ReadFilter ¶
func (s *StorageReader) ReadFilter(ctx context.Context, spec query.ReadFilterSpec, alloc memory.Allocator) (query.TableIterator, error)
func (*StorageReader) ReadGroup ¶
func (s *StorageReader) ReadGroup(ctx context.Context, spec query.ReadGroupSpec, alloc memory.Allocator) (query.TableIterator, error)
func (*StorageReader) ReadSeriesCardinality ¶ added in v2.0.9
func (s *StorageReader) ReadSeriesCardinality(ctx context.Context, spec query.ReadSeriesCardinalitySpec, alloc memory.Allocator) (query.TableIterator, error)
func (*StorageReader) ReadTagKeys ¶
func (s *StorageReader) ReadTagKeys(ctx context.Context, spec query.ReadTagKeysSpec, alloc memory.Allocator) (query.TableIterator, error)
func (*StorageReader) ReadTagValues ¶
func (s *StorageReader) ReadTagValues(ctx context.Context, spec query.ReadTagValuesSpec, alloc memory.Allocator) (query.TableIterator, error)
func (*StorageReader) ReadWindowAggregate ¶
func (s *StorageReader) ReadWindowAggregate(ctx context.Context, spec query.ReadWindowAggregateSpec, alloc memory.Allocator) (query.TableIterator, error)
func (*StorageReader) SupportReadSeriesCardinality ¶ added in v2.0.9
func (s *StorageReader) SupportReadSeriesCardinality(ctx context.Context) bool
type Store ¶
type Store struct { ViewFn func(func(kv.Tx) error) error UpdateFn func(func(kv.Tx) error) error BackupFn func(ctx context.Context, w io.Writer) error RestoreFn func(ctx context.Context, r io.Reader) error }
Store is a mock kv.Store
func (*Store) RLock ¶ added in v2.1.0
func (s *Store) RLock()
RLock and RUnlock methods are to satisfy the kv.Store interface
type TaskControlService ¶
type TaskControlService struct { CreateRunFn func(ctx context.Context, taskID platform.ID, scheduledFor time.Time, runAt time.Time) (*taskmodel.Run, error) CurrentlyRunningFn func(ctx context.Context, taskID platform.ID) ([]*taskmodel.Run, error) ManualRunsFn func(ctx context.Context, taskID platform.ID) ([]*taskmodel.Run, error) StartManualRunFn func(ctx context.Context, taskID, runID platform.ID) (*taskmodel.Run, error) FinishRunFn func(ctx context.Context, taskID, runID platform.ID) (*taskmodel.Run, error) UpdateRunStateFn func(ctx context.Context, taskID, runID platform.ID, when time.Time, state taskmodel.RunStatus) error AddRunLogFn func(ctx context.Context, taskID, runID platform.ID, when time.Time, log string) error }
func (*TaskControlService) CurrentlyRunning ¶
func (*TaskControlService) ManualRuns ¶
func (*TaskControlService) StartManualRun ¶
type TaskService ¶
type TaskService struct { FindTaskByIDFn func(context.Context, platform.ID) (*taskmodel.Task, error) FindTaskByIDCalls SafeCount FindTasksFn func(context.Context, taskmodel.TaskFilter) ([]*taskmodel.Task, int, error) FindTasksCalls SafeCount CreateTaskFn func(context.Context, taskmodel.TaskCreate) (*taskmodel.Task, error) CreateTaskCalls SafeCount UpdateTaskFn func(context.Context, platform.ID, taskmodel.TaskUpdate) (*taskmodel.Task, error) UpdateTaskCalls SafeCount DeleteTaskFn func(context.Context, platform.ID) error DeleteTaskCalls SafeCount FindLogsFn func(context.Context, taskmodel.LogFilter) ([]*taskmodel.Log, int, error) FindLogsCalls SafeCount FindRunsFn func(context.Context, taskmodel.RunFilter) ([]*taskmodel.Run, int, error) FindRunsCalls SafeCount FindRunByIDFn func(context.Context, platform.ID, platform.ID) (*taskmodel.Run, error) FindRunByIDCalls SafeCount CancelRunFn func(context.Context, platform.ID, platform.ID) error CancelRunCalls SafeCount RetryRunFn func(context.Context, platform.ID, platform.ID) (*taskmodel.Run, error) RetryRunCalls SafeCount ForceRunFn func(context.Context, platform.ID, int64) (*taskmodel.Run, error) ForceRunCalls SafeCount }
func NewTaskService ¶
func NewTaskService() *TaskService
func (*TaskService) CreateTask ¶
func (s *TaskService) CreateTask(ctx context.Context, t taskmodel.TaskCreate) (*taskmodel.Task, error)
func (*TaskService) DeleteTask ¶
func (*TaskService) FindRunByID ¶
func (*TaskService) FindTaskByID ¶
func (*TaskService) FindTasks ¶
func (s *TaskService) FindTasks(ctx context.Context, filter taskmodel.TaskFilter) ([]*taskmodel.Task, int, error)
func (*TaskService) UpdateTask ¶
func (s *TaskService) UpdateTask(ctx context.Context, id platform.ID, upd taskmodel.TaskUpdate) (*taskmodel.Task, error)
type TelegrafConfigStore ¶
type TelegrafConfigStore struct { *UserResourceMappingService FindTelegrafConfigByIDF func(ctx context.Context, id platform2.ID) (*platform.TelegrafConfig, error) FindTelegrafConfigByIDCalls SafeCount FindTelegrafConfigsF func(ctx context.Context, filter platform.TelegrafConfigFilter, opt ...platform.FindOptions) ([]*platform.TelegrafConfig, int, error) FindTelegrafConfigsCalls SafeCount CreateTelegrafConfigF func(ctx context.Context, tc *platform.TelegrafConfig, userID platform2.ID) error CreateTelegrafConfigCalls SafeCount UpdateTelegrafConfigF func(ctx context.Context, id platform2.ID, tc *platform.TelegrafConfig, userID platform2.ID) (*platform.TelegrafConfig, error) UpdateTelegrafConfigCalls SafeCount DeleteTelegrafConfigF func(ctx context.Context, id platform2.ID) error DeleteTelegrafConfigCalls SafeCount }
TelegrafConfigStore represents a service for managing telegraf config data.
func NewTelegrafConfigStore ¶
func NewTelegrafConfigStore() *TelegrafConfigStore
NewTelegrafConfigStore constructs a new fake TelegrafConfigStore.
func (*TelegrafConfigStore) CreateTelegrafConfig ¶
func (s *TelegrafConfigStore) CreateTelegrafConfig(ctx context.Context, tc *platform.TelegrafConfig, userID platform2.ID) error
CreateTelegrafConfig creates a new telegraf config and sets b.ID with the new identifier.
func (*TelegrafConfigStore) DeleteTelegrafConfig ¶
DeleteTelegrafConfig removes a telegraf config by ID.
func (*TelegrafConfigStore) FindTelegrafConfigByID ¶
func (s *TelegrafConfigStore) FindTelegrafConfigByID(ctx context.Context, id platform2.ID) (*platform.TelegrafConfig, error)
FindTelegrafConfigByID returns a single telegraf config by ID.
func (*TelegrafConfigStore) FindTelegrafConfigs ¶
func (s *TelegrafConfigStore) FindTelegrafConfigs(ctx context.Context, filter platform.TelegrafConfigFilter, opt ...platform.FindOptions) ([]*platform.TelegrafConfig, int, error)
FindTelegrafConfigs returns a list of telegraf configs that match filter and the total count of matching telegraf configs. Additional options provide pagination & sorting.
func (*TelegrafConfigStore) UpdateTelegrafConfig ¶
func (s *TelegrafConfigStore) UpdateTelegrafConfig(ctx context.Context, id platform2.ID, tc *platform.TelegrafConfig, userID platform2.ID) (*platform.TelegrafConfig, error)
UpdateTelegrafConfig updates a single telegraf config. Returns the new telegraf config after update.
type TimeGenerator ¶
TimeGenerator stores a fake value of time.
func (TimeGenerator) Now ¶
func (g TimeGenerator) Now() time.Time
Now will return the FakeValue stored in the struct.
type TokenGenerator ¶
TokenGenerator is mock implementation of influxdb.TokenGenerator.
func NewTokenGenerator ¶
func NewTokenGenerator(s string, err error) TokenGenerator
NewTokenGenerator is a simple way to create immutable token generator.
func (TokenGenerator) Token ¶
func (g TokenGenerator) Token() (string, error)
Token generates a new influxdb.Token from a mock function.
type Tx ¶
type Tx struct { BucketFn func(b []byte) (kv.Bucket, error) ContextFn func() context.Context WithContextFn func(ctx context.Context) }
Tx is mock of a kv.Tx.
func (*Tx) WithContext ¶
WithContext associates a context with this Tx.
type UserOperationLogService ¶
type UserOperationLogService struct {
GetUserOperationLogFn func(context.Context, platform2.ID, platform.FindOptions) ([]*platform.OperationLogEntry, int, error)
}
UserOperationLogService is a mock implementation of platform.UserOperationLogService.
func NewUserOperationLogService ¶
func NewUserOperationLogService() *UserOperationLogService
NewUserOperationLogService returns a mock of UserOperationLogService.
func (*UserOperationLogService) GetUserOperationLog ¶
func (s *UserOperationLogService) GetUserOperationLog(ctx context.Context, id platform2.ID, opts platform.FindOptions) ([]*platform.OperationLogEntry, int, error)
GetUserOperationLog retrieves the operation log for the user with the provided id.
type UserResourceMappingService ¶
type UserResourceMappingService struct { FindMappingsFn func(context.Context, platform.UserResourceMappingFilter) ([]*platform.UserResourceMapping, int, error) CreateMappingFn func(context.Context, *platform.UserResourceMapping) error DeleteMappingFn func(context.Context, platform2.ID, platform2.ID) error }
UserResourceMappingService is a mock implementation of platform.UserResourceMappingService
func NewUserResourceMappingService ¶
func NewUserResourceMappingService() *UserResourceMappingService
NewUserResourceMappingService returns a mock of UserResourceMappingService where its methods will return zero values.
func (*UserResourceMappingService) CreateUserResourceMapping ¶
func (s *UserResourceMappingService) CreateUserResourceMapping(ctx context.Context, m *platform.UserResourceMapping) error
CreateUserResourceMapping creates a new UserResourceMapping.
func (*UserResourceMappingService) DeleteUserResourceMapping ¶
func (s *UserResourceMappingService) DeleteUserResourceMapping(ctx context.Context, resourceID platform2.ID, userID platform2.ID) error
DeleteUserResourceMapping removes a UserResourceMapping.
func (*UserResourceMappingService) FindUserResourceMappings ¶
func (s *UserResourceMappingService) FindUserResourceMappings(ctx context.Context, filter platform.UserResourceMappingFilter, opt ...platform.FindOptions) ([]*platform.UserResourceMapping, int, error)
FindUserResourceMappings finds mappings that match a given filter.
type UserService ¶
type UserService struct { // Methods for a platform.UserService FindUserByIDFn func(context.Context, platform2.ID) (*platform.User, error) FindUsersFn func(context.Context, platform.UserFilter, ...platform.FindOptions) ([]*platform.User, int, error) CreateUserFn func(context.Context, *platform.User) error DeleteUserFn func(context.Context, platform2.ID) error FindUserFn func(context.Context, platform.UserFilter) (*platform.User, error) UpdateUserFn func(context.Context, platform2.ID, platform.UserUpdate) (*platform.User, error) FindPermissionForUserFn func(context.Context, platform2.ID) (platform.PermissionSet, error) }
UserService is a mock implementation of a retention.UserService, which also makes it a suitable mock to use wherever an platform.UserService is required.
func NewUserService ¶
func NewUserService() *UserService
NewUserService returns a mock of UserService where its methods will return zero values.
func (*UserService) CreateUser ¶
CreateUser creates a new User and sets b.ID with the new identifier.
func (*UserService) DeleteUser ¶
DeleteUser removes a User by ID.
func (*UserService) FindPermissionForUser ¶
func (s *UserService) FindPermissionForUser(ctx context.Context, uid platform2.ID) (platform.PermissionSet, error)
func (*UserService) FindUser ¶
func (s *UserService) FindUser(ctx context.Context, filter platform.UserFilter) (*platform.User, error)
FindUser finds the first user that matches a filter
func (*UserService) FindUserByID ¶
FindUserByID returns a single User by ID.
func (*UserService) FindUsers ¶
func (s *UserService) FindUsers(ctx context.Context, filter platform.UserFilter, opts ...platform.FindOptions) ([]*platform.User, int, error)
FindUsers returns a list of Users that match filter and the total count of matching Users.
func (*UserService) UpdateUser ¶
func (s *UserService) UpdateUser(ctx context.Context, id platform2.ID, upd platform.UserUpdate) (*platform.User, error)
UpdateUser updates a user
type VariableService ¶
type VariableService struct { CreateVariableF func(context.Context, *influxdb.Variable) error CreateVariableCalls SafeCount DeleteVariableF func(context.Context, platform.ID) error DeleteVariableCalls SafeCount FindVariableByIDF func(context.Context, platform.ID) (*influxdb.Variable, error) FindVariableByIDCalls SafeCount FindVariablesF func(context.Context, influxdb.VariableFilter, ...influxdb.FindOptions) ([]*influxdb.Variable, error) FindVariablesCalls SafeCount ReplaceVariableF func(context.Context, *influxdb.Variable) error ReplaceVariableCalls SafeCount UpdateVariableF func(ctx context.Context, id platform.ID, update *influxdb.VariableUpdate) (*influxdb.Variable, error) UpdateVariableCalls SafeCount }
func NewVariableService ¶
func NewVariableService() *VariableService
NewVariableService returns a mock of VariableService where its methods will return zero values.
func (*VariableService) CreateVariable ¶
func (s *VariableService) CreateVariable(ctx context.Context, variable *influxdb.Variable) error
func (*VariableService) DeleteVariable ¶
func (*VariableService) FindVariableByID ¶
func (*VariableService) FindVariables ¶
func (s *VariableService) FindVariables(ctx context.Context, filter influxdb.VariableFilter, opts ...influxdb.FindOptions) ([]*influxdb.Variable, error)
func (*VariableService) ReplaceVariable ¶
func (s *VariableService) ReplaceVariable(ctx context.Context, variable *influxdb.Variable) error
func (*VariableService) UpdateVariable ¶
type WriteService ¶
WriteService writes data read from the reader.
func (*WriteService) WriteTo ¶
func (s *WriteService) WriteTo(ctx context.Context, filter platform.BucketFilter, r io.Reader) error
WriteTo calls the mocked WriteToF function with arguments.
Source Files ¶
- annotation_service.go
- auth_service.go
- authorization.go
- authorizer_v1.go
- backup_service.go
- bucket_service.go
- check_service.go
- dashboard_service.go
- dbrp_mapping.go
- delete.go
- dependencies.go
- document_service.go
- flagger.go
- generators.go
- kv.go
- label_service.go
- lookup_service.go
- notebook_service.go
- notification_endpoint_service.go
- notification_rule_store.go
- onboarding_service.go
- operation_log_service.go
- org_service.go
- paging.go
- passwords.go
- passwords_service.go
- points_writer.go
- reader.go
- reads_resultset.go
- reads_store.go
- retention_service.go
- safe_count.go
- scraper_service.go
- secret_service.go
- session_service.go
- source_service.go
- task_service.go
- telegraf_service.go
- user_resource_mapping_service.go
- user_service.go
- variable_service.go
- write_service.go