Nitweb config file.

Introduced properties

private var _catalog: Catalog

nitc :: NitwebConfig :: _catalog

Catalog to pass to handlers.
private var _filter: nullable ModelFilter

nitc :: NitwebConfig :: _filter

The JSON API does not filter anything by default.
private var _mainmodule: MModule

nitc :: NitwebConfig :: _mainmodule

MModule used to flatten model.
private var _md_processor: MarkdownProcessor

nitc :: NitwebConfig :: _md_processor

Specific Markdown processor to use within Nitweb
private var _model: Model

nitc :: NitwebConfig :: _model

Model to use.
private var _modelbuilder: ModelBuilder

nitc :: NitwebConfig :: _modelbuilder

Modelbuilder used to access sources.
private var _stars: StarRatingRepo

nitc :: NitwebConfig :: _stars

MongoDB collection used to store stars.
fun catalog: Catalog

nitc :: NitwebConfig :: catalog

Catalog to pass to handlers.
protected fun catalog=(catalog: Catalog)

nitc :: NitwebConfig :: catalog=

Catalog to pass to handlers.
init defaultinit(model: Model, mainmodule: MModule, modelbuilder: ModelBuilder, filter: nullable ModelFilter, catalog: Catalog)

nitc :: NitwebConfig :: defaultinit

fun filter: nullable ModelFilter

nitc :: NitwebConfig :: filter

The JSON API does not filter anything by default.
protected fun filter=(filter: nullable ModelFilter)

nitc :: NitwebConfig :: filter=

The JSON API does not filter anything by default.
fun github_client_id: String

nitc :: NitwebConfig :: github_client_id

Github client id used for Github OAuth login.
fun github_client_secret: String

nitc :: NitwebConfig :: github_client_secret

Github client secret used for Github OAuth login.
fun mainmodule: MModule

nitc :: NitwebConfig :: mainmodule

MModule used to flatten model.
protected fun mainmodule=(mainmodule: MModule)

nitc :: NitwebConfig :: mainmodule=

MModule used to flatten model.
fun md_processor: MarkdownProcessor

nitc :: NitwebConfig :: md_processor

Specific Markdown processor to use within Nitweb
protected fun md_processor=(md_processor: MarkdownProcessor)

nitc :: NitwebConfig :: md_processor=

Specific Markdown processor to use within Nitweb
fun model: Model

nitc :: NitwebConfig :: model

Model to use.
protected fun model=(model: Model)

nitc :: NitwebConfig :: model=

Model to use.
fun modelbuilder: ModelBuilder

nitc :: NitwebConfig :: modelbuilder

Modelbuilder used to access sources.
protected fun modelbuilder=(modelbuilder: ModelBuilder)

nitc :: NitwebConfig :: modelbuilder=

Modelbuilder used to access sources.
fun stars: StarRatingRepo

nitc :: NitwebConfig :: stars

MongoDB collection used to store stars.
protected fun stars=(stars: StarRatingRepo)

nitc :: NitwebConfig :: stars=

MongoDB collection used to store stars.

Redefined properties

redef type SELF: NitwebConfig

nitc $ NitwebConfig :: SELF

Type of this instance, automatically specialized in every class
redef fun default_db_name: String

nitc $ NitwebConfig :: default_db_name

Default database hostname

All properties

fun !=(other: nullable Object): Bool

core :: Object :: !=

Have self and other different values?
fun ==(other: nullable Object): Bool

core :: Object :: ==

Have self and other the same value?
type CLASS: Class[SELF]

core :: Object :: CLASS

The type of the class of self.
type SELF: Object

core :: Object :: SELF

Type of this instance, automatically specialized in every class
private var _catalog: Catalog

nitc :: NitwebConfig :: _catalog

Catalog to pass to handlers.
private var _client: MongoClient

popcorn :: AppConfig :: _client

Mongo db client
private var _db: MongoDb

popcorn :: AppConfig :: _db

Mongo db instance
private var _default_config_file: String

config :: IniConfig :: _default_config_file

Default config file path
private var _default_db_host: String

popcorn :: AppConfig :: _default_db_host

Default database host string for MongoDb
private var _default_db_name: String

popcorn :: AppConfig :: _default_db_name

Default database hostname
private var _filter: nullable ModelFilter

nitc :: NitwebConfig :: _filter

The JSON API does not filter anything by default.
private var _ini: IniFile

config :: IniConfig :: _ini

Config tree used to store config options
private var _mainmodule: MModule

nitc :: NitwebConfig :: _mainmodule

MModule used to flatten model.
private var _md_processor: MarkdownProcessor

nitc :: NitwebConfig :: _md_processor

Specific Markdown processor to use within Nitweb
private var _model: Model

nitc :: NitwebConfig :: _model

Model to use.
private var _modelbuilder: ModelBuilder

