Packages

abstract class CrudService[F[_], Model, Create, Update] extends Service[F]

Source
CrudService.scala
Linear Supertypes
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. CrudService
  2. Service
  3. AnyRef
  4. Any
Implicitly
  1. by StringFormat
  2. by Ensuring
  3. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new CrudService(baseUri: Uri, name: String, authToken: Header, wrapped: Boolean = true)(implicit arg0: Sync[F], arg1: Client[F], arg2: Decoder[Model], arg3: Encoder[Create], arg4: Encoder[Update])

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. def ->[B](y: B): (CrudService[F, Model, Create, Update], B)
    Implicit
    This member is added by an implicit conversion from CrudService[F, Model, Create, Update] toArrowAssoc[CrudService[F, Model, Create, Update]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  4. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  5. implicit val F: Sync[F]
    Attributes
    protected
    Definition Classes
    Service
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. val authToken: Header
    Attributes
    protected
    Definition Classes
    Service
  8. implicit val client: Client[F]
    Attributes
    protected
    Definition Classes
    Service
  9. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  10. def create(value: Create, extraHeaders: Header*): F[WithId[Model]]
  11. def createHandleConflict(value: Create, extraHeaders: Header*)(onConflict: F[WithId[Model]]): F[WithId[Model]]
    Attributes
    protected
  12. def delete(id: String, extraHeaders: Header*): F[Unit]
  13. def delete(value: WithId[Model], extraHeaders: Header*): F[Unit]
  14. def delete(uri: Uri, extraHeaders: Header*): F[Unit]

    An idempotent delete.

    An idempotent delete. If NotFound or Gone are returned this method will succeed.

    uri

    the uri to which the request will be made.

    extraHeaders

    extra headers to be used. The authToken header is always added.

    Attributes
    protected
    Definition Classes
    Service
  15. val dsl: Http4sClientDsl[F]
    Attributes
    protected
    Definition Classes
    Service
  16. def ensuring(cond: (CrudService[F, Model, Create, Update]) => Boolean, msg: => Any): CrudService[F, Model, Create, Update]
    Implicit
    This member is added by an implicit conversion from CrudService[F, Model, Create, Update] toEnsuring[CrudService[F, Model, Create, Update]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  17. def ensuring(cond: (CrudService[F, Model, Create, Update]) => Boolean): CrudService[F, Model, Create, Update]
    Implicit
    This member is added by an implicit conversion from CrudService[F, Model, Create, Update] toEnsuring[CrudService[F, Model, Create, Update]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  18. def ensuring(cond: Boolean, msg: => Any): CrudService[F, Model, Create, Update]
    Implicit
    This member is added by an implicit conversion from CrudService[F, Model, Create, Update] toEnsuring[CrudService[F, Model, Create, Update]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  19. def ensuring(cond: Boolean): CrudService[F, Model, Create, Update]
    Implicit
    This member is added by an implicit conversion from CrudService[F, Model, Create, Update] toEnsuring[CrudService[F, Model, Create, Update]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  20. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  21. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  22. def expect[R](wrappedAt: Option[String], method: Method with PermitsBody, uri: Uri, extraHeaders: Header*)(implicit arg0: Decoder[R]): F[R]

    Invokes method on the specified uri without any body.

    Invokes method on the specified uri without any body. The response will be parsed to an R.

    wrappedAt

    whether to decode R at the Json root, or at the field at.

    method

    the method to use, eg: GET, POST, etc.

    uri

    the uri to which the request will be made.

    extraHeaders

    extra headers to be used. The authToken header is always added.

    Attributes
    protected
    Definition Classes
    Service
  23. def expect[B, R](wrappedAt: Option[String], method: Method with PermitsBody, value: B, uri: Uri, extraHeaders: Header*)(implicit arg0: Encoder[B], arg1: Decoder[R]): F[R]

    Invokes method on the specified uri passing as body value.

    Invokes method on the specified uri passing as body value. The response will be parsed to an R.

    wrappedAt

    whether to encode B and decode R at the Json root, or at the field at.

    method

    the method to use, eg: GET, POST, etc.

    value

    the value to send in the body. This value will be json encoded using wrapped.

    uri

    the uri to which the request will be made.

    extraHeaders

    extra headers to be used. The authToken header is always added.

    Attributes
    protected
    Definition Classes
    Service
  24. def expectUnwrapped[R](wrappedAt: Option[String], request: F[Request[F]])(implicit arg0: Decoder[R]): F[R]

    Submits request and decodes the response to a R on success.

    Submits request and decodes the response to a R on success.

    wrappedAt

    whether to decode R at the Json root, or at the field at.

    request

    the request to execute.

    Attributes
    protected
    Definition Classes
    Service
  25. def formatted(fmtstr: String): String
    Implicit
    This member is added by an implicit conversion from CrudService[F, Model, Create, Update] toStringFormat[CrudService[F, Model, Create, Update]] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  26. def get(id: String, extraHeaders: Header*): F[WithId[Model]]
  27. def get[R](wrappedAt: Option[String], uri: Uri, extraHeaders: Header*)(implicit arg0: Decoder[R]): F[R]
    Attributes
    protected
    Definition Classes
    Service
  28. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  29. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  30. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  31. implicit def jsonDecoder[A](implicit arg0: Decoder[A]): EntityDecoder[F, A]
    Attributes
    protected
    Definition Classes
    Service
  32. implicit def jsonEncoder[A](implicit arg0: Encoder[A]): EntityEncoder[F, A]
    Attributes
    protected
    Definition Classes
    Service
  33. val jsonPrinter: Printer
    Attributes
    protected
    Definition Classes
    Service
  34. def list(query: Query, extraHeaders: Header*): Stream[F, WithId[Model]]
  35. def list(extraHeaders: Header*): Stream[F, WithId[Model]]
  36. def list[R](wrappedAt: String, uri: Uri, query: Query, extraHeaders: Header*)(implicit arg0: Decoder[R]): Stream[F, R]

    Invokes a GET request on the specified uri, expecting the returned json to be paginated.

    Invokes a GET request on the specified uri, expecting the returned json to be paginated. Automatically fetches more pages if more elements of the stream are consumed.

    R

    the type of the elements returned.

    wrappedAt

    the Json object field where R will be decoded from.

    uri

    the uri to which the request will be made.

    query

    extra query parameters to pass in every request. These are separated from Uri because this method will need to append query params for the next page/marker/offset.

    extraHeaders

    extra headers to be used. The authToken header is always added.

    Attributes
    protected
    Definition Classes
    Service
  37. val name: String
  38. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  39. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  40. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  41. def patch[V, R](wrappedAt: Option[String], value: V, uri: Uri, extraHeaders: Header*)(implicit arg0: Encoder[V], arg1: Decoder[R]): F[R]
    Attributes
    protected
    Definition Classes
    Service
  42. val pluralName: String
  43. def post[V, R](wrappedAt: Option[String], value: V, uri: Uri, extraHeaders: Header*)(implicit arg0: Encoder[V], arg1: Decoder[R]): F[R]
    Attributes
    protected
    Definition Classes
    Service
  44. def put[V, R](wrappedAt: Option[String], value: V, uri: Uri, extraHeaders: Header*)(implicit arg0: Encoder[V], arg1: Decoder[R]): F[R]
    Attributes
    protected
    Definition Classes
    Service
  45. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  46. def toString(): String
    Definition Classes
    AnyRef → Any
  47. def unwrapped[R](at: Option[String] = None)(implicit decoder: Decoder[R]): EntityDecoder[F, R]

    Creates an EntityDecoder which will decode the response from Json.

    Creates an EntityDecoder which will decode the response from Json. When at is None R will be decoded directly from the Json root (the normal implementation for most Json REST APIs). Example:

    {
      "id": "e4d02828-9cac-4765-bf7f-7e210dac7aba",
      "zones": 500,
      "zone_recordsets": 500
    }

    When at is a Some(x) R will be decoded from the Json object located in the field x. For R to be correctly parsed in this example at should be Some("quota"):

    {
      "quota": {
        "id": "e4d02828-9cac-4765-bf7f-7e210dac7aba",
        "zones": 500,
        "zone_recordsets": 500
      }
    }
    at

    whether to decode R at the Json root, or at the field at.

    decoder

    the circe decoder capable of converting Json to an R.

    Attributes
    protected
    Definition Classes
    Service
  48. def update(id: String, value: Update, extraHeaders: Header*): F[WithId[Model]]
  49. val uri: Uri
  50. implicit val void: EntityDecoder[F, Unit]
    Attributes
    protected
    Definition Classes
    Service
  51. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  52. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  53. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  54. def wrapped[R](at: Option[String] = None)(implicit encoder: Encoder[R]): EntityEncoder[F, R]

    Creates an EntityEncoder which will encode R to a Json.

    Creates an EntityEncoder which will encode R to a Json. When at is None R will be encoded directly (the normal implementation for most Json REST APIs). Example:

    {
      "id": "e4d02828-9cac-4765-bf7f-7e210dac7aba",
      "zones": 500,
      "zone_recordsets": 500
    }

    When at is a Some(x) R will be encoded inside a Json object with a single field named x. In this example at was set to Some("quota"):

    {
      "quota": {
        "id": "e4d02828-9cac-4765-bf7f-7e210dac7aba",
        "zones": 500,
        "zone_recordsets": 500
      }
    }
    at

    whether to encode R at the Json root, or at the field at.

    encoder

    the circe encoder capable of converting an R to Json.

    Attributes
    protected
    Definition Classes
    Service
  55. val wrappedAt: Option[String]
    Attributes
    protected

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated
  2. def [B](y: B): (CrudService[F, Model, Create, Update], B)
    Implicit
    This member is added by an implicit conversion from CrudService[F, Model, Create, Update] toArrowAssoc[CrudService[F, Model, Create, Update]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @deprecated
    Deprecated

    (Since version 2.13.0) Use -> instead. If you still wish to display it as one character, consider using a font with programming ligatures such as Fira Code.

Inherited from Service[F]

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion StringFormat fromCrudService[F, Model, Create, Update] to StringFormat[CrudService[F, Model, Create, Update]]

Inherited by implicit conversion Ensuring fromCrudService[F, Model, Create, Update] to Ensuring[CrudService[F, Model, Create, Update]]

Inherited by implicit conversion ArrowAssoc fromCrudService[F, Model, Create, Update] to ArrowAssoc[CrudService[F, Model, Create, Update]]

Ungrouped