🚚 Rename http package to web

This commit is contained in:
2025-03-29 14:45:12 +08:00
parent ae2c141efa
commit c24ed1e7e6
17 changed files with 39 additions and 39 deletions

View File

@@ -6,7 +6,7 @@ import (
"strings"
"git.solsynth.dev/hypernet/messaging/pkg/internal/gap"
"git.solsynth.dev/hypernet/messaging/pkg/internal/http/exts"
"git.solsynth.dev/hypernet/messaging/pkg/internal/web/exts"
"git.solsynth.dev/hypernet/messaging/pkg/internal/services"
"git.solsynth.dev/hypernet/nexus/pkg/nex"
"git.solsynth.dev/hypernet/nexus/pkg/proto"

View File

@@ -19,8 +19,8 @@ import (
)
type channelIdentityCacheEntry struct {
Channel models.Channel
ChannelMember models.ChannelMember
Channel models.Channel `json:"channel"`
ChannelMember models.ChannelMember `json:"channel_member"`
}
func GetChannelIdentityCacheKey(channel string, user uint, realm ...uint) string {

View File

@@ -6,7 +6,7 @@ import (
"sync"
"git.solsynth.dev/hypernet/messaging/pkg/internal/database"
"git.solsynth.dev/hypernet/messaging/pkg/internal/http/exts"
"git.solsynth.dev/hypernet/messaging/pkg/internal/web/exts"
"git.solsynth.dev/hypernet/messaging/pkg/internal/models"
"git.solsynth.dev/hypernet/messaging/pkg/internal/services"
"github.com/gofiber/fiber/v2"

View File

@@ -2,7 +2,7 @@ package api
import (
"git.solsynth.dev/hypernet/messaging/pkg/internal/gap"
"git.solsynth.dev/hypernet/messaging/pkg/internal/http/exts"
"git.solsynth.dev/hypernet/messaging/pkg/internal/web/exts"
"git.solsynth.dev/hypernet/nexus/pkg/nex/cruda"
"git.solsynth.dev/hypernet/nexus/pkg/nex/sec"
"git.solsynth.dev/hypernet/passport/pkg/authkit"

View File

@@ -8,7 +8,7 @@ import (
"git.solsynth.dev/hypernet/passport/pkg/authkit"
authm "git.solsynth.dev/hypernet/passport/pkg/authkit/models"
"git.solsynth.dev/hypernet/messaging/pkg/internal/http/exts"
"git.solsynth.dev/hypernet/messaging/pkg/internal/web/exts"
"git.solsynth.dev/hypernet/messaging/pkg/internal/database"
"git.solsynth.dev/hypernet/messaging/pkg/internal/models"

View File

@@ -7,7 +7,7 @@ import (
"git.solsynth.dev/hypernet/passport/pkg/authkit"
authm "git.solsynth.dev/hypernet/passport/pkg/authkit/models"
"git.solsynth.dev/hypernet/messaging/pkg/internal/http/exts"
"git.solsynth.dev/hypernet/messaging/pkg/internal/web/exts"
"git.solsynth.dev/hypernet/messaging/pkg/internal/models"
"git.solsynth.dev/hypernet/messaging/pkg/internal/services"

View File

@@ -7,7 +7,7 @@ import (
authm "git.solsynth.dev/hypernet/passport/pkg/authkit/models"
"github.com/samber/lo"
"git.solsynth.dev/hypernet/messaging/pkg/internal/http/exts"
"git.solsynth.dev/hypernet/messaging/pkg/internal/web/exts"
"git.solsynth.dev/hypernet/messaging/pkg/internal/models"
"git.solsynth.dev/hypernet/messaging/pkg/internal/services"
"github.com/gofiber/fiber/v2"

View File

@@ -5,7 +5,7 @@ import (
authm "git.solsynth.dev/hypernet/passport/pkg/authkit/models"
"strings"
"git.solsynth.dev/hypernet/messaging/pkg/internal/http/exts"
"git.solsynth.dev/hypernet/messaging/pkg/internal/web/exts"
"git.solsynth.dev/hypernet/messaging/pkg/internal/models"
"git.solsynth.dev/hypernet/messaging/pkg/internal/services"
"github.com/gofiber/fiber/v2"

View File

@@ -4,7 +4,7 @@ import (
"fmt"
"strings"
"git.solsynth.dev/hypernet/messaging/pkg/internal/http/exts"
"git.solsynth.dev/hypernet/messaging/pkg/internal/web/exts"
"git.solsynth.dev/hypernet/messaging/pkg/internal/models"
"git.solsynth.dev/hypernet/messaging/pkg/internal/services"
"github.com/gofiber/fiber/v2"

View File

@@ -1,4 +1,4 @@
package http
package web
import (
"strings"
@@ -6,7 +6,7 @@ import (
"git.solsynth.dev/hypernet/nexus/pkg/nex/sec"
"git.solsynth.dev/hypernet/passport/pkg/authkit"
"git.solsynth.dev/hypernet/messaging/pkg/internal/http/api"
"git.solsynth.dev/hypernet/messaging/pkg/internal/web/api"
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/cors"
"github.com/gofiber/fiber/v2/middleware/idempotency"

View File

@@ -15,7 +15,7 @@ import (
"git.solsynth.dev/hypernet/messaging/pkg/internal/services"
"github.com/robfig/cron/v3"
"git.solsynth.dev/hypernet/messaging/pkg/internal/http"
"git.solsynth.dev/hypernet/messaging/pkg/internal/web"
pkg "git.solsynth.dev/hypernet/messaging/pkg/internal"
"git.solsynth.dev/hypernet/messaging/pkg/internal/cache"
@@ -57,7 +57,7 @@ func main() {
if reader, err := sec.NewInternalTokenReader(viper.GetString("security.internal_public_key")); err != nil {
log.Error().Err(err).Msg("An error occurred when reading internal public key for jwt. Authentication related features will be disabled.")
} else {
http.IReader = reader
web.IReader = reader
log.Info().Msg("Internal jwt public key loaded.")
}
@@ -77,7 +77,7 @@ func main() {
services.SetupLiveKit()
// Server
go http.NewServer().Listen()
go web.NewServer().Listen()
go grpc.NewGrpc().Listen()