Skip to content

Commit

Permalink
Change Package to codecs
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristopherDavenport committed Jun 24, 2020
1 parent 98eda9d commit b4690d7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ import _root_.scodec._
import _root_.scodec.codecs._
import org.http4s._

package object scodec {
private[scodec] val statusCodec : Codec[Status] = int16.exmap(
package object codecs {
private[codecs] val statusCodec : Codec[Status] = int16.exmap(
i => Attempt.fromEither(Status.fromInt(i).leftMap(p => Err.apply(p.details))),
s => Attempt.successful(s.code)
)

private[scodec] val httpVersionCodec: Codec[HttpVersion] = {
private[codecs] val httpVersionCodec: Codec[HttpVersion] = {
def decode(major: Int, minor: Int): Attempt[HttpVersion] =
Attempt.fromEither(HttpVersion.fromVersion(major, minor).leftMap(p => Err.apply(p.message)))
(int8 ~ int8).exmap(
Expand All @@ -21,7 +21,7 @@ package object scodec {
)
}

private[scodec] val headersCodec : Codec[Headers] = {
private[codecs] val headersCodec : Codec[Headers] = {
cstring.exmapc{
s =>
if (s.isEmpty())
Expand All @@ -42,7 +42,7 @@ package object scodec {
}
}

private[scodec] val httpDateCodec: Codec[HttpDate] =
private[codecs] val httpDateCodec: Codec[HttpDate] =
int64.exmapc(i => Attempt.fromEither(HttpDate.fromEpochSecond(i).leftMap(e => Err(e.details))))(
date => Attempt.successful(date.epochSecond)
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.chrisdavenport.mules.http4s.scodec
package io.chrisdavenport.mules.http4s.codecs

import io.chrisdavenport.mules.http4s._
import org.scalacheck._
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.chrisdavenport.mules.http4s.scodec
package io.chrisdavenport.mules.http4s.codecs

import io.chrisdavenport.mules.http4s._
import Arbitraries._
Expand Down

0 comments on commit b4690d7

Please sign in to comment.