Search documentation of pain

# PainWeb.Endpoint (pain v0.1.0)

# Summary

## Functions

broadcast(topic, event, msg)

Callback implementation for `Phoenix.Endpoint.broadcast/3`.

broadcast!(topic, event, msg)

Callback implementation for `Phoenix.Endpoint.broadcast!/3`.

broadcast_from(from, topic, event, msg)

Callback implementation for `Phoenix.Endpoint.broadcast_from/4`.

broadcast_from!(from, topic, event, msg)

Callback implementation for `Phoenix.Endpoint.broadcast_from!/4`.

call(conn, opts)

Callback implementation for `Plug.call/2`.

child_spec(opts)

Returns the child specification to start the endpoint under a supervision tree.

config(key, default \\ nil)

Returns the endpoint configuration for `key`

config_change(changed, removed)

Reloads the configuration given the application environment changes.

host()

Returns the host for the given endpoint.

init(opts)

Callback implementation for `Plug.init/1`.

local_broadcast(topic, event, msg)

Callback implementation for `Phoenix.Endpoint.local_broadcast/3`.

local_broadcast_from(from, topic, event, msg)

Callback implementation for `Phoenix.Endpoint.local_broadcast_from/4`.

path(path)

Generates the path information when routing to this endpoint.

script_name()

Generates the script name.

server_info(scheme)

Returns the address and port that the server is running on

start_link(opts \\ [])

Starts the endpoint supervision tree.

static_integrity(path)

Generates a base64-encoded cryptographic hash (sha512) to a static file in `priv/static`. Meant to be used for Subresource Integrity with CDNs.

static_lookup(path)

Returns a two item tuple with the first item being the `static_path` and the second item being the `static_integrity`.

static_path(path)

Generates a route to a static file in `priv/static`.

static_url()

Generates the static URL without any path information.

struct_url()

Generates the endpoint base URL but as a `URI` struct.

subscribe(topic, opts \\ [])

Callback implementation for `Phoenix.Endpoint.subscribe/2`.

unsubscribe(topic)

Callback implementation for `Phoenix.Endpoint.unsubscribe/1`.

url()

Generates the endpoint base URL without any path information.

# Functions

Link to this function

# broadcast(topic, event, msg)

Callback implementation for `Phoenix.Endpoint.broadcast/3`.

Link to this function

# broadcast!(topic, event, msg)

Callback implementation for `Phoenix.Endpoint.broadcast!/3`.

Link to this function

# broadcast_from(from, topic, event, msg)

Callback implementation for `Phoenix.Endpoint.broadcast_from/4`.

Link to this function

# broadcast_from!(from, topic, event, msg)

Callback implementation for `Phoenix.Endpoint.broadcast_from!/4`.

Link to this function

# call(conn, opts)

Callback implementation for `Plug.call/2`.

Link to this function

# child_spec(opts)

Returns the child specification to start the endpoint under a supervision tree.

Link to this function

# config(key, default \\ nil)

Returns the endpoint configuration for `key`

Returns `default` if the key does not exist.

Link to this function

# config_change(changed, removed)

Reloads the configuration given the application environment changes.

Link to this function

# host()

Returns the host for the given endpoint.

Link to this function

# init(opts)

Callback implementation for `Plug.init/1`.

Link to this function

# local_broadcast(topic, event, msg)

Callback implementation for `Phoenix.Endpoint.local_broadcast/3`.

Link to this function

# local_broadcast_from(from, topic, event, msg)

Callback implementation for `Phoenix.Endpoint.local_broadcast_from/4`.

Link to this function

# path(path)

Generates the path information when routing to this endpoint.

Link to this function

# script_name()

Generates the script name.

Link to this function

# server_info(scheme)

Returns the address and port that the server is running on

Link to this function

# start_link(opts \\ [])

Starts the endpoint supervision tree.

All other options are merged into the endpoint configuration.

Link to this function

# static_integrity(path)

Generates a base64-encoded cryptographic hash (sha512) to a static file in `priv/static`. Meant to be used for Subresource Integrity with CDNs.

Link to this function

# static_lookup(path)

Returns a two item tuple with the first item being the `static_path` and the second item being the `static_integrity`.

Link to this function

# static_path(path)

Generates a route to a static file in `priv/static`.

Link to this function

# static_url()

Generates the static URL without any path information.

It uses the configuration under `:static_url` to generate such. It falls back to `:url` if `:static_url` is not set.

Link to this function

# struct_url()

Generates the endpoint base URL but as a `URI` struct.

It uses the configuration under `:url` to generate such. Useful for manipulating the URL data and passing it to URL helpers.

Link to this function

# subscribe(topic, opts \\ [])

Callback implementation for `Phoenix.Endpoint.subscribe/2`.

Link to this function

# unsubscribe(topic)

Callback implementation for `Phoenix.Endpoint.unsubscribe/1`.

Link to this function

# url()

Generates the endpoint base URL without any path information.

It uses the configuration under `:url` to generate such.