🚚 Rename http package to web
This commit is contained in:
@@ -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"
|
||||
|
@@ -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 {
|
||||
|
@@ -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"
|
@@ -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"
|
@@ -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"
|
@@ -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"
|
@@ -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"
|
@@ -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"
|
@@ -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"
|
@@ -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"
|
@@ -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()
|
||||
|
||||
|
Reference in New Issue
Block a user