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 = non_neg_integer() | undefined, type = device | directory | other | regular | symlink | undefined, access = read | write | read_write | none | undefined, atime = file:date_time() | non_neg_integer() | undefined, mtime = file:date_time() | non_neg_integer() | undefined, ctime = file:date_time() | non_neg_integer() | undefined, mode = non_neg_integer() | undefined, links = non_neg_integer() | undefined, major_device = non_neg_integer() | undefined, minor_device = non_neg_integer() | undefined, inode = non_neg_integer() | undefined, uid = non_neg_integer() | undefined, gid = non_neg_integer() | undefined}} | {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