proute/config

Types

pub type Config {
  Config(
    pages_root: String,
    output_root: String,
    mounts: List(Mount),
  )
}

Constructors

  • Config(
      pages_root: String,
      output_root: String,
      mounts: List(Mount),
    )
pub type ConfigError {
  MissingConfig(path: String)
  MalformedConfig(message: String)
  MissingProuteTable
  MissingMounts
  MissingMountName(index: Int)
  InvalidMountName(name: String)
  DuplicateMountName(name: String)
  InvalidConstructorPrefix(
    name: String,
    constructor_prefix: String,
  )
  InvalidRouteRoot(name: String, route_root: String)
  InvalidPageSharedStateType(name: String, value: String)
}

Constructors

  • MissingConfig(path: String)
  • MalformedConfig(message: String)
  • MissingProuteTable
  • MissingMounts
  • MissingMountName(index: Int)
  • InvalidMountName(name: String)
  • DuplicateMountName(name: String)
  • InvalidConstructorPrefix(
      name: String,
      constructor_prefix: String,
    )
  • InvalidRouteRoot(name: String, route_root: String)
  • InvalidPageSharedStateType(name: String, value: String)
pub type Mount {
  Mount(
    name: String,
    pages: String,
    route_root: String,
    output_dir: String,
    routes_output: String,
    pages_output: String,
    page_input_output: String,
    constructor_prefix: String,
    page_shared_state_type: String,
  )
}

Constructors

  • Mount(
      name: String,
      pages: String,
      route_root: String,
      output_dir: String,
      routes_output: String,
      pages_output: String,
      page_input_output: String,
      constructor_prefix: String,
      page_shared_state_type: String,
    )

Values

pub const default_output_root: String
pub fn default_page_shared_state_type(name: String) -> String
pub const default_pages_root: String
pub fn describe_error(error: ConfigError) -> String
pub fn parse(source: String) -> Result(Config, ConfigError)
Search Document