[][src]Crate oration

Oration: a Rocket/Elm self hosted commenting system for static sites.

Inspired by Isso, which is a welcomed change from Disqus. However, the codebase is unmaintained and security concerns abound. Oration aims to be a fast, lightweight and secure platform for your comments. Nothing more, but importantly, nothing less.

Modules

config

Loads configuration data from disk.

data

Houses Data Structures that are needed in multiple modules.

db

Handles the database connection pool.

errors

Handles the error chain of the program.

models

SQL <----> Rust inerop using Diesel.

notify

Sends notifications to admin.

schema

Verbose schema for the comment database.

static_files

Serves up static files through Rocket.

Structs

CommentId

Used in conjuction with /delete? and /edit?.

Initialise

Information sent to the client upon initialisation.

Post

Used in conjuction with /count? and /comments?.

PostComments

Comments to frontend

Constants

_IMPL_SERIALIZE_FOR_Initialise
_IMPL_SERIALIZE_FOR_PostComments

Statics

static_rocket_route_info_for_delete_comment

Rocket code generated static route information structure.

static_rocket_route_info_for_dislike_comment

Rocket code generated static route information structure.

static_rocket_route_info_for_edit_comment

Rocket code generated static route information structure.

static_rocket_route_info_for_get_comment_count

Rocket code generated static route information structure.

static_rocket_route_info_for_get_comments

Rocket code generated static route information structure.

static_rocket_route_info_for_get_session

Rocket code generated static route information structure.

static_rocket_route_info_for_index

Rocket code generated static route information structure.

static_rocket_route_info_for_initialise

Rocket code generated static route information structure.

static_rocket_route_info_for_like_comment

Rocket code generated static route information structure.

static_rocket_route_info_for_new_comment

Rocket code generated static route information structure.

Functions

delete_comment

Requests comment deletion from a user, may or may not actually delete the comment based on a number of possibilities: authentication issues, over time, etc. Secondarily, the method of deletion may differ. If the comment has children it is not deleted entirely, but flagged so that the rest of the conversation is not automatically pruned.

dislike_comment

Dislikes a comment so long as the current user has not done so already.

edit_comment

Requests an update to a comment from a user, which may or may not occur based on a number of possibilities: authentication issues, over time, etc.

get_comment_count

Returns the comment count for a given post from the database.

get_comments

Return a json block of comment data for the requested url.

get_session

Test function that returns the session hash from the database.

index

Serve up the index file. This is only useful for development. Should not be used in a release.

initialise

Gets a Sha224 hash from a clients IP along with the blog's author hash.

like_comment

Likes a comment so long as the current user has not done so already.

main

Application entry point.

new_comment

Process comment input from form.

print_errors

Prints the current error chain to the log file / stdio.

rocket

Ignite Rocket, connect to the database and start serving data. Exposes a connection to the database so we can set the session on startup.

rocket_route_fn_delete_comment
rocket_route_fn_dislike_comment
rocket_route_fn_edit_comment
rocket_route_fn_get_comment_count
rocket_route_fn_get_comments
rocket_route_fn_get_session
rocket_route_fn_index
rocket_route_fn_initialise
rocket_route_fn_like_comment
rocket_route_fn_new_comment