From b97e0403c8f0be0bf415e537981763495ae0b783 Mon Sep 17 00:00:00 2001 From: KushBlazingJudah <59340248+KushBlazingJudah@users.noreply.github.com> Date: Tue, 26 Oct 2021 22:33:30 -0300 Subject: move routes to subpackage --- routes/actor.go | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++ routes/admin.go | 39 ++++++++++++++++++++++++++++++++++++ routes/boardmgmt.go | 47 +++++++++++++++++++++++++++++++++++++++++++ routes/follow.go | 15 ++++++++++++++ routes/inbox.go | 9 +++++++++ routes/index.go | 7 +++++++ routes/media.go | 7 +++++++ routes/news.go | 7 +++++++ routes/outbox.go | 9 +++++++++ 9 files changed, 197 insertions(+) create mode 100644 routes/actor.go create mode 100644 routes/admin.go create mode 100644 routes/boardmgmt.go create mode 100644 routes/follow.go create mode 100644 routes/inbox.go create mode 100644 routes/index.go create mode 100644 routes/media.go create mode 100644 routes/news.go create mode 100644 routes/outbox.go (limited to 'routes') diff --git a/routes/actor.go b/routes/actor.go new file mode 100644 index 0000000..7fc9cb5 --- /dev/null +++ b/routes/actor.go @@ -0,0 +1,57 @@ +package routes + +import "github.com/gofiber/fiber/v2" + +func ActorIndex(c *fiber.Ctx) error { + // STUB + // TODO: OutboxGet, already implemented + return c.SendString("actor index") +} + +func ActorPostGet(c *fiber.Ctx) error { + // STUB + // TODO: PostGet + return c.SendString("actor post") +} + +func ActorInbox(c *fiber.Ctx) error { + // STUB + + return c.SendString("actor inbox") +} + +func ActorOutbox(c *fiber.Ctx) error { + // STUB + + return c.SendString("actor outbox") +} + +func ActorFollowing(c *fiber.Ctx) error { + // STUB + + return c.SendString("actor following") +} + +func ActorFollowers(c *fiber.Ctx) error { + // STUB + + return c.SendString("actor followers") +} + +func ActorReported(c *fiber.Ctx) error { + // STUB + + return c.SendString("actor reported") +} + +func ActorArchive(c *fiber.Ctx) error { + // STUB + + return c.SendString("actor archive") +} + +func ActorPost(c *fiber.Ctx) error { + // STUB + + return c.SendString("actor post") +} diff --git a/routes/admin.go b/routes/admin.go new file mode 100644 index 0000000..068dda3 --- /dev/null +++ b/routes/admin.go @@ -0,0 +1,39 @@ +package routes + +import "github.com/gofiber/fiber/v2" + +func AdminVerify(c *fiber.Ctx) error { + // STUB + + return c.SendString("admin verify") +} + +func AdminAuth(c *fiber.Ctx) error { + // STUB + + return c.SendString("admin auth") +} + +func AdminIndex(c *fiber.Ctx) error { + // STUB + + return c.SendString("admin index") +} + +func AdminAddBoard(c *fiber.Ctx) error { + // STUB + + return c.SendString("admin add board") +} + +func AdminPostNews(c *fiber.Ctx) error { + // STUB + + return c.SendString("admin post news") +} + +func AdminNewsDelete(c *fiber.Ctx) error { + // STUB + + return c.SendString("admin news delete") +} diff --git a/routes/boardmgmt.go b/routes/boardmgmt.go new file mode 100644 index 0000000..12e133d --- /dev/null +++ b/routes/boardmgmt.go @@ -0,0 +1,47 @@ +package routes + +import "github.com/gofiber/fiber/v2" + +func BoardBanMedia(c *fiber.Ctx) error { + return c.SendString("board ban media") +} + +func BoardDelete(c *fiber.Ctx) error { + return c.SendString("board delete") +} + +func BoardDeleteAttach(c *fiber.Ctx) error { + return c.SendString("board delete attach") +} + +func BoardMarkSensitive(c *fiber.Ctx) error { + return c.SendString("board mark sensitive") +} + +func BoardRemove(c *fiber.Ctx) error { + return c.SendString("board remove") +} + +func BoardRemoveAttach(c *fiber.Ctx) error { + return c.SendString("board remove attach") +} + +func BoardAddToIndex(c *fiber.Ctx) error { + return c.SendString("board add to index") +} + +func BoardPopArchive(c *fiber.Ctx) error { + return c.SendString("board pop archive") +} + +func BoardAutoSubscribe(c *fiber.Ctx) error { + return c.SendString("board auto subscribe") +} + +func BoardBlacklist(c *fiber.Ctx) error { + return c.SendString("board blacklist") +} + +func BoardReport(c *fiber.Ctx) error { + return c.SendString("board report") +} diff --git a/routes/follow.go b/routes/follow.go new file mode 100644 index 0000000..2578983 --- /dev/null +++ b/routes/follow.go @@ -0,0 +1,15 @@ +package routes + +import "github.com/gofiber/fiber/v2" + +func Following(c *fiber.Ctx) error { + // STUB + + return c.SendString("main following") +} + +func Followers(c *fiber.Ctx) error { + // STUB + + return c.SendString("main followers") +} diff --git a/routes/inbox.go b/routes/inbox.go new file mode 100644 index 0000000..2f88329 --- /dev/null +++ b/routes/inbox.go @@ -0,0 +1,9 @@ +package routes + +import "github.com/gofiber/fiber/v2" + +func Inbox(c *fiber.Ctx) error { + // STUB + + return c.SendString("main inbox") +} diff --git a/routes/index.go b/routes/index.go new file mode 100644 index 0000000..ccd398b --- /dev/null +++ b/routes/index.go @@ -0,0 +1,7 @@ +package routes + +import "github.com/gofiber/fiber/v2" + +func Index(c *fiber.Ctx) error { + return c.SendString("index") +} diff --git a/routes/media.go b/routes/media.go new file mode 100644 index 0000000..a4543c1 --- /dev/null +++ b/routes/media.go @@ -0,0 +1,7 @@ +package routes + +import "github.com/gofiber/fiber/v2" + +func ApiMedia(c *fiber.Ctx) error { + return c.SendString("api media") +} diff --git a/routes/news.go b/routes/news.go new file mode 100644 index 0000000..585614d --- /dev/null +++ b/routes/news.go @@ -0,0 +1,7 @@ +package routes + +import "github.com/gofiber/fiber/v2" + +func NewsGet(c *fiber.Ctx) error { + return c.SendString("news get") +} diff --git a/routes/outbox.go b/routes/outbox.go new file mode 100644 index 0000000..8945bb1 --- /dev/null +++ b/routes/outbox.go @@ -0,0 +1,9 @@ +package routes + +import "github.com/gofiber/fiber/v2" + +func Outbox(c *fiber.Ctx) error { + // STUB + + return c.SendString("main outbox") +} -- cgit v1.2.3