Documentation ¶
Index ¶
- Variables
- func RawToSource(raw *model.SearchUserRaw) *model.SearchUserSource
- type ElasticsearchReindexer
- type PostgresqlReindexer
- type ReindexItem
- type ReindexRequest
- type ReindexResult
- type Reindexer
- type ReindexerLogger
- type Sink
- type SinkLogger
- type SourceProvider
- type UserQueries
- type UserReindexCreateProducer
Constants ¶
This section is empty.
Variables ¶
View Source
var DependencySet = wire.NewSet( wire.Struct(new(SourceProvider), "*"), NewReindexerLogger, wire.Struct(new(Reindexer), "*"), NewSinkLogger, wire.Struct(new(Sink), "*"), )
Functions ¶
func RawToSource ¶
func RawToSource(raw *model.SearchUserRaw) *model.SearchUserSource
Types ¶
type ElasticsearchReindexer ¶
type ElasticsearchReindexer interface { ReindexUser(user *model.SearchUserSource) error DeleteUser(userID string) error }
type PostgresqlReindexer ¶
type ReindexItem ¶
type ReindexItem struct { Value *model.SearchUserSource Cursor model.PageCursor }
type ReindexRequest ¶
type ReindexRequest struct {
UserID string `json:"user_id"`
}
type ReindexResult ¶
type Reindexer ¶
type Reindexer struct { AppID config.AppID SearchConfig *config.SearchConfig Clock clock.Clock Database *appdb.Handle Logger *ReindexerLogger UserStore *user.Store Producer UserReindexCreateProducer SourceProvider *SourceProvider ElasticsearchReindexer ElasticsearchReindexer PostgresqlReindexer PostgresqlReindexer }
func (*Reindexer) EnqueueReindexUserTask ¶
func (*Reindexer) ExecReindexUser ¶
func (s *Reindexer) ExecReindexUser(ctx context.Context, request ReindexRequest) (result ReindexResult)
type ReindexerLogger ¶
func NewReindexerLogger ¶
func NewReindexerLogger(lf *log.Factory) *ReindexerLogger
type Sink ¶
type Sink struct { Logger SinkLogger Reindexer *Reindexer Database *appdb.Handle }
func (*Sink) ReceiveBlockingEvent ¶
type SinkLogger ¶
func NewSinkLogger ¶
func NewSinkLogger(lf *log.Factory) SinkLogger
type SourceProvider ¶
type SourceProvider struct { AppID config.AppID Users UserQueries UserStore *user.Store IdentityService *identityservice.Service RolesGroups *rolesgroups.Store }
func (*SourceProvider) QueryPage ¶
func (s *SourceProvider) QueryPage(ctx context.Context, after model.PageCursor, first uint64) ([]ReindexItem, error)
type UserQueries ¶
type UserReindexCreateProducer ¶
type UserReindexCreateProducer interface { NewTask(appID string, input json.RawMessage, taskIDPrefix string) *redisqueue.Task EnqueueTask(ctx context.Context, task *redisqueue.Task) error }
Click to show internal directories.
Click to hide internal directories.