No description
Find a file
Mike Bierlee bac7ece9af
Some checks failed
CI / dmd-2.097.2 on ubuntu-latest (push) Failing after 3s
CI / dmd-2.098.1 on ubuntu-latest (push) Failing after 4s
CI / dmd-2.099.1 on ubuntu-latest (push) Failing after 3s
CI / dmd-2.100.2 on ubuntu-latest (push) Failing after 3s
CI / dmd-2.101.2 on ubuntu-latest (push) Failing after 3s
CI / dmd-2.102.2 on ubuntu-latest (push) Failing after 3s
CI / dmd-latest on ubuntu-latest (push) Failing after 3s
CI / ldc-1.27.1 on ubuntu-latest (push) Failing after 3s
CI / ldc-1.28.1 on ubuntu-latest (push) Failing after 4s
CI / ldc-1.29.0 on ubuntu-latest (push) Failing after 4s
CI / ldc-1.30.0 on ubuntu-latest (push) Failing after 3s
CI / ldc-1.31.0 on ubuntu-latest (push) Failing after 3s
CI / ldc-1.32.0 on ubuntu-latest (push) Failing after 4s
CI / ldc-latest on ubuntu-latest (push) Failing after 4s
CI / dmd-latest on macos-latest (push) Has been cancelled
CI / dmd-latest on windows-latest (push) Has been cancelled
CI / ldc-latest on macos-latest (push) Has been cancelled
CI / ldc-latest on windows-latest (push) Has been cancelled
Update copyrights
2025-02-01 22:44:05 +01:00
.github/workflows Remove incompatible compilers from build 2023-03-13 23:40:34 +03:00
.vscode Reformat code to use otbs bracestyle 2023-03-07 02:27:21 +03:00
examples Update copyrights 2025-02-01 22:44:05 +01:00
source/poodinis/valueinjector Update copyrights 2025-02-01 22:44:05 +01:00
testfiles Add load functions for individual file formats 2022-11-27 17:59:46 +03:00
.gitignore Fix gitignore 2023-03-07 01:32:51 +03:00
CHANGES.md Add release date 2023-03-13 23:47:35 +03:00
dub.json Upgrade to Poodinis 9.0.0 2023-03-13 23:32:30 +03:00
dub.selections.json Upgrade to Poodinis 9.0.0 2023-03-13 23:32:30 +03:00
LICENSE.txt Update copyrights 2025-02-01 22:44:05 +01:00
makefile Add quickstart example 2022-11-27 18:47:33 +03:00
README.md Update copyrights 2025-02-01 22:44:05 +01:00
testmain.d Update copyrights 2025-02-01 22:44:05 +01:00

Mirage Config injector for Poodinis

Version 2.0.0
Copyright 2022-2025 Mike Bierlee
Licensed under the terms of the MIT license - See LICENSE.txt

DUB Package CI

A config value injector for the Poodinis dependency injection framework using Mirage Config

Requires at least a D 2.097.2 compatible compiler

Getting started

DUB Dependency

See the DUB project page for instructions on how to include Mirage Config into your project.

Quickstart

import poodinis : DependencyContainer, Value;
import poodinis.valueinjector.mirage : loadConfig;

import std.stdio : writeln;
import std.conv : to;

class Server {
    @Value("server.host")
    private string host;

    @Value("server.port")
    private int port;

    public void run() {
        writeln("Running server on " ~ host ~ ":" ~ port.to!string);
    }
}

void main() {
    auto container = new shared DependencyContainer();
    container.register!Server;
    container.loadConfig("config.ini");

    auto server = container.resolve!Server;
    server.run();
}

Functions such as loadConfig are the same as available in Mirage. All individual loaders and parses are available. For more information on how to use Mirage, see https://github.com/mbierlee/mirage-config/blob/main/README.md

History

For a full overview of changes, see CHANGES.md