This commit is contained in:
2026-05-10 03:16:13 +02:00
parent 5f05108132
commit 0b441b0759
77 changed files with 2100 additions and 71 deletions
+1
View File
@@ -0,0 +1 @@
pub struct Channel {}
+10
View File
@@ -0,0 +1,10 @@
use serde::{Deserialize, Serialize};
#[derive(Debug, Serialize, Deserialize)]
pub struct CreateChannelRequest {}
#[derive(Debug, Serialize, Deserialize)]
pub struct UpdateChannelRequest {}
#[derive(Debug, Serialize, Deserialize)]
pub struct ChannelResponse {}
+22
View File
@@ -0,0 +1,22 @@
use axum::http::StatusCode;
use axum::response::IntoResponse;
pub async fn get_all() -> impl IntoResponse {
StatusCode::NOT_IMPLEMENTED
}
pub async fn get_by_id() -> impl IntoResponse {
StatusCode::NOT_IMPLEMENTED
}
pub async fn create() -> impl IntoResponse {
StatusCode::NOT_IMPLEMENTED
}
pub async fn update() -> impl IntoResponse {
StatusCode::NOT_IMPLEMENTED
}
pub async fn delete() -> impl IntoResponse {
StatusCode::NOT_IMPLEMENTED
}
+5
View File
@@ -0,0 +1,5 @@
use super::{domain::Channel, dto::ChannelResponse};
pub fn to_response(_item: Channel) -> ChannelResponse {
todo!()
}
+6
View File
@@ -0,0 +1,6 @@
pub mod domain;
pub mod dto;
pub mod handlers;
pub mod mapper;
pub mod routes;
pub mod service;
+14
View File
@@ -0,0 +1,14 @@
use axum::{Router, routing::get};
use super::handlers;
pub fn router() -> Router {
Router::new()
.route("/channels", get(handlers::get_all).post(handlers::create))
.route(
"/channels/:id",
get(handlers::get_by_id)
.put(handlers::update)
.delete(handlers::delete),
)
}
+21
View File
@@ -0,0 +1,21 @@
use super::domain::Channel;
pub async fn find_all() -> Vec<Channel> {
todo!()
}
pub async fn find_by_id(_id: u64) -> Option<Channel> {
todo!()
}
pub async fn create(_item: Channel) -> Channel {
todo!()
}
pub async fn update(_id: u64, _item: Channel) -> Option<Channel> {
todo!()
}
pub async fn delete(_id: u64) -> bool {
todo!()
}