com.sksamuel.elastic4s.api.CreateUserApi.scala Maven / Gradle / Ivy
The newest version!
package com.sksamuel.elastic4s.api
import com.sksamuel.elastic4s.requests.security.users.{CreateOrUpdateUserRequest, CreateUser, UpdateUser, UserPassword}
trait CreateUserApi {
def createUser(
name: String,
enabled: Option[Boolean] = None,
email: Option[String] = None,
fullName: Option[String] = None,
metadata: Map[String, Any] = Map(),
password: UserPassword,
roles: Seq[String] = Seq()
) = CreateOrUpdateUserRequest(name, CreateUser, enabled, email, fullName, metadata, Some(password), roles)
def updateUser(
name: String,
enabled: Option[Boolean] = None,
email: Option[String] = None,
fullName: Option[String] = None,
metadata: Map[String, Any] = Map(),
password: Option[UserPassword] = None,
roles: Seq[String] = Seq()
) = CreateOrUpdateUserRequest(name, UpdateUser, enabled, email, fullName, metadata, password, roles)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy