added bazel builds

This commit is contained in:
ari committed 2026-11-01 14:59:37 -05:00
1 parent 4c082aca7c
commit e90c9f324b
23 files changed
+460 -86

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
load("@rules_go//go:def.bzl", "go_library", "go_test")
go_library(
name = "acp",
srcs = ["acp.go"],
importpath = "slackerbot/internal/acp",
visibility = ["//slackerbot:__subpackages__"],
deps = ["//slackerbot/internal/node"],
)
go_test(
name = "acp_test",
srcs = ["acp_test.go"],
embed = [":acp"],
deps = ["@com_github_coder_websocket//:websocket"],
)
+24
View File
@@ -0,0 +1,24 @@
load("@rules_go//go:def.bzl", "go_library", "go_test")
go_library(
name = "balance",
srcs = ["balance.go"],
importpath = "slackerbot/internal/balance",
visibility = ["//slackerbot:__subpackages__"],
deps = [
"//slackerbot/internal/model",
"//slackerbot/internal/node",
"//slackerbot/internal/storage",
],
)
go_test(
name = "balance_test",
srcs = ["balance_test.go"],
embed = [":balance"],
deps = [
"//slackerbot/internal/model",
"//slackerbot/internal/node",
"//slackerbot/internal/storage",
],
)
+56
View File
@@ -0,0 +1,56 @@
load("@rules_go//go:def.bzl", "go_library", "go_test")
go_library(
name = "bot",
srcs = [
"assistant.go",
"bot.go",
"files.go",
"lifecycle.go",
"listen.go",
"manage.go",
"stream.go",
"version.go",
],
importpath = "slackerbot/internal/bot",
visibility = ["//slackerbot:__subpackages__"],
deps = [
"//slackerbot/internal/acp",
"//slackerbot/internal/balance",
"//slackerbot/internal/commands",
"//slackerbot/internal/config",
"//slackerbot/internal/manager",
"//slackerbot/internal/model",
"//slackerbot/internal/node",
"//slackerbot/internal/state",
"//slackerbot/internal/storage",
"//slackerbot/internal/tools",
"//slackerbot/internal/units",
"//slackerbot/internal/util",
"@com_github_slack_go_slack//:slack",
"@com_github_slack_go_slack//slackevents",
"@com_github_slack_go_slack//socketmode",
],
)
go_test(
name = "bot_test",
srcs = [
"bot_test.go",
"lifecycle_test.go",
"version_test.go",
],
embed = [":bot"],
deps = [
"//slackerbot/internal/acp",
"//slackerbot/internal/balance",
"//slackerbot/internal/config",
"//slackerbot/internal/manager",
"//slackerbot/internal/model",
"//slackerbot/internal/state",
"//slackerbot/internal/testutil",
"//slackerbot/internal/testutil/clustertest",
"@com_github_slack_go_slack//:slack",
"@com_github_slack_go_slack//slackevents",
],
)
+19
View File
@@ -0,0 +1,19 @@
load("@rules_go//go:def.bzl", "go_library", "go_test")
go_library(
name = "commands",
srcs = ["commands.go"],
importpath = "slackerbot/internal/commands",
visibility = ["//slackerbot:__subpackages__"],
deps = [
"//slackerbot/internal/model",
"//slackerbot/internal/units",
],
)
go_test(
name = "commands_test",
srcs = ["commands_test.go"],
embed = [":commands"],
deps = ["//slackerbot/internal/model"],
)
+20
View File
@@ -0,0 +1,20 @@
load("@rules_go//go:def.bzl", "go_library", "go_test")
go_library(
name = "config",
srcs = ["config.go"],
importpath = "slackerbot/internal/config",
visibility = ["//slackerbot:__subpackages__"],
deps = [
"//slackerbot/internal/model",
"//slackerbot/internal/units",
"@com_github_burntsushi_toml//:toml",
],
)
go_test(
name = "config_test",
srcs = ["config_test.go"],
data = ["//:config.example.toml"],
embed = [":config"],
)
+28
View File
@@ -0,0 +1,28 @@
load("@rules_go//go:def.bzl", "go_library", "go_test")
go_library(
name = "local",
srcs = [
"capacity.go",
"files.go",
"local.go",
"transfer.go",
],
importpath = "slackerbot/internal/local",
visibility = ["//slackerbot:__subpackages__"],
deps = [
"//slackerbot/internal/config",
"//slackerbot/internal/model",
"//slackerbot/internal/node",
"//slackerbot/internal/storage",
"//slackerbot/internal/util",
"@com_github_godbus_dbus_v5//:dbus",
],
)
go_test(
name = "local_test",
srcs = ["capacity_test.go"],
embed = [":local"],
deps = ["//slackerbot/internal/model"],
)
+41
View File
@@ -0,0 +1,41 @@
load("@rules_go//go:def.bzl", "go_library", "go_test")
go_library(
name = "manager",
srcs = [
"cluster.go",
"files.go",
"manager.go",
"migrate.go",
],
importpath = "slackerbot/internal/manager",
visibility = ["//slackerbot:__subpackages__"],
deps = [
"//slackerbot/internal/balance",
"//slackerbot/internal/config",
"//slackerbot/internal/model",
"//slackerbot/internal/node",
"//slackerbot/internal/state",
"//slackerbot/internal/storage",
"//slackerbot/internal/util",
"@com_github_coder_websocket//:websocket",
],
)
go_test(
name = "manager_test",
srcs = [
"cluster_test.go",
"files_test.go",
"migrate_test.go",
],
embed = [":manager"],
deps = [
"//slackerbot/internal/config",
"//slackerbot/internal/model",
"//slackerbot/internal/node",
"//slackerbot/internal/state",
"//slackerbot/internal/testutil",
"//slackerbot/internal/testutil/clustertest",
],
)
+21
View File
@@ -0,0 +1,21 @@
load("@rules_go//go:def.bzl", "go_library", "go_test")
go_library(
name = "model",
srcs = [
"model.go",
"permissions.go",
],
importpath = "slackerbot/internal/model",
visibility = ["//slackerbot:__subpackages__"],
)
go_test(
name = "model_test",
srcs = ["permissions_test.go"],
data = ["//:config.example.toml"],
deps = [
":model",
"//slackerbot/internal/config",
],
)
+12
View File
@@ -0,0 +1,12 @@
load("@rules_go//go:def.bzl", "go_library")
go_library(
name = "node",
srcs = ["node.go"],
importpath = "slackerbot/internal/node",
visibility = ["//slackerbot:__subpackages__"],
deps = [
"//slackerbot/internal/model",
"@com_github_coder_websocket//:websocket",
],
)
+16
View File
@@ -0,0 +1,16 @@
load("@rules_go//go:def.bzl", "go_library", "go_test")
go_library(
name = "state",
srcs = ["store.go"],
importpath = "slackerbot/internal/state",
visibility = ["//slackerbot:__subpackages__"],
deps = ["//slackerbot/internal/model"],
)
go_test(
name = "state_test",
srcs = ["store_test.go"],
embed = [":state"],
deps = ["//slackerbot/internal/model"],
)
+14
View File
@@ -0,0 +1,14 @@
load("@rules_go//go:def.bzl", "go_library", "go_test")
go_library(
name = "storage",
srcs = ["storage.go"],
importpath = "slackerbot/internal/storage",
visibility = ["//slackerbot:__subpackages__"],
)
go_test(
name = "storage_test",
srcs = ["storage_test.go"],
embed = [":storage"],
)
+13
View File
@@ -0,0 +1,13 @@
load("@rules_go//go:def.bzl", "go_library")
go_library(
name = "testutil",
srcs = ["testutil.go"],
importpath = "slackerbot/internal/testutil",
visibility = ["//slackerbot:__subpackages__"],
deps = [
"//slackerbot/internal/model",
"//slackerbot/internal/node",
"//slackerbot/internal/util",
],
)
@@ -0,0 +1,15 @@
load("@rules_go//go:def.bzl", "go_library")
go_library(
name = "clustertest",
srcs = ["clustertest.go"],
importpath = "slackerbot/internal/testutil/clustertest",
visibility = ["//slackerbot:__subpackages__"],
deps = [
"//slackerbot/internal/config",
"//slackerbot/internal/manager",
"//slackerbot/internal/model",
"//slackerbot/internal/state",
"//slackerbot/internal/testutil",
],
)
+22
View File
@@ -0,0 +1,22 @@
load("@rules_go//go:def.bzl", "go_library", "go_test")
go_library(
name = "tools",
srcs = [
"server.go",
"session.go",
],
importpath = "slackerbot/internal/tools",
visibility = ["//slackerbot:__subpackages__"],
deps = ["//slackerbot/internal/acp"],
)
go_test(
name = "tools_test",
srcs = [
"server_test.go",
"session_test.go",
],
embed = [":tools"],
deps = ["//slackerbot/internal/acp"],
)
+14
View File
@@ -0,0 +1,14 @@
load("@rules_go//go:def.bzl", "go_library", "go_test")
go_library(
name = "units",
srcs = ["units.go"],
importpath = "slackerbot/internal/units",
visibility = ["//slackerbot:__subpackages__"],
)
go_test(
name = "units_test",
srcs = ["units_test.go"],
embed = [":units"],
)
+8
View File
@@ -0,0 +1,8 @@
load("@rules_go//go:def.bzl", "go_library")
go_library(
name = "util",
srcs = ["util.go"],
importpath = "slackerbot/internal/util",
visibility = ["//slackerbot:__subpackages__"],
)