nitc :: NitwebConfig :: _modelbuilder

Modelbuilder used to access sources.
private var _opt_black_exts: OptionArray

config :: Config :: _opt_black_exts

--blacklist-exts
private var _opt_black_exts: OptionArray

config :: Config :: _opt_black_exts

--blacklist-exts
private var _opt_config: OptionString

config :: IniConfig :: _opt_config

Path to app config file
private var _opt_db_host: OptionString

popcorn :: AppConfig :: _opt_db_host

MongoDb host name
private var _opt_db_name: OptionString

popcorn :: AppConfig :: _opt_db_name

MongoDb database name
private var _opt_help: OptionBool

config :: Config :: _opt_help

Help option
private var _opt_host: OptionString

popcorn :: AppConfig :: _opt_host

Host name to bind on (will overwrite the config one).
private var _opt_hostname: OptionString

popcorn :: AppConfig :: _opt_hostname

Displayed host name
private var _opt_lang: OptionString

config :: Config :: _opt_lang

--lang
private var _opt_port: OptionInt

popcorn :: AppConfig :: _opt_port

Port number to bind on (will overwrite the config one).
private var _opt_port: OptionInt

config :: Config :: _opt_port

private var _opt_server: OptionString

config :: Config :: _opt_server

--server
private var _opt_stub_man: OptionBool

config :: Config :: _opt_stub_man

Option --stub-man
private var _opt_white_exts: OptionArray

config :: Config :: _opt_white_exts

--whitelist-exts
private var _opt_white_exts: OptionArray

config :: Config :: _opt_white_exts

--whitelist-exts
private var _opts: OptionContext

config :: Config :: _opts

Context used to store and parse options
private var _stars: StarRatingRepo

nitc :: NitwebConfig :: _stars

MongoDB collection used to store stars.
private var _tool_description: String

config :: Config :: _tool_description

Name, usage and synopsis of the tool.
private var _tracker: PopTracker

popcorn :: AppConfig :: _tracker

Tracker handler
private var _tracker_logs: TrackerRepo

popcorn :: AppConfig :: _tracker_logs

Logs collection
fun add_option(opt: Option...)

config :: Config :: add_option

Add an option to self
fun app_host: String

popcorn :: AppConfig :: app_host

Web app host name
fun app_hostname: String

popcorn :: AppConfig :: app_hostname

Displayed host name config
fun app_port: Int

popcorn :: AppConfig :: app_port

Web app port
fun args: Array[String]

config :: Config :: args

Return the remaining args once options are parsed by from_args
fun catalog: Catalog

nitc :: NitwebConfig :: catalog

Catalog to pass to handlers.
protected fun catalog=(catalog: Catalog)

nitc :: NitwebConfig :: catalog=

Catalog to pass to handlers.
protected fun class_factory(name: String): CLASS

core :: Object :: class_factory

Implementation used by get_class to create the specific class.
fun class_name: String

core :: Object :: class_name

The class name of the object.
fun client: MongoClient

popcorn :: AppConfig :: client

Mongo db client
protected fun client=(client: MongoClient)

popcorn :: AppConfig :: client=

Mongo db client
fun config_file: String

config :: IniConfig :: config_file

Return the config file path from options or the default
fun db: MongoDb

popcorn :: AppConfig :: db

Mongo db instance
protected fun db=(db: MongoDb)

popcorn :: AppConfig :: db=

Mongo db instance
fun db_host: String

popcorn :: AppConfig :: db_host

MongoDB server used for data persistence
fun db_name: String

popcorn :: AppConfig :: db_name

MongoDB DB used for data persistence
fun default_config_file: String

config :: IniConfig :: default_config_file

Default config file path
fun default_config_file=(default_config_file: String)

config :: IniConfig :: default_config_file=

Default config file path
fun default_db_host: String

popcorn :: AppConfig :: default_db_host

Default database host string for MongoDb
protected fun default_db_host=(default_db_host: String)

popcorn :: AppConfig :: default_db_host=

Default database host string for MongoDb
fun default_db_name: String

popcorn :: AppConfig :: default_db_name

Default database hostname
protected fun default_db_name=(default_db_name: String)

popcorn :: AppConfig :: default_db_name=

Default database hostname
init defaultinit(model: Model, mainmodule: MModule, modelbuilder: ModelBuilder, filter: nullable ModelFilter, catalog: Catalog)

nitc :: NitwebConfig :: defaultinit

fun filter: nullable ModelFilter

nitc :: NitwebConfig :: filter

The JSON API does not filter anything by default.
protected fun filter=(filter: nullable ModelFilter)

nitc :: NitwebConfig :: filter=

The JSON API does not filter anything by default.
fun get_class: CLASS

core :: Object :: get_class

The meta-object representing the dynamic type of self.
fun github_client_id: String

nitc :: NitwebConfig :: github_client_id

