feat: add basic

Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
2024-03-30 00:27:14 +01:00
commit 00bc0e0363
12 changed files with 2511 additions and 0 deletions

1
crates/drone-templater/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
/target

View File

@@ -0,0 +1,18 @@
[package]
name = "drone-templater"
version = "0.1.0"
edition = "2021"
[dependencies]
anyhow.workspace = true
tokio.workspace = true
tracing.workspace = true
tracing-subscriber.workspace = true
clap.workspace = true
dotenv.workspace = true
axum.workspace = true
serde = { version = "1.0.197", features = ["derive"] }
sqlx = { version = "0.7.3", features = ["runtime-tokio", "tls-rustls", "postgres", "uuid", "time"] }
uuid = { version = "1.7.0", features = ["v4"] }
tower-http = { version = "0.5.2", features = ["cors", "trace"] }

View File

@@ -0,0 +1 @@
-- Add migration script here

View File

@@ -0,0 +1,29 @@
use anyhow::Context;
use clap::{Parser, Subcommand};
#[derive(Parser)]
#[command(author, version, about, long_about = None, subcommand_required = true)]
struct Command {
#[command(subcommand)]
command: Option<Commands>,
}
#[derive(Subcommand)]
enum Commands {
Hello {},
}
#[tokio::main]
async fn main() -> anyhow::Result<()> {
dotenv::dotenv().ok();
tracing_subscriber::fmt::init();
let cli = Command::parse();
tracing::debug!("Starting cli");
if let Some(Commands::Hello { }) = cli.command {
println!("Hello!")
}
Ok(())
}