Packages

package files

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. files
  2. TapirStaticContentEndpoints
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. case class FilesOptions[F[_]](calculateETag: (MonadError[F]) => (Option[RangeValue]) => (URL) => F[Option[ETag]], fileFilter: (List[String]) => Boolean, useGzippedIfAvailable: Boolean = false, defaultFile: Option[List[String]]) extends Product with Serializable

    fileFilter

    A file will be exposed only if this function returns true.

    defaultFile

    path segments (relative to the system path from which files are read) of the file to return in case the one requested by the user isn't found. This is useful for SPA apps, where the same main application file needs to be returned regardless of the path.

  2. trait StaticErrorOutput extends AnyRef
  3. case class StaticInput(path: List[String], ifNoneMatch: Option[List[ETag]], ifModifiedSince: Option[Instant], range: Option[Range], acceptEncoding: List[String]) extends Product with Serializable
  4. sealed trait StaticOutput[+T] extends AnyRef
  5. trait TapirStaticContentEndpoints extends AnyRef

    Static content endpoints, including files and resources.

Value Members

  1. def defaultETag(lastModified: Long, range: Option[RangeValue], length: Long): ETag
  2. def staticFileGetServerEndpoint[F[_]](prefix: EndpointInput[Unit])(systemPath: String): ServerEndpoint[Any, F]

    A server endpoint, which exposes a single file from local storage found at systemPath, using the given path.

    A server endpoint, which exposes a single file from local storage found at systemPath, using the given path.

    staticFileGetServerEndpoint("static" / "hello.html")("/home/app/static/data.html")
    Definition Classes
    TapirStaticContentEndpoints
  3. def staticFilesGetEndpoint(prefix: EndpointInput[Unit]): PublicEndpoint[StaticInput, StaticErrorOutput, StaticOutput[FileRange], Any]
    Definition Classes
    TapirStaticContentEndpoints
  4. lazy val staticFilesGetEndpoint: PublicEndpoint[StaticInput, StaticErrorOutput, StaticOutput[FileRange], Any]
    Definition Classes
    TapirStaticContentEndpoints
  5. def staticFilesGetServerEndpoint[F[_]](prefix: EndpointInput[Unit])(systemPath: String, options: FilesOptions[F] = FilesOptions.default[F]): ServerEndpoint[Any, F]

    A server endpoint, which exposes files from local storage found at systemPath, using the given prefix.

    A server endpoint, which exposes files from local storage found at systemPath, using the given prefix. Typically, the prefix is a path, but it can also contain other inputs. For example:

    staticFilesGetServerEndpoint("static" / "files")("/home/app/static")

    A request to /static/files/css/styles.css will try to read the /home/app/static/css/styles.css file.

    Definition Classes
    TapirStaticContentEndpoints
  6. def staticFilesHeadServerEndpoint[F[_]](prefix: EndpointInput[Unit])(systemPath: String, options: FilesOptions[F] = FilesOptions.default[F]): ServerEndpoint[Any, F]

    A server endpoint, used to verify if sever supports range requests for file under particular path Additionally it verify file existence and returns its size

    A server endpoint, used to verify if sever supports range requests for file under particular path Additionally it verify file existence and returns its size

    Definition Classes
    TapirStaticContentEndpoints
  7. def staticFilesServerEndpoints[F[_]](prefix: EndpointInput[Unit])(systemPath: String, options: FilesOptions[F] = FilesOptions.default[F]): List[ServerEndpoint[Any, F]]

    Create a pair of endpoints (head, get) for exposing files from local storage found at systemPath, using the given prefix.

    Create a pair of endpoints (head, get) for exposing files from local storage found at systemPath, using the given prefix. Typically, the prefix is a path, but it can also contain other inputs. For example:

    staticFilesServerEndpoints("static" / "files")("/home/app/static")

    A request to /static/files/css/styles.css will try to read the /home/app/static/css/styles.css file.

    Definition Classes
    TapirStaticContentEndpoints
  8. def staticResourceGetServerEndpoint[F[_]](prefix: EndpointInput[Unit])(classLoader: ClassLoader, resourcePath: String, options: FilesOptions[F] = FilesOptions.default[F]): ServerEndpoint[Any, F]

    A server endpoint, which exposes a single resource available from the given classLoader at resourcePath, using the given path.

    A server endpoint, which exposes a single resource available from the given classLoader at resourcePath, using the given path.

    staticResourceGetServerEndpoint("static" / "hello.html")(classOf[App].getClassLoader, "app/data.html")
    Definition Classes
    TapirStaticContentEndpoints
  9. def staticResourcesGetEndpoint(prefix: EndpointInput[Unit]): PublicEndpoint[StaticInput, StaticErrorOutput, StaticOutput[InputStreamRange], Any]
    Definition Classes
    TapirStaticContentEndpoints
  10. lazy val staticResourcesGetEndpoint: PublicEndpoint[StaticInput, StaticErrorOutput, StaticOutput[InputStreamRange], Any]
    Definition Classes
    TapirStaticContentEndpoints
  11. def staticResourcesGetServerEndpoint[F[_]](prefix: EndpointInput[Unit])(classLoader: ClassLoader, resourcePrefix: String, options: FilesOptions[F] = FilesOptions.default[F]): ServerEndpoint[Any, F]

    A server endpoint, which exposes resources available from the given classLoader, using the given prefix.

    A server endpoint, which exposes resources available from the given classLoader, using the given prefix. Typically, the prefix is a path, but it can also contain other inputs. For example:

    staticResourcesGetServerEndpoint("static" / "files")(classOf[App].getClassLoader, "app")

    A request to /static/files/css/styles.css will try to read the /app/css/styles.css resource.

    Definition Classes
    TapirStaticContentEndpoints
  12. def staticResourcesHeadServerEndpoint[F[_]](prefix: EndpointInput[Unit])(classLoader: ClassLoader, resourcePath: String, options: FilesOptions[F] = FilesOptions.default[F]): ServerEndpoint[Any, F]

    A server endpoint, which can be used to verify the existence of a resource under given path.

    A server endpoint, which can be used to verify the existence of a resource under given path.

    Definition Classes
    TapirStaticContentEndpoints
  13. def staticResourcesServerEndpoints[F[_]](prefix: EndpointInput[Unit])(classLoader: ClassLoader, resourcePath: String, options: FilesOptions[F] = FilesOptions.default[F]): List[ServerEndpoint[Any, F]]

    Create a pair of endpoints (head, get) for exposing resources available from the given classLoader, using the given prefix.

    Create a pair of endpoints (head, get) for exposing resources available from the given classLoader, using the given prefix. Typically, the prefix is a path, but it can also contain other inputs. For example:

    resourcesServerEndpoints("static" / "files")(classOf[App].getClassLoader, "app")

    A request to /static/files/css/styles.css will try to read the /app/css/styles.css resource.

    Definition Classes
    TapirStaticContentEndpoints
  14. object Files
  15. object FilesOptions extends Serializable
  16. object Resources
  17. object StaticErrorOutput
  18. object StaticOutput

Inherited from AnyRef

Inherited from Any

Ungrouped