Github client id used for Github OAuth login.
fun github_client_secret: String

nitc :: NitwebConfig :: github_client_secret

Github client secret used for Github OAuth login.
fun hash: Int

core :: Object :: hash

The hash code of the object.
fun help: Bool

config :: Config :: help

Was the --help option requested?
fun ini: IniFile

config :: IniConfig :: ini

Config tree used to store config options
protected fun ini=(ini: IniFile)

config :: IniConfig :: ini=

Config tree used to store config options
init init

core :: Object :: init

fun inspect: String

core :: Object :: inspect

Developer readable representation of self.
protected fun inspect_head: String

core :: Object :: inspect_head

Return "CLASSNAME:#OBJECTID".
intern fun is_same_instance(other: nullable Object): Bool

core :: Object :: is_same_instance

Return true if self and other are the same instance (i.e. same identity).
fun is_same_serialized(other: nullable Object): Bool

core :: Object :: is_same_serialized

Is self the same as other in a serialization context?
intern fun is_same_type(other: Object): Bool

core :: Object :: is_same_type

Return true if self and other have the same dynamic type.
fun mainmodule: MModule

nitc :: NitwebConfig :: mainmodule

MModule used to flatten model.
protected fun mainmodule=(mainmodule: MModule)

nitc :: NitwebConfig :: mainmodule=

MModule used to flatten model.
fun md_processor: MarkdownProcessor

nitc :: NitwebConfig :: md_processor

Specific Markdown processor to use within Nitweb
protected fun md_processor=(md_processor: MarkdownProcessor)

nitc :: NitwebConfig :: md_processor=

Specific Markdown processor to use within Nitweb
fun model: Model

nitc :: NitwebConfig :: model

Model to use.
protected fun model=(model: Model)

nitc :: NitwebConfig :: model=

Model to use.
fun modelbuilder: ModelBuilder

nitc :: NitwebConfig :: modelbuilder

Modelbuilder used to access sources.
protected fun modelbuilder=(modelbuilder: ModelBuilder)

nitc :: NitwebConfig :: modelbuilder=

Modelbuilder used to access sources.
private intern fun native_class_name: CString

core :: Object :: native_class_name

The class name of the object in CString format.
intern fun object_id: Int

core :: Object :: object_id

An internal hash code for the object based on its identity.
fun opt_black_exts: OptionArray

config :: Config :: opt_black_exts

--blacklist-exts
fun opt_black_exts: OptionArray

config :: Config :: opt_black_exts

--blacklist-exts
protected fun opt_black_exts=(opt_black_exts: OptionArray)

config :: Config :: opt_black_exts=

--blacklist-exts
protected fun opt_black_exts=(opt_black_exts: OptionArray)

config :: Config :: opt_black_exts=

--blacklist-exts
fun opt_config: OptionString

config :: IniConfig :: opt_config

Path to app config file
protected fun opt_config=(opt_config: OptionString)

config :: IniConfig :: opt_config=

Path to app config file
fun opt_db_host: OptionString

popcorn :: AppConfig :: opt_db_host

MongoDb host name
protected fun opt_db_host=(opt_db_host: OptionString)

popcorn :: AppConfig :: opt_db_host=

MongoDb host name
fun opt_db_name: OptionString

popcorn :: AppConfig :: opt_db_name

MongoDb database name
protected fun opt_db_name=(opt_db_name: OptionString)

popcorn :: AppConfig :: opt_db_name=

MongoDb database name
fun opt_help: OptionBool

config :: Config :: opt_help

Help option
protected fun opt_help=(opt_help: OptionBool)

config :: Config :: opt_help=

Help option
fun opt_host: OptionString

popcorn :: AppConfig :: opt_host

Host name to bind on (will overwrite the config one).
protected fun opt_host=(opt_host: OptionString)

popcorn :: AppConfig :: opt_host=

Host name to bind on (will overwrite the config one).
fun opt_hostname: OptionString

popcorn :: AppConfig :: opt_hostname

Displayed host name
protected fun opt_hostname=(opt_hostname: OptionString)

popcorn :: AppConfig :: opt_hostname=

Displayed host name
protected fun opt_java_cp=(opt_java_cp: OptionString)

config :: Config :: opt_java_cp=

protected fun opt_lang=(opt_lang: OptionString)

config :: Config :: opt_lang=

--lang
fun opt_port: OptionInt

popcorn :: AppConfig :: opt_port

Port number to bind on (will overwrite the config one).
protected fun opt_port=(opt_port: OptionInt)

popcorn :: AppConfig :: opt_port=

Port number to bind on (will overwrite the config one).
protected fun opt_port=(opt_port: OptionInt)

config :: Config :: opt_port=

protected fun opt_server=(opt_server: OptionString)

config :: Config :: opt_server=

--server
fun opt_stub_man: OptionBool

