mirror of
https://github.com/nicotsx/ironmount.git
synced 2025-12-10 12:10:51 +01:00
refactor: switch from go to bun
This commit is contained in:
58
apps/server/src/controllers/driver.controller.ts
Normal file
58
apps/server/src/controllers/driver.controller.ts
Normal file
@@ -0,0 +1,58 @@
|
||||
import { Hono } from "hono";
|
||||
|
||||
export const driverController = new Hono()
|
||||
.post("/VolumeDriver.Capabilities", (c) => {
|
||||
return c.json({
|
||||
Capabilities: {
|
||||
Scope: "global",
|
||||
},
|
||||
});
|
||||
})
|
||||
.post("/Plugin.Activate", (c) => {
|
||||
return c.json({
|
||||
Implements: ["VolumeDriver"],
|
||||
});
|
||||
})
|
||||
.post("/VolumeDriver.Create", (c) => {
|
||||
return c.json({
|
||||
Err: "",
|
||||
});
|
||||
})
|
||||
.post("/VolumeDriver.Remove", (c) => {
|
||||
return c.json({
|
||||
Err: "",
|
||||
});
|
||||
})
|
||||
.post("/VolumeDriver.Mount", (c) => {
|
||||
return c.json({
|
||||
Mountpoint: `/mnt/something`,
|
||||
});
|
||||
})
|
||||
.post("/VolumeDriver.Unmount", (c) => {
|
||||
return c.json({
|
||||
Err: "",
|
||||
});
|
||||
})
|
||||
.post("/VolumeDriver.Path", (c) => {
|
||||
return c.json({
|
||||
Mountpoint: `/mnt/something`,
|
||||
});
|
||||
})
|
||||
.post("/VolumeDriver.Get", (c) => {
|
||||
return c.json({
|
||||
Name: "my-volume",
|
||||
Mountpoint: `/mnt/something`,
|
||||
Status: {},
|
||||
});
|
||||
})
|
||||
.post("/VolumeDriver.List", (c) => {
|
||||
return c.json({
|
||||
Volumes: [
|
||||
{
|
||||
Name: "my-volume",
|
||||
Mountpoint: `/mnt/something`,
|
||||
Status: {},
|
||||
},
|
||||
],
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user