Documentation ¶
Index ¶
- Constants
- Variables
- func CursorToSearchAfter(cursor model.PageCursor) (searchAfter interface{}, err error)
- func MakeSearchBody(appID config.AppID, searchKeyword string, filterOptions libuser.FilterOptions, ...) map[string]interface{}
- func NewClient(credentials *config.ElasticsearchCredentials) *elasticsearch.Client
- func SortToCursor(sort interface{}) (cursor model.PageCursor, err error)
- type ElasticsearchServiceLogger
- type ReindexRequest
- type ReindexResult
- type Service
- type Stats
- type UserQueries
Constants ¶
View Source
const IndexNameUser = "user"
View Source
const PrefixMinChars = 3
Variables ¶
View Source
var DependencySet = wire.NewSet( NewClient, NewElasticsearchServiceLogger, wire.Struct(new(Service), "*"), )
View Source
var ErrMissingCredential = apierrors.InternalError.WithReason("SearchDisabled").New("elasticsearch credential is not provided")
Functions ¶
func CursorToSearchAfter ¶
func CursorToSearchAfter(cursor model.PageCursor) (searchAfter interface{}, err error)
func MakeSearchBody ¶
func MakeSearchBody( appID config.AppID, searchKeyword string, filterOptions libuser.FilterOptions, sortOption libuser.SortOption, ) map[string]interface{}
func NewClient ¶
func NewClient(credentials *config.ElasticsearchCredentials) *elasticsearch.Client
func SortToCursor ¶
func SortToCursor(sort interface{}) (cursor model.PageCursor, err error)
Types ¶
type ElasticsearchServiceLogger ¶
func NewElasticsearchServiceLogger ¶
func NewElasticsearchServiceLogger(lf *log.Factory) *ElasticsearchServiceLogger
type ReindexRequest ¶
type ReindexRequest struct {
UserID string `json:"user_id"`
}
type ReindexResult ¶
type Service ¶
type Service struct { Clock clock.Clock Database *appdb.Handle Logger *ElasticsearchServiceLogger AppID config.AppID Client *elasticsearch.Client Users UserQueries UserStore *user.Store IdentityService *identityservice.Service RolesGroups *rolesgroups.Store }
func (*Service) DeleteUser ¶
func (*Service) QueryUser ¶
func (s *Service) QueryUser( searchKeyword string, filterOptions libuser.FilterOptions, sortOption libuser.SortOption, pageArgs graphqlutil.PageArgs, ) ([]model.PageItemRef, *Stats, error)
func (*Service) ReindexUser ¶
func (s *Service) ReindexUser(user *model.SearchUserSource) error
type UserQueries ¶
Click to show internal directories.
Click to hide internal directories.