config :: Config :: opt_stub_man

Option --stub-man
protected fun opt_stub_man=(opt_stub_man: OptionBool)

config :: Config :: opt_stub_man=

Option --stub-man
fun opt_white_exts: OptionArray

config :: Config :: opt_white_exts

--whitelist-exts
fun opt_white_exts: OptionArray

config :: Config :: opt_white_exts

--whitelist-exts
protected fun opt_white_exts=(opt_white_exts: OptionArray)

config :: Config :: opt_white_exts=

--whitelist-exts
protected fun opt_white_exts=(opt_white_exts: OptionArray)

config :: Config :: opt_white_exts=

--whitelist-exts
fun opts: OptionContext

config :: Config :: opts

Context used to store and parse options
protected fun opts=(opts: OptionContext)

config :: Config :: opts=

Context used to store and parse options
fun output

core :: Object :: output

Display self on stdout (debug only).
intern fun output_class_name

core :: Object :: output_class_name

Display class name on stdout (debug only).
fun parse_options(args: Collection[String])

config :: Config :: parse_options

Initialize self options from args
fun serialization_hash: Int

core :: Object :: serialization_hash

Hash value use for serialization
fun stars: StarRatingRepo

nitc :: NitwebConfig :: stars

MongoDB collection used to store stars.
protected fun stars=(stars: StarRatingRepo)

nitc :: NitwebConfig :: stars=

MongoDB collection used to store stars.
fun stub_man_options

config :: Config :: stub_man_options

Generate a manpage stub from self
intern fun sys: Sys

core :: Object :: sys

Return the global sys object, the only instance of the Sys class.
abstract fun to_jvalue(env: JniEnv): JValue

core :: Object :: to_jvalue

fun to_s: String

core :: Object :: to_s

User readable representation of self.
fun tool_description: String

config :: Config :: tool_description

Name, usage and synopsis of the tool.
fun tool_description=(tool_description: String)

config :: Config :: tool_description=

Name, usage and synopsis of the tool.
fun tracker: PopTracker

popcorn :: AppConfig :: tracker

Tracker handler
protected fun tracker=(tracker: PopTracker)

popcorn :: AppConfig :: tracker=

Tracker handler
fun tracker_logs: TrackerRepo

popcorn :: AppConfig :: tracker_logs

Logs collection
protected fun tracker_logs=(tracker_logs: TrackerRepo)

popcorn :: AppConfig :: tracker_logs=

Logs collection
fun usage

config :: Config :: usage

Display tool_description and options usage in console
package_diagram nitc::NitwebConfig NitwebConfig popcorn::AppConfig AppConfig nitc::NitwebConfig->popcorn::AppConfig config::IniConfig IniConfig popcorn::AppConfig->config::IniConfig ...config::IniConfig ... ...config::IniConfig->config::IniConfig

Ancestors

class Config

config :: Config

Basic configuration class
class IniConfig

config :: IniConfig

Configuration class based on a INI file.
interface Object

core :: Object

The root of the class hierarchy.

Parents

class AppConfig

popcorn :: AppConfig

Configuration file for Popcorn apps

Class definitions

nitc $ NitwebConfig
# Nitweb config file.
class NitwebConfig
	super AppConfig

	redef fun default_db_name do return "nitweb"

	# Model to use.
	var model: Model

	# MModule used to flatten model.
	var mainmodule: MModule

	# Modelbuilder used to access sources.
	var modelbuilder: ModelBuilder

	# The JSON API does not filter anything by default.
	var filter: nullable ModelFilter

	# Catalog to pass to handlers.
	var catalog: Catalog
end
src/doc/api/api_base.nit:28,1--48,3

nitc :: api_docdown $ NitwebConfig
redef class NitwebConfig
	# Specific Markdown processor to use within Nitweb
	var md_processor: MarkdownProcessor is lazy do
		var parser = new CommandParser(model, mainmodule, modelbuilder, catalog)
		var proc = new CmdMarkdownProcessor(parser)
		proc.decorator = new CmdDecorator(model)
		return proc
	end
end
src/doc/api/api_docdown.nit:21,1--29,3

nitc :: api_auth $ NitwebConfig
redef class NitwebConfig

	# Github client id used for Github OAuth login.
	#
	# * key: `github.client_id`
	# * default: ``
	fun github_client_id: String do return ini["github.client.id"] or else ""

	# Github client secret used for Github OAuth login.
	#
	# * key: `github.client_secret`
	# * default: ``
	fun github_client_secret: String do return ini["github.client.secret"] or else ""
end
src/doc/api/api_auth.nit:20,1--33,3

nitc :: api_feedback $ NitwebConfig
redef class NitwebConfig

	# MongoDB collection used to store stars.
	var stars = new StarRatingRepo(db.collection("stars")) is lazy
end
src/doc/api/api_feedback.nit:21,1--25,3