Module us_web_static

Data Types

access_type()

access_type() = direct | archive

bin_content_path()

bin_content_path() = us_web_handler:bin_content_path()

extra()

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

extra_charset()

extra_charset() = {charset, module(), function()} | {charset, binary()}

extra_etag()

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

extra_mimetypes()

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

file_info()

file_info() = file_utils:file_info()

handler_return()

handler_return() = us_web_handler:handler_return()

handler_state()

handler_state() = us_web_handler:handler_state()

opts()

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

rest_handler_state()

rest_handler_state() = {bin_content_path(), {access_type(), file_info()} | basic_utils:error_term(), extra()}

ustring()

ustring() = text_utils:ustring()

Function Index

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

Function Details

charsets_provided/2

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

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::cowboy_req:req(), HState::rest_handler_state()) -> {{sendfile, 0, non_neg_integer(), binary()}, cowboy_req:req(), rest_handler_state()}

init/2

init(Req::cowboy_req:req(), HState::handler_state()) -> handler_return()

last_modified/2

last_modified(Req::cowboy_req:req(), HState::rest_handler_state()) -> {calendar:datetime(), cowboy_req:req(), rest_handler_state()}

malformed_request/2

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

ranges_provided/2

ranges_provided(Req, State) -> {[{binary(), auto}], Req, State}

resource_exists/2

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


Generated by EDoc