Module cowboy_static

Data Types

extra()

extra() = [extra_etag() | extra_mimetypes()]

extra_etag()

extra_etag() = {etag, module(), function()} | {etag, false}

extra_mimetypes()

extra_mimetypes() = {mimetypes, module(), function()} | {mimetypes, binary() | {binary(), binary(), [{binary(), binary()}]}}

opts()

opts() = {file | dir, string() | binary()} | {file | dir, string() | binary(), extra()} | {priv_file | priv_dir, atom(), string() | binary()} | {priv_file | priv_dir, atom(), string() | binary(), extra()}

state()

state() = {binary(), {ok, #file_info{size = undefined | non_neg_integer(), type = undefined | device | directory | other | regular | symlink, access = undefined | read | write | read_write | none, atime = undefined | file:date_time() | non_neg_integer(), mtime = undefined | file:date_time() | non_neg_integer(), ctime = undefined | file:date_time() | non_neg_integer(), mode = undefined | non_neg_integer(), links = undefined | non_neg_integer(), major_device = undefined | non_neg_integer(), minor_device = undefined | non_neg_integer(), inode = undefined | non_neg_integer(), uid = undefined | non_neg_integer(), gid = undefined | non_neg_integer()}} | {error, atom()}, extra()}

Function Index

content_types_provided/2
forbidden/2
generate_etag/2
get_file/2
init/2
last_modified/2
malformed_request/2
resource_exists/2

Function Details

content_types_provided/2

content_types_provided(Req, State) -> {[{binary(), get_file}], Req, State}

forbidden/2

forbidden(Req, State) -> {boolean(), Req, State}

generate_etag/2

generate_etag(Req, State) -> {{strong | weak, binary()}, Req, State}

get_file/2

get_file(Req, State) -> {{stream, non_neg_integer(), function()}, Req, State}

init/2

init(Req, Opts::opts()) -> {cowboy_rest, Req, error | state()}

last_modified/2

last_modified(Req, State) -> {calendar:datetime(), Req, State}

malformed_request/2

malformed_request(Req, State) -> {boolean(), Req, State}

resource_exists/2

resource_exists(Req, State) -> {boolean(), Req, State}


Generated by EDoc, Aug 2 2016, 23:18:59.