Switch to new organization convention

This commit is contained in:
SuperMarioDaBom 2023-07-17 18:37:41 -07:00
parent 84db1463eb
commit 7d80142f0f
3 changed files with 13 additions and 9 deletions

View file

@ -0,0 +1,10 @@
package nex
import (
"github.com/PretendoNetwork/friends-secure/globals"
secureconnection "github.com/PretendoNetwork/nex-protocols-common-go/secure-connection"
)
func registerCommonSecureServerProtocols() {
secureconnection.NewCommonSecureConnectionProtocol(globals.SecureServer)
}

View file

@ -5,15 +5,12 @@ import (
nex_account_management "github.com/PretendoNetwork/friends-secure/nex/account-management"
nex_friends_3ds "github.com/PretendoNetwork/friends-secure/nex/friends-3ds"
nex_friends_wiiu "github.com/PretendoNetwork/friends-secure/nex/friends-wiiu"
nex_secure_connection "github.com/PretendoNetwork/friends-secure/nex/secure-connection"
account_management "github.com/PretendoNetwork/nex-protocols-go/account-management"
friends_3ds "github.com/PretendoNetwork/nex-protocols-go/friends-3ds"
friends_wiiu "github.com/PretendoNetwork/nex-protocols-go/friends-wiiu"
secure_connection "github.com/PretendoNetwork/nex-protocols-go/secure-connection"
)
func registerNEXProtocols() {
secureConnectionProtocol := secure_connection.NewSecureConnectionProtocol(globals.SecureServer)
func registerSecureServerProtocols() {
accountManagementProtocol := account_management.NewAccountManagementProtocol(globals.SecureServer)
friendsWiiUProtocol := friends_wiiu.NewFriendsWiiUProtocol(globals.SecureServer)
friends3DSProtocol := friends_3ds.NewFriends3DSProtocol(globals.SecureServer)
@ -21,10 +18,6 @@ func registerNEXProtocols() {
// Account Management protocol handles
accountManagementProtocol.NintendoCreateAccount(nex_account_management.NintendoCreateAccount)
// Secure protocol handles
secureConnectionProtocol.Register(nex_secure_connection.Register)
secureConnectionProtocol.RegisterEx(nex_secure_connection.RegisterEx)
// Friends (WiiU) protocol handles
friendsWiiUProtocol.UpdateAndGetAllInformation(nex_friends_wiiu.UpdateAndGetAllInformation)
friendsWiiUProtocol.AddFriendRequest(nex_friends_wiiu.AddFriendRequest)

View file

@ -68,7 +68,8 @@ func StartSecureServer() {
globals.SecureServer.On("Connect", connect)
registerNEXProtocols()
registerCommonSecureServerProtocols()
registerSecureServerProtocols()
globals.SecureServer.Listen(":" + os.Getenv("PN_FRIENDS_SECURE_SERVER_PORT"))
}