diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..12f1b6b --- /dev/null +++ b/Makefile @@ -0,0 +1,64 @@ +# TODO - Assumes a UNIX-like OS + +RED := $(shell tput setaf 1) +BLUE := $(shell tput setaf 4) +CYAN := $(shell tput setaf 14) +ORANGE := $(shell tput setaf 202) +YELLOW := $(shell tput setaf 214) +RESET := $(shell tput sgr0) + +ifeq ($(shell which go),) +# TODO - Read contents from .git folder instead? +$(error "$(RED)go command not found. Install go to continue $(BLUE)https://go.dev/doc/install$(RESET)") +endif + +ifneq ($(wildcard .git),) +# * .git folder exists, build server build string from repo info +ifeq ($(shell which git),) +# TODO - Read contents from .git folder instead? +$(error "$(RED)git command not found. Install git to continue $(ORANGE)https://git-scm.com/downloads$(RESET)") +endif +$(info "$(CYAN)Building server build string from repository info$(RESET)") +# * Build server build string from repo info +BRANCH := $(shell git rev-parse --abbrev-ref HEAD) +REMOTE_ORIGIN := $(shell git config --get remote.origin.url) + +# * Handle multiple origin URL formats +HTTPS_PREFIX_CHECK := $(shell echo $(REMOTE_ORIGIN) | head -c 8) +HTTP_PREFIX_CHECK := $(shell echo $(REMOTE_ORIGIN) | head -c 7) +GIT@_PREFIX_CHECK := $(shell echo $(REMOTE_ORIGIN) | head -c 4) + +ifeq ($(HTTPS_PREFIX_CHECK), https://) +REMOTE_PATH := $(shell echo $(REMOTE_ORIGIN) | cut -d/ -f4-) +else ifeq ($(HTTP_PREFIX_CHECK), http://) +REMOTE_PATH := $(shell echo $(REMOTE_ORIGIN) | cut -d/ -f4-) +else ifeq ($(GIT@_PREFIX_CHECK), git@) +REMOTE_PATH := $(shell echo $(REMOTE_ORIGIN) | cut -d: -f2-) +else +REMOTE_PATH := $(shell echo $(REMOTE_ORIGIN) | cut -d/ -f2-) +endif + +HASH := $(shell git rev-parse --short HEAD) +SERVER_BUILD := $(BRANCH):$(REMOTE_PATH)@$(HASH) + +else +# * .git folder not present, assume downloaded from zip file and just use folder name +$(info "$(CYAN)git repository not found. Building server build string from folder name$(RESET)") +SERVER_BUILD := friends +endif + +# * Final build string +DATE_TIME := $(shell date --iso=seconds) +BUILD_STRING := $(SERVER_BUILD), $(DATE_TIME) + +default: +ifeq ($(wildcard .env),) + $(warning "$(YELLOW).env file not found, environment variables may not be populated correctly$(RESET)") +endif + go get -u + go mod tidy + go build -ldflags "-X 'main.serverBuildString=$(BUILD_STRING)'" -o ./build/friends + +docker: + docker build -t friends --build-arg BUILD_STRING="$(BUILD_STRING)" . + docker image prune --filter label=stage=builder -f diff --git a/README.md b/README.md index c0ee440..9154426 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,99 @@ -# Friends - Secure -### Pretendo Friends secure server +# Friends replacement server +Includes both the authentication and secure servers -## About -Handles basic functionality for Wii U and 3DS friends. Many things are not implemented. \ No newline at end of file +## Compiling + +### Setup +Install [Go](https://go.dev/doc/install) and [git](https://git-scm.com/downloads), then clone and enter the repository + +```bash +$ git clone https://github.com/PretendoNetwork/friends +$ cd friends +``` + +### Compiling and running using `docker` (Preferred) +Install Docker either through your systems package manager or the [official installer](https://docs.docker.com/get-docker/) + +To build the container: + +```bash +$ docker build -t friends . +$ docker image prune --filter label=stage=builder -f +``` +Optionally you may provide `BUILD_STRING` to `--build-arg` to set the authentication server build string + +```bash +$ docker build -t friends --build-arg BUILD_STRING=auth-build-string . +$ docker image prune --filter label=stage=builder -f +``` +If `BUILD_STRING` is not set, the default build string `pretendo.friends.docker` is used. You may also use the `docker` rule when building with `make` to set the build string automatically. See [compiling using `make`](#compiling-using-make) below for more info + +To run the image first create a `.env` file with your [Configuration](#configuration) set before using `docker run` + +Example: +``` +PN_FRIENDS_POSTGRES_URI=postgres://username:password@localhost/friends?sslmode=disable +PN_FRIENDS_AUTHENTICATION_SERVER_PORT=60000 +... +``` + +```bash +$ docker run --name friends --env-file .env -it friends +``` + +The image is compatible popular container managers such as Docker Compose and Portainer + +### Compiling using `go` +To compile using Go, `go get` the required modules and then `go build` to your desired location. You may also want to tidy the go modules, though this is optional + +```bash +$ go get -u +$ go mod tidy +$ go build -o build/friends +``` + +The server is now built to `build/friends` + +When compiling with only Go, the authentication servers build string is not automatically set. This should not cause any issues with gameplay, but it means that the server build will not be visible in any packet dumps or logs a title may produce + +To compile the servers with the authentication server build string, add `-ldflags "-X 'main.serverBuildString=BUILD_STRING_HERE'"` to the build command, or use `make` to compile the server + +### Compiling using `make` +Compiling using `make` will read the local `.git` directory to create a dynamic authentication server build string, based on your repositories remote origin and current commit + +Install `make` either through your systems package manager or the [official download](https://www.gnu.org/software/make/). We provide two different rules; A `default` rule which compiles [using `go`](#compiling-using-go), and a `docker` rule which compiles [using `docker`](#compiling-and-running-using-docker-preferred). Please refer to each sections setup instructions before continuing with your preferred rule + +To build using `go` + +```bash +$ make +``` + +The server is now built to `build/friends` + +To build using `docker` + +```bash +$ make docker +``` + +The image is now ready to run + +## Configuration +All configuration options are handled via environment variables + +`.env` files are supported + +| Name | Description | Required | +|-----------------------------------------|------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------| +| `PN_FRIENDS_CONFIG_DATABASE_URI` | Fully qualified URI to your Postgres server (Example `postgres://username:password@localhost/friends?sslmode=disable`) | Yes | +| `PN_FRIENDS_CONFIG_KERBEROS_PASSWORD` | Password used as part of the internal server data in Kerberos tickets | No (Default password `password` will be used) | +| `PN_FRIENDS_CONFIG_AES_KEY` | AES key used in tokens provided by the account server | Yes | +| `PN_FRIENDS_CONFIG_GRPC_API_KEY` | API key for your GRPC server | No (Assumed to be an open gRPC API) | +| `PN_FRIENDS_GRPC_SERVER_PORT` | Port for the GRPC server | Yes | +| `PN_FRIENDS_AUTHENTICATION_SERVER_PORT` | Port for the authentication server | Yes | +| `PN_FRIENDS_SECURE_SERVER_HOST` | Host name for the secure server (should point to the same address as the authentication server) | Yes | +| `PN_FRIENDS_SECURE_SERVER_PORT` | Port for the secure server | Yes | +| `PN_FRIENDS_ACCOUNT_GRPC_HOST` | Host name for your account server gRPC service | Yes | +| `PN_FRIENDS_ACCOUNT_GRPC_PORT` | Port for your account server gRPC service | Yes | +| `PN_FRIENDS_ACCOUNT_GRPC_API_KEY` | API key for your account server gRPC service | No (Assumed to be an open gRPC API) | diff --git a/database/3ds/get_friend_miis.go b/database/3ds/get_friend_miis.go index 3892fa7..030b9ea 100644 --- a/database/3ds/get_friend_miis.go +++ b/database/3ds/get_friend_miis.go @@ -4,8 +4,8 @@ import ( "database/sql" "time" - "github.com/PretendoNetwork/friends-secure/database" - "github.com/PretendoNetwork/friends-secure/globals" + "github.com/PretendoNetwork/friends/database" + "github.com/PretendoNetwork/friends/globals" "github.com/PretendoNetwork/nex-go" friends_3ds_types "github.com/PretendoNetwork/nex-protocols-go/friends-3ds/types" ) diff --git a/database/3ds/get_friend_persistent_infos.go b/database/3ds/get_friend_persistent_infos.go index ddde61d..b1c9077 100644 --- a/database/3ds/get_friend_persistent_infos.go +++ b/database/3ds/get_friend_persistent_infos.go @@ -4,8 +4,8 @@ import ( "database/sql" "time" - "github.com/PretendoNetwork/friends-secure/database" - "github.com/PretendoNetwork/friends-secure/globals" + "github.com/PretendoNetwork/friends/database" + "github.com/PretendoNetwork/friends/globals" "github.com/PretendoNetwork/nex-go" friends_3ds_types "github.com/PretendoNetwork/nex-protocols-go/friends-3ds/types" ) diff --git a/database/3ds/get_user_friends.go b/database/3ds/get_user_friends.go index 21fabfa..ec2f53f 100644 --- a/database/3ds/get_user_friends.go +++ b/database/3ds/get_user_friends.go @@ -3,8 +3,8 @@ package database_3ds import ( "database/sql" - "github.com/PretendoNetwork/friends-secure/database" - "github.com/PretendoNetwork/friends-secure/globals" + "github.com/PretendoNetwork/friends/database" + "github.com/PretendoNetwork/friends/globals" friends_3ds_types "github.com/PretendoNetwork/nex-protocols-go/friends-3ds/types" ) diff --git a/database/3ds/remove_friendship.go b/database/3ds/remove_friendship.go index b62d55a..17110e8 100644 --- a/database/3ds/remove_friendship.go +++ b/database/3ds/remove_friendship.go @@ -1,7 +1,7 @@ package database_3ds import ( - "github.com/PretendoNetwork/friends-secure/database" + "github.com/PretendoNetwork/friends/database" ) // RemoveFriendship removes a user's friend relationship diff --git a/database/3ds/save_friendship.go b/database/3ds/save_friendship.go index 93583ed..3069ad5 100644 --- a/database/3ds/save_friendship.go +++ b/database/3ds/save_friendship.go @@ -3,7 +3,7 @@ package database_3ds import ( "time" - "github.com/PretendoNetwork/friends-secure/database" + "github.com/PretendoNetwork/friends/database" "github.com/PretendoNetwork/nex-go" friends_3ds_types "github.com/PretendoNetwork/nex-protocols-go/friends-3ds/types" ) diff --git a/database/3ds/update_user_comment.go b/database/3ds/update_user_comment.go index 4a42424..7c3079f 100644 --- a/database/3ds/update_user_comment.go +++ b/database/3ds/update_user_comment.go @@ -1,7 +1,7 @@ package database_3ds import ( - "github.com/PretendoNetwork/friends-secure/database" + "github.com/PretendoNetwork/friends/database" "github.com/PretendoNetwork/nex-go" ) diff --git a/database/3ds/update_user_favorite_game.go b/database/3ds/update_user_favorite_game.go index 2e3707a..abe9fe7 100644 --- a/database/3ds/update_user_favorite_game.go +++ b/database/3ds/update_user_favorite_game.go @@ -1,7 +1,7 @@ package database_3ds import ( - "github.com/PretendoNetwork/friends-secure/database" + "github.com/PretendoNetwork/friends/database" friends_3ds_types "github.com/PretendoNetwork/nex-protocols-go/friends-3ds/types" ) diff --git a/database/3ds/update_user_last_online_time.go b/database/3ds/update_user_last_online_time.go index 7414201..6e0a399 100644 --- a/database/3ds/update_user_last_online_time.go +++ b/database/3ds/update_user_last_online_time.go @@ -3,7 +3,7 @@ package database_3ds import ( "database/sql" - "github.com/PretendoNetwork/friends-secure/database" + "github.com/PretendoNetwork/friends/database" "github.com/PretendoNetwork/nex-go" ) diff --git a/database/3ds/update_user_mii.go b/database/3ds/update_user_mii.go index 4475c85..d65572b 100644 --- a/database/3ds/update_user_mii.go +++ b/database/3ds/update_user_mii.go @@ -1,7 +1,7 @@ package database_3ds import ( - "github.com/PretendoNetwork/friends-secure/database" + "github.com/PretendoNetwork/friends/database" "github.com/PretendoNetwork/nex-go" friends_3ds_types "github.com/PretendoNetwork/nex-protocols-go/friends-3ds/types" ) diff --git a/database/3ds/update_user_preferences.go b/database/3ds/update_user_preferences.go index c849ce4..15a7abd 100644 --- a/database/3ds/update_user_preferences.go +++ b/database/3ds/update_user_preferences.go @@ -1,7 +1,7 @@ package database_3ds import ( - "github.com/PretendoNetwork/friends-secure/database" + "github.com/PretendoNetwork/friends/database" ) // UpdateUserPreferences updates a user's preferences diff --git a/database/3ds/update_user_profile.go b/database/3ds/update_user_profile.go index 1336420..ee48667 100644 --- a/database/3ds/update_user_profile.go +++ b/database/3ds/update_user_profile.go @@ -1,7 +1,7 @@ package database_3ds import ( - "github.com/PretendoNetwork/friends-secure/database" + "github.com/PretendoNetwork/friends/database" friends_3ds_types "github.com/PretendoNetwork/nex-protocols-go/friends-3ds/types" ) diff --git a/database/connect_mongo.go b/database/connect_mongo.go deleted file mode 100644 index ee666f3..0000000 --- a/database/connect_mongo.go +++ /dev/null @@ -1,27 +0,0 @@ -package database - -import ( - "context" - "os" - "time" - - "github.com/PretendoNetwork/friends-secure/globals" - "go.mongodb.org/mongo-driver/mongo" - "go.mongodb.org/mongo-driver/mongo/options" -) - -var mongoClient *mongo.Client -var mongoContext context.Context -var mongoDatabase *mongo.Database -var MongoCollection *mongo.Collection - -func connectMongo() { - mongoClient, _ = mongo.NewClient(options.Client().ApplyURI(os.Getenv("PN_FRIENDS_CONFIG_MONGO_URI"))) - mongoContext, _ = context.WithTimeout(context.Background(), 10*time.Second) - _ = mongoClient.Connect(mongoContext) - - mongoDatabase = mongoClient.Database("pretendo") - MongoCollection = mongoDatabase.Collection("pnids") - - globals.Logger.Success("Connected to Mongo!") -} diff --git a/database/connect_postgres.go b/database/connect_postgres.go index 76065e5..c8a402f 100644 --- a/database/connect_postgres.go +++ b/database/connect_postgres.go @@ -6,12 +6,12 @@ import ( _ "github.com/lib/pq" - "github.com/PretendoNetwork/friends-secure/globals" + "github.com/PretendoNetwork/friends/globals" ) var Postgres *sql.DB -func connectPostgres() { +func ConnectPostgres() { var err error Postgres, err = sql.Open("postgres", os.Getenv("PN_FRIENDS_CONFIG_DATABASE_URI")) diff --git a/database/database.go b/database/database.go index 5f1dbd5..8a2c7f4 100644 --- a/database/database.go +++ b/database/database.go @@ -5,11 +5,6 @@ import ( "strings" ) -func Connect() { - connectMongo() - connectPostgres() -} - func PIDArrayToString(array []uint32) string { return strings.Trim(strings.Replace(fmt.Sprint(array), " ", ",", -1), "[]") } diff --git a/database/init_postgres_3ds.go b/database/init_postgres_3ds.go index e218bf4..a84548b 100644 --- a/database/init_postgres_3ds.go +++ b/database/init_postgres_3ds.go @@ -1,6 +1,6 @@ package database -import "github.com/PretendoNetwork/friends-secure/globals" +import "github.com/PretendoNetwork/friends/globals" func initPostgres3DS() { var err error diff --git a/database/init_postgres_wiiu.go b/database/init_postgres_wiiu.go index 946f2a6..eaf25a8 100644 --- a/database/init_postgres_wiiu.go +++ b/database/init_postgres_wiiu.go @@ -1,6 +1,6 @@ package database -import "github.com/PretendoNetwork/friends-secure/globals" +import "github.com/PretendoNetwork/friends/globals" func initPostgresWiiU() { var err error diff --git a/database/wiiu/accept_friend_request_and_return_friend_info.go b/database/wiiu/accept_friend_request_and_return_friend_info.go index fd31e95..8399b91 100644 --- a/database/wiiu/accept_friend_request_and_return_friend_info.go +++ b/database/wiiu/accept_friend_request_and_return_friend_info.go @@ -3,8 +3,8 @@ package database_wiiu import ( "time" - "github.com/PretendoNetwork/friends-secure/database" - "github.com/PretendoNetwork/friends-secure/globals" + "github.com/PretendoNetwork/friends/database" + "github.com/PretendoNetwork/friends/globals" "github.com/PretendoNetwork/nex-go" friends_wiiu_types "github.com/PretendoNetwork/nex-protocols-go/friends-wiiu/types" ) diff --git a/database/wiiu/delete_friend_request_and_return_friend_pid.go b/database/wiiu/delete_friend_request_and_return_friend_pid.go index 1a11085..425dcf5 100644 --- a/database/wiiu/delete_friend_request_and_return_friend_pid.go +++ b/database/wiiu/delete_friend_request_and_return_friend_pid.go @@ -1,7 +1,7 @@ package database_wiiu import ( - "github.com/PretendoNetwork/friends-secure/database" + "github.com/PretendoNetwork/friends/database" ) func DeleteFriendRequestAndReturnFriendPID(friendRequestID uint64) (uint32, error) { diff --git a/database/wiiu/get_pids_by_friend_request_id.go b/database/wiiu/get_pids_by_friend_request_id.go index cc18f30..16dfdfc 100644 --- a/database/wiiu/get_pids_by_friend_request_id.go +++ b/database/wiiu/get_pids_by_friend_request_id.go @@ -3,8 +3,8 @@ package database_wiiu import ( "database/sql" - "github.com/PretendoNetwork/friends-secure/database" - "github.com/PretendoNetwork/friends-secure/globals" + "github.com/PretendoNetwork/friends/database" + "github.com/PretendoNetwork/friends/globals" ) // Get a users outgoing friend request diff --git a/database/wiiu/get_user_block_list.go b/database/wiiu/get_user_block_list.go index 85054c7..d889128 100644 --- a/database/wiiu/get_user_block_list.go +++ b/database/wiiu/get_user_block_list.go @@ -1,8 +1,8 @@ package database_wiiu import ( - "github.com/PretendoNetwork/friends-secure/database" - "github.com/PretendoNetwork/friends-secure/globals" + "github.com/PretendoNetwork/friends/database" + "github.com/PretendoNetwork/friends/globals" "github.com/PretendoNetwork/nex-go" friends_wiiu_types "github.com/PretendoNetwork/nex-protocols-go/friends-wiiu/types" ) diff --git a/database/wiiu/get_user_comment.go b/database/wiiu/get_user_comment.go index c11187f..b74d8a2 100644 --- a/database/wiiu/get_user_comment.go +++ b/database/wiiu/get_user_comment.go @@ -3,8 +3,8 @@ package database_wiiu import ( "database/sql" - "github.com/PretendoNetwork/friends-secure/database" - "github.com/PretendoNetwork/friends-secure/globals" + "github.com/PretendoNetwork/friends/database" + "github.com/PretendoNetwork/friends/globals" "github.com/PretendoNetwork/nex-go" friends_wiiu_types "github.com/PretendoNetwork/nex-protocols-go/friends-wiiu/types" ) diff --git a/database/wiiu/get_user_friend_list.go b/database/wiiu/get_user_friend_list.go index 6c4741a..c46029d 100644 --- a/database/wiiu/get_user_friend_list.go +++ b/database/wiiu/get_user_friend_list.go @@ -4,8 +4,8 @@ import ( "fmt" "time" - "github.com/PretendoNetwork/friends-secure/database" - "github.com/PretendoNetwork/friends-secure/globals" + "github.com/PretendoNetwork/friends/database" + "github.com/PretendoNetwork/friends/globals" "github.com/PretendoNetwork/nex-go" friends_wiiu_types "github.com/PretendoNetwork/nex-protocols-go/friends-wiiu/types" "github.com/gocql/gocql" diff --git a/database/wiiu/get_user_friend_pids.go b/database/wiiu/get_user_friend_pids.go index fec8176..475aa97 100644 --- a/database/wiiu/get_user_friend_pids.go +++ b/database/wiiu/get_user_friend_pids.go @@ -1,8 +1,8 @@ package database_wiiu import ( - "github.com/PretendoNetwork/friends-secure/database" - "github.com/PretendoNetwork/friends-secure/globals" + "github.com/PretendoNetwork/friends/database" + "github.com/PretendoNetwork/friends/globals" ) // Get a users friend PIDs list diff --git a/database/wiiu/get_user_friend_requests_in.go b/database/wiiu/get_user_friend_requests_in.go index e902b88..2fcdd15 100644 --- a/database/wiiu/get_user_friend_requests_in.go +++ b/database/wiiu/get_user_friend_requests_in.go @@ -3,8 +3,8 @@ package database_wiiu import ( "time" - "github.com/PretendoNetwork/friends-secure/database" - "github.com/PretendoNetwork/friends-secure/globals" + "github.com/PretendoNetwork/friends/database" + "github.com/PretendoNetwork/friends/globals" "github.com/PretendoNetwork/nex-go" friends_wiiu_types "github.com/PretendoNetwork/nex-protocols-go/friends-wiiu/types" ) diff --git a/database/wiiu/get_user_friend_requests_out.go b/database/wiiu/get_user_friend_requests_out.go index f1349aa..8a2cdee 100644 --- a/database/wiiu/get_user_friend_requests_out.go +++ b/database/wiiu/get_user_friend_requests_out.go @@ -1,8 +1,8 @@ package database_wiiu import ( - "github.com/PretendoNetwork/friends-secure/database" - "github.com/PretendoNetwork/friends-secure/globals" + "github.com/PretendoNetwork/friends/database" + "github.com/PretendoNetwork/friends/globals" "github.com/PretendoNetwork/nex-go" friends_wiiu_types "github.com/PretendoNetwork/nex-protocols-go/friends-wiiu/types" ) diff --git a/database/wiiu/get_user_info_by_pid.go b/database/wiiu/get_user_info_by_pid.go index 745cbc5..d3a3f3b 100644 --- a/database/wiiu/get_user_info_by_pid.go +++ b/database/wiiu/get_user_info_by_pid.go @@ -1,42 +1,33 @@ package database_wiiu import ( - "context" "encoding/base64" - "github.com/PretendoNetwork/friends-secure/database" - "github.com/PretendoNetwork/friends-secure/globals" + "github.com/PretendoNetwork/friends/globals" "github.com/PretendoNetwork/nex-go" friends_wiiu_types "github.com/PretendoNetwork/nex-protocols-go/friends-wiiu/types" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/mongo" - "go.mongodb.org/mongo-driver/mongo/options" ) func GetUserInfoByPID(pid uint32) *friends_wiiu_types.PrincipalBasicInfo { - var result bson.M - info := friends_wiiu_types.NewPrincipalBasicInfo() - err := database.MongoCollection.FindOne(context.TODO(), bson.D{{Key: "pid", Value: pid}}, options.FindOne()).Decode(&result) + userData, err := globals.GetUserData(pid) if err != nil { - if err != mongo.ErrNoDocuments { - globals.Logger.Critical(err.Error()) - } + globals.Logger.Critical(err.Error()) return info } info.PID = pid - info.NNID = result["username"].(string) + info.NNID = userData.Username info.Mii = friends_wiiu_types.NewMiiV2() info.Unknown = 2 - encodedMiiData := result["mii"].(bson.M)["data"].(string) + encodedMiiData := userData.Mii.Data decodedMiiData, _ := base64.StdEncoding.DecodeString(encodedMiiData) - info.Mii.Name = result["mii"].(bson.M)["name"].(string) + info.Mii.Name = userData.Mii.Name info.Mii.Unknown1 = 0 info.Mii.Unknown2 = 0 info.Mii.MiiData = decodedMiiData diff --git a/database/wiiu/get_user_principal_preference.go b/database/wiiu/get_user_principal_preference.go index a7ede67..8c3e125 100644 --- a/database/wiiu/get_user_principal_preference.go +++ b/database/wiiu/get_user_principal_preference.go @@ -3,8 +3,8 @@ package database_wiiu import ( "database/sql" - "github.com/PretendoNetwork/friends-secure/database" - "github.com/PretendoNetwork/friends-secure/globals" + "github.com/PretendoNetwork/friends/database" + "github.com/PretendoNetwork/friends/globals" friends_wiiu_types "github.com/PretendoNetwork/nex-protocols-go/friends-wiiu/types" ) diff --git a/database/wiiu/is_friend_request_blocked.go b/database/wiiu/is_friend_request_blocked.go index 7d39529..310aa06 100644 --- a/database/wiiu/is_friend_request_blocked.go +++ b/database/wiiu/is_friend_request_blocked.go @@ -1,8 +1,8 @@ package database_wiiu import ( - "github.com/PretendoNetwork/friends-secure/database" - "github.com/PretendoNetwork/friends-secure/globals" + "github.com/PretendoNetwork/friends/database" + "github.com/PretendoNetwork/friends/globals" ) func IsFriendRequestBlocked(requesterPID uint32, requestedPID uint32) bool { diff --git a/database/wiiu/remove_friendship.go b/database/wiiu/remove_friendship.go index 7963026..8c2d607 100644 --- a/database/wiiu/remove_friendship.go +++ b/database/wiiu/remove_friendship.go @@ -1,7 +1,7 @@ package database_wiiu import ( - "github.com/PretendoNetwork/friends-secure/database" + "github.com/PretendoNetwork/friends/database" ) // Remove a user's friend relationship diff --git a/database/wiiu/save_friend_request.go b/database/wiiu/save_friend_request.go index 8a84238..921230d 100644 --- a/database/wiiu/save_friend_request.go +++ b/database/wiiu/save_friend_request.go @@ -3,7 +3,7 @@ package database_wiiu import ( "database/sql" - "github.com/PretendoNetwork/friends-secure/database" + "github.com/PretendoNetwork/friends/database" ) func SaveFriendRequest(senderPID uint32, recipientPID uint32, sentTime uint64, expireTime uint64, message string) (uint64, error) { diff --git a/database/wiiu/set_friend_request_accepted.go b/database/wiiu/set_friend_request_accepted.go index f61ecc3..5cbde7c 100644 --- a/database/wiiu/set_friend_request_accepted.go +++ b/database/wiiu/set_friend_request_accepted.go @@ -1,7 +1,7 @@ package database_wiiu import ( - "github.com/PretendoNetwork/friends-secure/database" + "github.com/PretendoNetwork/friends/database" ) func SetFriendRequestAccepted(friendRequestID uint64) error { diff --git a/database/wiiu/set_friend_request_denied.go b/database/wiiu/set_friend_request_denied.go index 8253c28..7204aac 100644 --- a/database/wiiu/set_friend_request_denied.go +++ b/database/wiiu/set_friend_request_denied.go @@ -1,7 +1,7 @@ package database_wiiu import ( - "github.com/PretendoNetwork/friends-secure/database" + "github.com/PretendoNetwork/friends/database" ) func SetFriendRequestDenied(friendRequestID uint64) error { diff --git a/database/wiiu/set_friend_request_received.go b/database/wiiu/set_friend_request_received.go index 99f7fe6..7fc9537 100644 --- a/database/wiiu/set_friend_request_received.go +++ b/database/wiiu/set_friend_request_received.go @@ -1,7 +1,7 @@ package database_wiiu import ( - "github.com/PretendoNetwork/friends-secure/database" + "github.com/PretendoNetwork/friends/database" ) func SetFriendRequestReceived(friendRequestID uint64) error { diff --git a/database/wiiu/set_user_blocked.go b/database/wiiu/set_user_blocked.go index 66051c9..73c7518 100644 --- a/database/wiiu/set_user_blocked.go +++ b/database/wiiu/set_user_blocked.go @@ -3,7 +3,7 @@ package database_wiiu import ( "time" - "github.com/PretendoNetwork/friends-secure/database" + "github.com/PretendoNetwork/friends/database" "github.com/PretendoNetwork/nex-go" ) diff --git a/database/wiiu/unset_friend_request_denied.go b/database/wiiu/unset_friend_request_denied.go index bf809c8..2b66254 100644 --- a/database/wiiu/unset_friend_request_denied.go +++ b/database/wiiu/unset_friend_request_denied.go @@ -1,7 +1,7 @@ package database_wiiu import ( - "github.com/PretendoNetwork/friends-secure/database" + "github.com/PretendoNetwork/friends/database" ) func UnsetFriendRequestDenied(friendRequestID uint64) error { diff --git a/database/wiiu/unset_user_blocked.go b/database/wiiu/unset_user_blocked.go index 14a1857..07b5093 100644 --- a/database/wiiu/unset_user_blocked.go +++ b/database/wiiu/unset_user_blocked.go @@ -1,7 +1,7 @@ package database_wiiu import ( - "github.com/PretendoNetwork/friends-secure/database" + "github.com/PretendoNetwork/friends/database" ) // Remove a block from a user diff --git a/database/wiiu/update_user_comment.go b/database/wiiu/update_user_comment.go index 66d1838..6fdb61c 100644 --- a/database/wiiu/update_user_comment.go +++ b/database/wiiu/update_user_comment.go @@ -1,7 +1,7 @@ package database_wiiu import ( - "github.com/PretendoNetwork/friends-secure/database" + "github.com/PretendoNetwork/friends/database" "github.com/PretendoNetwork/nex-go" ) diff --git a/database/wiiu/update_user_last_online_time.go b/database/wiiu/update_user_last_online_time.go index b5e5143..0659c4d 100644 --- a/database/wiiu/update_user_last_online_time.go +++ b/database/wiiu/update_user_last_online_time.go @@ -1,8 +1,8 @@ package database_wiiu import ( - "github.com/PretendoNetwork/friends-secure/database" - "github.com/PretendoNetwork/friends-secure/globals" + "github.com/PretendoNetwork/friends/database" + "github.com/PretendoNetwork/friends/globals" "github.com/PretendoNetwork/nex-go" ) diff --git a/database/wiiu/update_user_principal_preference.go b/database/wiiu/update_user_principal_preference.go index f70b0a5..912df00 100644 --- a/database/wiiu/update_user_principal_preference.go +++ b/database/wiiu/update_user_principal_preference.go @@ -1,7 +1,7 @@ package database_wiiu import ( - "github.com/PretendoNetwork/friends-secure/database" + "github.com/PretendoNetwork/friends/database" friends_wiiu_types "github.com/PretendoNetwork/nex-protocols-go/friends-wiiu/types" ) diff --git a/globals/get_user_data.go b/globals/get_user_data.go new file mode 100644 index 0000000..adc867e --- /dev/null +++ b/globals/get_user_data.go @@ -0,0 +1,21 @@ +package globals + +import ( + "context" + + pb "github.com/PretendoNetwork/grpc-go/account" + "github.com/PretendoNetwork/nex-protocols-go/globals" + "google.golang.org/grpc/metadata" +) + +func GetUserData(pid uint32) (*pb.GetUserDataResponse, error) { + ctx := metadata.NewOutgoingContext(context.Background(), GRPCAccountCommonMetadata) + + response, err := GRPCAccountClient.GetUserData(ctx, &pb.GetUserDataRequest{Pid: pid}) + if err != nil { + globals.Logger.Error(err.Error()) + return nil, err + } + + return response, nil +} diff --git a/globals/globals.go b/globals/globals.go index eb50d70..4f23424 100644 --- a/globals/globals.go +++ b/globals/globals.go @@ -1,7 +1,7 @@ package globals import ( - "github.com/PretendoNetwork/friends-secure/types" + "github.com/PretendoNetwork/friends/types" pb "github.com/PretendoNetwork/grpc-go/account" "github.com/PretendoNetwork/nex-go" "github.com/PretendoNetwork/plogger-go" @@ -9,7 +9,7 @@ import ( "google.golang.org/grpc/metadata" ) -var Logger = plogger.NewLogger() +var Logger *plogger.Logger var KerberosPassword = "password" // * Default password var AuthenticationServer *nex.Server var SecureServer *nex.Server diff --git a/globals/password_from_pid.go b/globals/password_from_pid.go index ae5da83..f59823c 100644 --- a/globals/password_from_pid.go +++ b/globals/password_from_pid.go @@ -12,7 +12,7 @@ import ( func PasswordFromPID(pid uint32) (string, uint32) { ctx := metadata.NewOutgoingContext(context.Background(), GRPCAccountCommonMetadata) - response, err := GRPCAccountClient.GetNEXData(ctx, &pb.GetNEXDataRequest{Pid: pid}) + response, err := GRPCAccountClient.GetNEXPassword(ctx, &pb.GetNEXPasswordRequest{Pid: pid}) if err != nil { globals.Logger.Error(err.Error()) return "", nex.Errors.RendezVous.InvalidUsername diff --git a/go.mod b/go.mod index 1b7e78d..8c88c50 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/PretendoNetwork/friends-secure +module github.com/PretendoNetwork/friends go 1.18 @@ -12,9 +12,8 @@ require ( github.com/golang/protobuf v1.5.3 github.com/joho/godotenv v1.5.1 github.com/lib/pq v1.10.9 - go.mongodb.org/mongo-driver v1.12.0 - golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 - google.golang.org/grpc v1.56.2 + golang.org/x/exp v0.0.0-20230811145659-89c5cff77bcb + google.golang.org/grpc v1.57.0 ) require ( @@ -22,22 +21,14 @@ require ( github.com/golang/snappy v0.0.4 // indirect github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed // indirect github.com/jwalton/go-supportscolor v1.2.0 // indirect - github.com/klauspost/compress v1.16.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.19 // indirect - github.com/montanaflynn/stats v0.7.1 // indirect github.com/superwhiskers/crunch/v3 v3.5.7 // indirect - github.com/xdg-go/pbkdf2 v1.0.0 // indirect - github.com/xdg-go/scram v1.1.2 // indirect - github.com/xdg-go/stringprep v1.0.4 // indirect - github.com/youmark/pkcs8 v0.0.0-20201027041543-1326539a0a0a // indirect - golang.org/x/crypto v0.11.0 // indirect - golang.org/x/net v0.12.0 // indirect - golang.org/x/sync v0.3.0 // indirect - golang.org/x/sys v0.10.0 // indirect - golang.org/x/term v0.10.0 // indirect - golang.org/x/text v0.11.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 // indirect + golang.org/x/net v0.14.0 // indirect + golang.org/x/sys v0.11.0 // indirect + golang.org/x/term v0.11.0 // indirect + golang.org/x/text v0.12.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20230807174057-1744710a1577 // indirect google.golang.org/protobuf v1.31.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect ) diff --git a/go.sum b/go.sum index ec2b9f9..e6c9acf 100644 --- a/go.sum +++ b/go.sum @@ -13,8 +13,6 @@ github.com/bitly/go-hostpool v0.0.0-20171023180738-a3a6125de932/go.mod h1:NOuUCS github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 h1:DDGfHa7BWjL4YnC6+E63dPcxHo2sUxDIu8g3QgEJdRY= github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= github.com/gocql/gocql v1.5.2 h1:WnKf8xRQImcT/KLaEWG2pjEeryDB7K0qQN9mPs1C58Q= @@ -22,11 +20,9 @@ github.com/gocql/gocql v1.5.2/go.mod h1:3gM2c4D3AnkISwBxGnMMsS8Oy4y2lhbPRsH4xnJr github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed h1:5upAirOpQc1Q53c0bnx2ufif5kANL7bfZWcc6VJWJd8= @@ -35,9 +31,6 @@ github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0= github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4= github.com/jwalton/go-supportscolor v1.2.0 h1:g6Ha4u7Vm3LIsQ5wmeBpS4gazu0UP1DRDE8y6bre4H8= github.com/jwalton/go-supportscolor v1.2.0/go.mod h1:hFVUAZV2cWg+WFFC4v8pT2X/S2qUUBYMioBD9AINXGs= -github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= -github.com/klauspost/compress v1.16.7 h1:2mk3MPGNzKyxErAw8YaohYh69+pa4sIQSC0fPGCFR9I= -github.com/klauspost/compress v1.16.7/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= @@ -50,80 +43,31 @@ github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovk github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= -github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= -github.com/montanaflynn/stats v0.7.1 h1:etflOAAHORrCC44V+aR6Ftzort912ZU+YLiSTuV8eaE= -github.com/montanaflynn/stats v0.7.1/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt6R8Bnaayow= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/superwhiskers/crunch/v3 v3.5.7 h1:N9RLxaR65C36i26BUIpzPXGy2f6pQ7wisu2bawbKNqg= github.com/superwhiskers/crunch/v3 v3.5.7/go.mod h1:4ub2EKgF1MAhTjoOCTU4b9uLMsAweHEa89aRrfAypXA= -github.com/xdg-go/pbkdf2 v1.0.0 h1:Su7DPu48wXMwC3bs7MCNG+z4FhcyEuz5dlvchbq0B0c= -github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= -github.com/xdg-go/scram v1.1.2 h1:FHX5I5B4i4hKRVRBCFRxq1iQRej7WO3hhBuJf+UUySY= -github.com/xdg-go/scram v1.1.2/go.mod h1:RT/sEzTbU5y00aCK8UOx6R7YryM0iF1N2MOmC3kKLN4= -github.com/xdg-go/stringprep v1.0.4 h1:XLI/Ng3O1Atzq0oBs3TWm+5ZVgkq2aqdlvP9JtoZ6c8= -github.com/xdg-go/stringprep v1.0.4/go.mod h1:mPGuuIYwz7CmR2bT9j4GbQqutWS1zV24gijq1dTyGkM= -github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA= -github.com/youmark/pkcs8 v0.0.0-20201027041543-1326539a0a0a h1:fZHgsYlfvtyqToslyjUt3VOPF4J7aK/3MPcK7xp3PDk= -github.com/youmark/pkcs8 v0.0.0-20201027041543-1326539a0a0a/go.mod h1:ul22v+Nro/R083muKhosV54bj5niojjWZvU8xrevuH4= -github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -go.mongodb.org/mongo-driver v1.12.0 h1:aPx33jmn/rQuJXPQLZQ8NtfPQG8CaqgLThFtqRb0PiE= -go.mongodb.org/mongo-driver v1.12.0/go.mod h1:AZkxhPnFJUoH7kZlFkVKucV20K387miPfm7oimrSmK0= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA= -golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= -golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 h1:MGwJjxBy0HJshjDNfLsYO8xppfqWlA5ZT9OhtUUhTNw= -golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.12.0 h1:cfawfvKITfUsFCeJIHJrbSxpeu/E81khclypR0GVT50= -golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= -golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/exp v0.0.0-20230811145659-89c5cff77bcb h1:mIKbk8weKhSeLH2GmUTrvx8CjkyJmnU1wFmg59CUjFA= +golang.org/x/exp v0.0.0-20230811145659-89c5cff77bcb/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= +golang.org/x/net v0.14.0 h1:BONx9s002vGdD9umnlX1Po8vOZmrgH34qlHcD1MfK14= +golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.10.0 h1:SqMFp9UcQJZa+pmYuAKjd9xq1f0j5rLcDIk0mj4qAsA= -golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM= +golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.10.0 h1:3R7pNqamzBraeqj/Tj8qt1aQ2HpmlC+Cx/qL/7hn4/c= -golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= -golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.11.0 h1:LAntKIrcmeSKERyiOh0XMV39LXS8IE9UL2yP7+f5ij4= -golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/term v0.11.0 h1:F9tnn/DA/Im8nCwm+fX+1/eBwi4qFjRT++MhtVC4ZX0= +golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU= +golang.org/x/text v0.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc= +golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 h1:bVf09lpb+OJbByTj913DRJioFFAjf/ZGxEz7MajTp2U= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= -google.golang.org/grpc v1.56.2 h1:fVRFRnXvU+x6C4IlHZewvJOVHoOv1TUuQyoRsYnB4bI= -google.golang.org/grpc v1.56.2/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230807174057-1744710a1577 h1:wukfNtZmZUurLN/atp2hiIeTKn7QJWIQdHzqmsOnAOk= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230807174057-1744710a1577/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= +google.golang.org/grpc v1.57.0 h1:kfzNeI/klCGD2YPMUlaGNT3pxvYfga7smW3Vth8Zsiw= +google.golang.org/grpc v1.57.0/go.mod h1:Sd+9RMTACXwmub0zcNY2c4arhtrbBYD1AUHI/dt16Mo= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= diff --git a/grpc/accept_friend_request.go b/grpc/accept_friend_request.go index c5f2dd5..47e822d 100644 --- a/grpc/accept_friend_request.go +++ b/grpc/accept_friend_request.go @@ -7,7 +7,7 @@ import ( "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - database_wiiu "github.com/PretendoNetwork/friends-secure/database/wiiu" + database_wiiu "github.com/PretendoNetwork/friends/database/wiiu" pb "github.com/PretendoNetwork/grpc-go/friends" ) diff --git a/grpc/deny_friend_request.go b/grpc/deny_friend_request.go index 92e678e..32ae211 100644 --- a/grpc/deny_friend_request.go +++ b/grpc/deny_friend_request.go @@ -3,7 +3,7 @@ package grpc import ( "context" - database_wiiu "github.com/PretendoNetwork/friends-secure/database/wiiu" + database_wiiu "github.com/PretendoNetwork/friends/database/wiiu" pb "github.com/PretendoNetwork/grpc-go/friends" ) diff --git a/grpc/get_user_friend_pids.go b/grpc/get_user_friend_pids.go index ea3376f..4780e26 100644 --- a/grpc/get_user_friend_pids.go +++ b/grpc/get_user_friend_pids.go @@ -3,8 +3,8 @@ package grpc import ( "context" - database_wiiu "github.com/PretendoNetwork/friends-secure/database/wiiu" - database_3ds "github.com/PretendoNetwork/friends-secure/database/3ds" + database_wiiu "github.com/PretendoNetwork/friends/database/wiiu" + database_3ds "github.com/PretendoNetwork/friends/database/3ds" pb "github.com/PretendoNetwork/grpc-go/friends" ) diff --git a/grpc/get_user_friend_requests_incoming.go b/grpc/get_user_friend_requests_incoming.go index 2f846f5..a4f3e1e 100644 --- a/grpc/get_user_friend_requests_incoming.go +++ b/grpc/get_user_friend_requests_incoming.go @@ -3,7 +3,7 @@ package grpc import ( "context" - database_wiiu "github.com/PretendoNetwork/friends-secure/database/wiiu" + database_wiiu "github.com/PretendoNetwork/friends/database/wiiu" pb "github.com/PretendoNetwork/grpc-go/friends" ) diff --git a/grpc/send_user_friend_request.go b/grpc/send_user_friend_request.go index 33e01a9..502e696 100644 --- a/grpc/send_user_friend_request.go +++ b/grpc/send_user_friend_request.go @@ -4,7 +4,7 @@ import ( "context" "time" - database_wiiu "github.com/PretendoNetwork/friends-secure/database/wiiu" + database_wiiu "github.com/PretendoNetwork/friends/database/wiiu" pb "github.com/PretendoNetwork/grpc-go/friends" nex "github.com/PretendoNetwork/nex-go" ) diff --git a/grpc/send_user_notification_wiiu.go b/grpc/send_user_notification_wiiu.go index cf3547b..24fef84 100644 --- a/grpc/send_user_notification_wiiu.go +++ b/grpc/send_user_notification_wiiu.go @@ -3,7 +3,7 @@ package grpc import ( "context" - "github.com/PretendoNetwork/friends-secure/globals" + "github.com/PretendoNetwork/friends/globals" pb "github.com/PretendoNetwork/grpc-go/friends" nex "github.com/PretendoNetwork/nex-go" nintendo_notifications "github.com/PretendoNetwork/nex-protocols-go/nintendo-notifications" diff --git a/init.go b/init.go index 7cdba47..1bd4227 100644 --- a/init.go +++ b/init.go @@ -3,12 +3,14 @@ package main import ( "encoding/hex" "fmt" - "log" "os" + "strconv" + "strings" - "github.com/PretendoNetwork/friends-secure/database" - "github.com/PretendoNetwork/friends-secure/globals" - "github.com/PretendoNetwork/friends-secure/types" + "github.com/PretendoNetwork/friends/database" + "github.com/PretendoNetwork/friends/globals" + "github.com/PretendoNetwork/friends/types" + "github.com/PretendoNetwork/plogger-go" pb "github.com/PretendoNetwork/grpc-go/account" "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" @@ -18,6 +20,7 @@ import ( ) func init() { + globals.Logger = plogger.NewLogger() globals.ConnectedUsers = make(map[uint32]*types.ConnectedUser) // Setup RSA private key for token parsing var err error @@ -27,12 +30,111 @@ func init() { globals.Logger.Warningf("Error loading .env file: %s", err.Error()) } - globals.AESKey, err = hex.DecodeString(os.Getenv("PN_FRIENDS_CONFIG_AES_KEY")) - if err != nil { - log.Fatal(err) + postgresURI := os.Getenv("PN_FRIENDS_CONFIG_DATABASE_URI") + kerberosPassword := os.Getenv("PN_FRIENDS_CONFIG_KERBEROS_PASSWORD") + aesKey := os.Getenv("PN_FRIENDS_CONFIG_AES_KEY") + grpcAPIKey := os.Getenv("PN_FRIENDS_CONFIG_GRPC_API_KEY") + grpcServerPort := os.Getenv("PN_FRIENDS_GRPC_SERVER_PORT") + authenticationServerPort := os.Getenv("PN_FRIENDS_AUTHENTICATION_SERVER_PORT") + secureServerHost := os.Getenv("PN_FRIENDS_SECURE_SERVER_HOST") + secureServerPort := os.Getenv("PN_FRIENDS_SECURE_SERVER_PORT") + accountGRPCHost := os.Getenv("PN_FRIENDS_ACCOUNT_GRPC_HOST") + accountGRPCPort := os.Getenv("PN_FRIENDS_ACCOUNT_GRPC_PORT") + accountGRPCAPIKey := os.Getenv("PN_FRIENDS_ACCOUNT_GRPC_API_KEY") + + if strings.TrimSpace(postgresURI) == "" { + globals.Logger.Error("PN_FRIENDS_CONFIG_DATABASE_URI environment variable not set") + os.Exit(0) } - globals.GRPCAccountClientConnection, err = grpc.Dial(fmt.Sprintf("%s:%s", os.Getenv("PN_FRIENDS_ACCOUNT_GRPC_HOST"), os.Getenv("PN_FRIENDS_ACCOUNT_GRPC_PORT")), grpc.WithTransportCredentials(insecure.NewCredentials())) + if strings.TrimSpace(kerberosPassword) == "" { + globals.Logger.Warningf("PN_FRIENDS_CONFIG_KERBEROS_PASSWORD environment variable not set. Using default password: %q", globals.KerberosPassword) + } else { + globals.KerberosPassword = kerberosPassword + } + + if strings.TrimSpace(aesKey) == "" { + globals.Logger.Error("PN_FRIENDS_CONFIG_AES_KEY environment variable not set") + os.Exit(0) + } else { + globals.AESKey, err = hex.DecodeString(os.Getenv("PN_FRIENDS_CONFIG_AES_KEY")) + if err != nil { + globals.Logger.Criticalf("Failed to decode AES key: %v", err) + os.Exit(0) + } + } + + if strings.TrimSpace(grpcAPIKey) == "" { + globals.Logger.Warning("Insecure gRPC server detected. PN_FRIENDS_CONFIG_GRPC_API_KEY environment variable not set") + } + + if strings.TrimSpace(grpcServerPort) == "" { + globals.Logger.Error("PN_FRIENDS_GRPC_SERVER_PORT environment variable not set") + os.Exit(0) + } + + if port, err := strconv.Atoi(grpcServerPort); err != nil { + globals.Logger.Errorf("PN_FRIENDS_GRPC_SERVER_PORT is not a valid port. Expected 0-65535, got %s", grpcServerPort) + os.Exit(0) + } else if port < 0 || port > 65535 { + globals.Logger.Errorf("PN_FRIENDS_GRPC_SERVER_PORT is not a valid port. Expected 0-65535, got %s", grpcServerPort) + os.Exit(0) + } + + if strings.TrimSpace(authenticationServerPort) == "" { + globals.Logger.Error("PN_FRIENDS_AUTHENTICATION_SERVER_PORT environment variable not set") + os.Exit(0) + } + + if port, err := strconv.Atoi(authenticationServerPort); err != nil { + globals.Logger.Errorf("PN_FRIENDS_AUTHENTICATION_SERVER_PORT is not a valid port. Expected 0-65535, got %s", authenticationServerPort) + os.Exit(0) + } else if port < 0 || port > 65535 { + globals.Logger.Errorf("PN_FRIENDS_AUTHENTICATION_SERVER_PORT is not a valid port. Expected 0-65535, got %s", authenticationServerPort) + os.Exit(0) + } + + if strings.TrimSpace(secureServerHost) == "" { + globals.Logger.Error("PN_FRIENDS_SECURE_SERVER_HOST environment variable not set") + os.Exit(0) + } + + if strings.TrimSpace(secureServerPort) == "" { + globals.Logger.Error("PN_FRIENDS_SECURE_SERVER_PORT environment variable not set") + os.Exit(0) + } + + if port, err := strconv.Atoi(secureServerPort); err != nil { + globals.Logger.Errorf("PN_FRIENDS_SECURE_SERVER_PORT is not a valid port. Expected 0-65535, got %s", secureServerPort) + os.Exit(0) + } else if port < 0 || port > 65535 { + globals.Logger.Errorf("PN_FRIENDS_SECURE_SERVER_PORT is not a valid port. Expected 0-65535, got %s", secureServerPort) + os.Exit(0) + } + + if strings.TrimSpace(accountGRPCHost) == "" { + globals.Logger.Error("PN_FRIENDS_ACCOUNT_GRPC_HOST environment variable not set") + os.Exit(0) + } + + if strings.TrimSpace(accountGRPCPort) == "" { + globals.Logger.Error("PN_FRIENDS_ACCOUNT_GRPC_PORT environment variable not set") + os.Exit(0) + } + + if port, err := strconv.Atoi(accountGRPCPort); err != nil { + globals.Logger.Errorf("PN_FRIENDS_ACCOUNT_GRPC_PORT is not a valid port. Expected 0-65535, got %s", accountGRPCPort) + os.Exit(0) + } else if port < 0 || port > 65535 { + globals.Logger.Errorf("PN_FRIENDS_ACCOUNT_GRPC_PORT is not a valid port. Expected 0-65535, got %s", accountGRPCPort) + os.Exit(0) + } + + if strings.TrimSpace(accountGRPCAPIKey) == "" { + globals.Logger.Warning("Insecure gRPC server detected. PN_FRIENDS_ACCOUNT_GRPC_API_KEY environment variable not set") + } + + globals.GRPCAccountClientConnection, err = grpc.Dial(fmt.Sprintf("%s:%s", accountGRPCHost, accountGRPCPort), grpc.WithTransportCredentials(insecure.NewCredentials())) if err != nil { globals.Logger.Criticalf("Failed to connect to account gRPC server: %v", err) os.Exit(0) @@ -40,10 +142,8 @@ func init() { globals.GRPCAccountClient = pb.NewAccountClient(globals.GRPCAccountClientConnection) globals.GRPCAccountCommonMetadata = metadata.Pairs( - "X-API-Key", os.Getenv("PN_FRIENDS_ACCOUNT_GRPC_APIKEY"), + "X-API-Key", accountGRPCAPIKey, ) - globals.KerberosPassword = os.Getenv("PN_FRIENDS_CONFIG_KERBEROS_PASSWORD") - - database.Connect() + database.ConnectPostgres() } diff --git a/main.go b/main.go index 508f82e..7b47a21 100644 --- a/main.go +++ b/main.go @@ -3,8 +3,8 @@ package main import ( "sync" - "github.com/PretendoNetwork/friends-secure/grpc" - "github.com/PretendoNetwork/friends-secure/nex" + "github.com/PretendoNetwork/friends/grpc" + "github.com/PretendoNetwork/friends/nex" ) var wg sync.WaitGroup diff --git a/nex/account-management/nintendo_create_account.go b/nex/account-management/nintendo_create_account.go index 1e9b033..ce4e7a6 100644 --- a/nex/account-management/nintendo_create_account.go +++ b/nex/account-management/nintendo_create_account.go @@ -8,8 +8,8 @@ import ( "encoding/hex" "strings" - "github.com/PretendoNetwork/friends-secure/globals" - "github.com/PretendoNetwork/friends-secure/utility" + "github.com/PretendoNetwork/friends/globals" + "github.com/PretendoNetwork/friends/utility" nex "github.com/PretendoNetwork/nex-go" account_management "github.com/PretendoNetwork/nex-protocols-go/account-management" account_management_types "github.com/PretendoNetwork/nex-protocols-go/account-management/types" diff --git a/nex/authentication.go b/nex/authentication.go index d6812ae..fa1dd11 100644 --- a/nex/authentication.go +++ b/nex/authentication.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/PretendoNetwork/friends-secure/globals" + "github.com/PretendoNetwork/friends/globals" "github.com/PretendoNetwork/nex-go" ) diff --git a/nex/connect.go b/nex/connect.go index 067c79e..b5b8fe9 100644 --- a/nex/connect.go +++ b/nex/connect.go @@ -3,8 +3,8 @@ package nex import ( "time" - "github.com/PretendoNetwork/friends-secure/globals" - "github.com/PretendoNetwork/friends-secure/types" + "github.com/PretendoNetwork/friends/globals" + "github.com/PretendoNetwork/friends/types" nex "github.com/PretendoNetwork/nex-go" ) diff --git a/nex/friends-3ds/add_friendship_by_pid.go b/nex/friends-3ds/add_friendship_by_pid.go index cce8a5e..6638b08 100644 --- a/nex/friends-3ds/add_friendship_by_pid.go +++ b/nex/friends-3ds/add_friendship_by_pid.go @@ -1,9 +1,9 @@ package nex_friends_3ds import ( - database_3ds "github.com/PretendoNetwork/friends-secure/database/3ds" - "github.com/PretendoNetwork/friends-secure/globals" - notifications_3ds "github.com/PretendoNetwork/friends-secure/notifications/3ds" + database_3ds "github.com/PretendoNetwork/friends/database/3ds" + "github.com/PretendoNetwork/friends/globals" + notifications_3ds "github.com/PretendoNetwork/friends/notifications/3ds" nex "github.com/PretendoNetwork/nex-go" friends_3ds "github.com/PretendoNetwork/nex-protocols-go/friends-3ds" ) diff --git a/nex/friends-3ds/get_all_friends.go b/nex/friends-3ds/get_all_friends.go index 6b29491..3015c13 100644 --- a/nex/friends-3ds/get_all_friends.go +++ b/nex/friends-3ds/get_all_friends.go @@ -1,8 +1,8 @@ package nex_friends_3ds import ( - database_3ds "github.com/PretendoNetwork/friends-secure/database/3ds" - "github.com/PretendoNetwork/friends-secure/globals" + database_3ds "github.com/PretendoNetwork/friends/database/3ds" + "github.com/PretendoNetwork/friends/globals" nex "github.com/PretendoNetwork/nex-go" friends_3ds "github.com/PretendoNetwork/nex-protocols-go/friends-3ds" ) diff --git a/nex/friends-3ds/get_friend_mii.go b/nex/friends-3ds/get_friend_mii.go index cc67a1a..7896284 100644 --- a/nex/friends-3ds/get_friend_mii.go +++ b/nex/friends-3ds/get_friend_mii.go @@ -1,8 +1,8 @@ package nex_friends_3ds import ( - database_3ds "github.com/PretendoNetwork/friends-secure/database/3ds" - "github.com/PretendoNetwork/friends-secure/globals" + database_3ds "github.com/PretendoNetwork/friends/database/3ds" + "github.com/PretendoNetwork/friends/globals" nex "github.com/PretendoNetwork/nex-go" friends_3ds "github.com/PretendoNetwork/nex-protocols-go/friends-3ds" ) diff --git a/nex/friends-3ds/get_friend_persistent_info.go b/nex/friends-3ds/get_friend_persistent_info.go index 5666806..e8f5386 100644 --- a/nex/friends-3ds/get_friend_persistent_info.go +++ b/nex/friends-3ds/get_friend_persistent_info.go @@ -1,8 +1,8 @@ package nex_friends_3ds import ( - database_3ds "github.com/PretendoNetwork/friends-secure/database/3ds" - "github.com/PretendoNetwork/friends-secure/globals" + database_3ds "github.com/PretendoNetwork/friends/database/3ds" + "github.com/PretendoNetwork/friends/globals" nex "github.com/PretendoNetwork/nex-go" friends_3ds "github.com/PretendoNetwork/nex-protocols-go/friends-3ds" ) diff --git a/nex/friends-3ds/get_friend_presence.go b/nex/friends-3ds/get_friend_presence.go index d0d7929..c16e8a0 100644 --- a/nex/friends-3ds/get_friend_presence.go +++ b/nex/friends-3ds/get_friend_presence.go @@ -1,7 +1,7 @@ package nex_friends_3ds import ( - "github.com/PretendoNetwork/friends-secure/globals" + "github.com/PretendoNetwork/friends/globals" nex "github.com/PretendoNetwork/nex-go" friends_3ds "github.com/PretendoNetwork/nex-protocols-go/friends-3ds" friends_3ds_types "github.com/PretendoNetwork/nex-protocols-go/friends-3ds/types" diff --git a/nex/friends-3ds/get_pid_by_lfc.go b/nex/friends-3ds/get_pid_by_lfc.go index 03a0091..c832960 100644 --- a/nex/friends-3ds/get_pid_by_lfc.go +++ b/nex/friends-3ds/get_pid_by_lfc.go @@ -1,7 +1,7 @@ package nex_friends_3ds import ( - "github.com/PretendoNetwork/friends-secure/globals" + "github.com/PretendoNetwork/friends/globals" nex "github.com/PretendoNetwork/nex-go" friends_3ds "github.com/PretendoNetwork/nex-protocols-go/friends-3ds" ) diff --git a/nex/friends-3ds/remove_friend_by_lfc.go b/nex/friends-3ds/remove_friend_by_lfc.go index ae3b01d..1b6e931 100644 --- a/nex/friends-3ds/remove_friend_by_lfc.go +++ b/nex/friends-3ds/remove_friend_by_lfc.go @@ -1,7 +1,7 @@ package nex_friends_3ds import ( - "github.com/PretendoNetwork/friends-secure/globals" + "github.com/PretendoNetwork/friends/globals" nex "github.com/PretendoNetwork/nex-go" friends_3ds "github.com/PretendoNetwork/nex-protocols-go/friends-3ds" ) diff --git a/nex/friends-3ds/remove_friend_by_pid.go b/nex/friends-3ds/remove_friend_by_pid.go index 3d6da23..ab2eb3b 100644 --- a/nex/friends-3ds/remove_friend_by_pid.go +++ b/nex/friends-3ds/remove_friend_by_pid.go @@ -1,9 +1,9 @@ package nex_friends_3ds import ( - database_3ds "github.com/PretendoNetwork/friends-secure/database/3ds" - "github.com/PretendoNetwork/friends-secure/globals" - notifications_3ds "github.com/PretendoNetwork/friends-secure/notifications/3ds" + database_3ds "github.com/PretendoNetwork/friends/database/3ds" + "github.com/PretendoNetwork/friends/globals" + notifications_3ds "github.com/PretendoNetwork/friends/notifications/3ds" nex "github.com/PretendoNetwork/nex-go" friends_3ds "github.com/PretendoNetwork/nex-protocols-go/friends-3ds" ) diff --git a/nex/friends-3ds/sync_friend.go b/nex/friends-3ds/sync_friend.go index 6e1fe0a..41b9947 100644 --- a/nex/friends-3ds/sync_friend.go +++ b/nex/friends-3ds/sync_friend.go @@ -1,9 +1,9 @@ package nex_friends_3ds import ( - database_3ds "github.com/PretendoNetwork/friends-secure/database/3ds" - "github.com/PretendoNetwork/friends-secure/globals" - notifications_3ds "github.com/PretendoNetwork/friends-secure/notifications/3ds" + database_3ds "github.com/PretendoNetwork/friends/database/3ds" + "github.com/PretendoNetwork/friends/globals" + notifications_3ds "github.com/PretendoNetwork/friends/notifications/3ds" nex "github.com/PretendoNetwork/nex-go" friends_3ds "github.com/PretendoNetwork/nex-protocols-go/friends-3ds" friends_3ds_types "github.com/PretendoNetwork/nex-protocols-go/friends-3ds/types" diff --git a/nex/friends-3ds/update_comment.go b/nex/friends-3ds/update_comment.go index 0970fcb..a921b31 100644 --- a/nex/friends-3ds/update_comment.go +++ b/nex/friends-3ds/update_comment.go @@ -1,9 +1,9 @@ package nex_friends_3ds import ( - database_3ds "github.com/PretendoNetwork/friends-secure/database/3ds" - "github.com/PretendoNetwork/friends-secure/globals" - notifications_3ds "github.com/PretendoNetwork/friends-secure/notifications/3ds" + database_3ds "github.com/PretendoNetwork/friends/database/3ds" + "github.com/PretendoNetwork/friends/globals" + notifications_3ds "github.com/PretendoNetwork/friends/notifications/3ds" nex "github.com/PretendoNetwork/nex-go" friends_3ds "github.com/PretendoNetwork/nex-protocols-go/friends-3ds" ) diff --git a/nex/friends-3ds/update_favorite_game_key.go b/nex/friends-3ds/update_favorite_game_key.go index 934da1c..96964f7 100644 --- a/nex/friends-3ds/update_favorite_game_key.go +++ b/nex/friends-3ds/update_favorite_game_key.go @@ -1,9 +1,9 @@ package nex_friends_3ds import ( - database_3ds "github.com/PretendoNetwork/friends-secure/database/3ds" - "github.com/PretendoNetwork/friends-secure/globals" - notifications_3ds "github.com/PretendoNetwork/friends-secure/notifications/3ds" + database_3ds "github.com/PretendoNetwork/friends/database/3ds" + "github.com/PretendoNetwork/friends/globals" + notifications_3ds "github.com/PretendoNetwork/friends/notifications/3ds" nex "github.com/PretendoNetwork/nex-go" friends_3ds "github.com/PretendoNetwork/nex-protocols-go/friends-3ds" friends_3ds_types "github.com/PretendoNetwork/nex-protocols-go/friends-3ds/types" diff --git a/nex/friends-3ds/update_mii.go b/nex/friends-3ds/update_mii.go index 5ed57d4..5130fb4 100644 --- a/nex/friends-3ds/update_mii.go +++ b/nex/friends-3ds/update_mii.go @@ -1,9 +1,9 @@ package nex_friends_3ds import ( - database_3ds "github.com/PretendoNetwork/friends-secure/database/3ds" - "github.com/PretendoNetwork/friends-secure/globals" - notifications_3ds "github.com/PretendoNetwork/friends-secure/notifications/3ds" + database_3ds "github.com/PretendoNetwork/friends/database/3ds" + "github.com/PretendoNetwork/friends/globals" + notifications_3ds "github.com/PretendoNetwork/friends/notifications/3ds" nex "github.com/PretendoNetwork/nex-go" friends_3ds "github.com/PretendoNetwork/nex-protocols-go/friends-3ds" friends_3ds_types "github.com/PretendoNetwork/nex-protocols-go/friends-3ds/types" diff --git a/nex/friends-3ds/update_preference.go b/nex/friends-3ds/update_preference.go index d23b212..2e4b5d7 100644 --- a/nex/friends-3ds/update_preference.go +++ b/nex/friends-3ds/update_preference.go @@ -1,9 +1,9 @@ package nex_friends_3ds import ( - database_3ds "github.com/PretendoNetwork/friends-secure/database/3ds" - "github.com/PretendoNetwork/friends-secure/globals" - notifications_3ds "github.com/PretendoNetwork/friends-secure/notifications/3ds" + database_3ds "github.com/PretendoNetwork/friends/database/3ds" + "github.com/PretendoNetwork/friends/globals" + notifications_3ds "github.com/PretendoNetwork/friends/notifications/3ds" nex "github.com/PretendoNetwork/nex-go" friends_3ds "github.com/PretendoNetwork/nex-protocols-go/friends-3ds" friends_3ds_types "github.com/PretendoNetwork/nex-protocols-go/friends-3ds/types" diff --git a/nex/friends-3ds/update_presence.go b/nex/friends-3ds/update_presence.go index 8fdd595..94e9ff2 100644 --- a/nex/friends-3ds/update_presence.go +++ b/nex/friends-3ds/update_presence.go @@ -1,9 +1,9 @@ package nex_friends_3ds import ( - "github.com/PretendoNetwork/friends-secure/globals" - notifications_3ds "github.com/PretendoNetwork/friends-secure/notifications/3ds" - "github.com/PretendoNetwork/friends-secure/types" + "github.com/PretendoNetwork/friends/globals" + notifications_3ds "github.com/PretendoNetwork/friends/notifications/3ds" + "github.com/PretendoNetwork/friends/types" nex "github.com/PretendoNetwork/nex-go" friends_3ds "github.com/PretendoNetwork/nex-protocols-go/friends-3ds" friends_3ds_types "github.com/PretendoNetwork/nex-protocols-go/friends-3ds/types" diff --git a/nex/friends-3ds/update_profile.go b/nex/friends-3ds/update_profile.go index e92efbd..5eb06cc 100644 --- a/nex/friends-3ds/update_profile.go +++ b/nex/friends-3ds/update_profile.go @@ -1,8 +1,8 @@ package nex_friends_3ds import ( - database_3ds "github.com/PretendoNetwork/friends-secure/database/3ds" - "github.com/PretendoNetwork/friends-secure/globals" + database_3ds "github.com/PretendoNetwork/friends/database/3ds" + "github.com/PretendoNetwork/friends/globals" nex "github.com/PretendoNetwork/nex-go" friends_3ds "github.com/PretendoNetwork/nex-protocols-go/friends-3ds" friends_3ds_types "github.com/PretendoNetwork/nex-protocols-go/friends-3ds/types" diff --git a/nex/friends-wiiu/accept_friend_request.go b/nex/friends-wiiu/accept_friend_request.go index 53c6324..bf6937d 100644 --- a/nex/friends-wiiu/accept_friend_request.go +++ b/nex/friends-wiiu/accept_friend_request.go @@ -3,9 +3,9 @@ package nex_friends_wiiu import ( "database/sql" - database_wiiu "github.com/PretendoNetwork/friends-secure/database/wiiu" - "github.com/PretendoNetwork/friends-secure/globals" - notifications_wiiu "github.com/PretendoNetwork/friends-secure/notifications/wiiu" + database_wiiu "github.com/PretendoNetwork/friends/database/wiiu" + "github.com/PretendoNetwork/friends/globals" + notifications_wiiu "github.com/PretendoNetwork/friends/notifications/wiiu" nex "github.com/PretendoNetwork/nex-go" friends_wiiu "github.com/PretendoNetwork/nex-protocols-go/friends-wiiu" friends_wiiu_types "github.com/PretendoNetwork/nex-protocols-go/friends-wiiu/types" diff --git a/nex/friends-wiiu/add_blacklist.go b/nex/friends-wiiu/add_blacklist.go index 6b190da..1a850f8 100644 --- a/nex/friends-wiiu/add_blacklist.go +++ b/nex/friends-wiiu/add_blacklist.go @@ -3,8 +3,8 @@ package nex_friends_wiiu import ( "time" - database_wiiu "github.com/PretendoNetwork/friends-secure/database/wiiu" - "github.com/PretendoNetwork/friends-secure/globals" + database_wiiu "github.com/PretendoNetwork/friends/database/wiiu" + "github.com/PretendoNetwork/friends/globals" nex "github.com/PretendoNetwork/nex-go" friends_wiiu "github.com/PretendoNetwork/nex-protocols-go/friends-wiiu" friends_wiiu_types "github.com/PretendoNetwork/nex-protocols-go/friends-wiiu/types" diff --git a/nex/friends-wiiu/add_friend_request.go b/nex/friends-wiiu/add_friend_request.go index fd193a9..d7f7ec2 100644 --- a/nex/friends-wiiu/add_friend_request.go +++ b/nex/friends-wiiu/add_friend_request.go @@ -3,9 +3,9 @@ package nex_friends_wiiu import ( "time" - database_wiiu "github.com/PretendoNetwork/friends-secure/database/wiiu" - "github.com/PretendoNetwork/friends-secure/globals" - notifications_wiiu "github.com/PretendoNetwork/friends-secure/notifications/wiiu" + database_wiiu "github.com/PretendoNetwork/friends/database/wiiu" + "github.com/PretendoNetwork/friends/globals" + notifications_wiiu "github.com/PretendoNetwork/friends/notifications/wiiu" nex "github.com/PretendoNetwork/nex-go" friends_wiiu "github.com/PretendoNetwork/nex-protocols-go/friends-wiiu" friends_wiiu_types "github.com/PretendoNetwork/nex-protocols-go/friends-wiiu/types" diff --git a/nex/friends-wiiu/cancel_friend_request.go b/nex/friends-wiiu/cancel_friend_request.go index bf97bed..99f4f9c 100644 --- a/nex/friends-wiiu/cancel_friend_request.go +++ b/nex/friends-wiiu/cancel_friend_request.go @@ -3,9 +3,9 @@ package nex_friends_wiiu import ( "database/sql" - database_wiiu "github.com/PretendoNetwork/friends-secure/database/wiiu" - "github.com/PretendoNetwork/friends-secure/globals" - notifications_wiiu "github.com/PretendoNetwork/friends-secure/notifications/wiiu" + database_wiiu "github.com/PretendoNetwork/friends/database/wiiu" + "github.com/PretendoNetwork/friends/globals" + notifications_wiiu "github.com/PretendoNetwork/friends/notifications/wiiu" nex "github.com/PretendoNetwork/nex-go" friends_wiiu "github.com/PretendoNetwork/nex-protocols-go/friends-wiiu" ) diff --git a/nex/friends-wiiu/check_setting_status.go b/nex/friends-wiiu/check_setting_status.go index f342ef2..4eca5ff 100644 --- a/nex/friends-wiiu/check_setting_status.go +++ b/nex/friends-wiiu/check_setting_status.go @@ -1,7 +1,7 @@ package nex_friends_wiiu import ( - "github.com/PretendoNetwork/friends-secure/globals" + "github.com/PretendoNetwork/friends/globals" nex "github.com/PretendoNetwork/nex-go" friends_wiiu "github.com/PretendoNetwork/nex-protocols-go/friends-wiiu" ) diff --git a/nex/friends-wiiu/delete_friend_request.go b/nex/friends-wiiu/delete_friend_request.go index bb5255d..5ee5ce7 100644 --- a/nex/friends-wiiu/delete_friend_request.go +++ b/nex/friends-wiiu/delete_friend_request.go @@ -1,8 +1,8 @@ package nex_friends_wiiu import ( - database_wiiu "github.com/PretendoNetwork/friends-secure/database/wiiu" - "github.com/PretendoNetwork/friends-secure/globals" + database_wiiu "github.com/PretendoNetwork/friends/database/wiiu" + "github.com/PretendoNetwork/friends/globals" nex "github.com/PretendoNetwork/nex-go" friends_wiiu "github.com/PretendoNetwork/nex-protocols-go/friends-wiiu" ) diff --git a/nex/friends-wiiu/delete_persistent_notification.go b/nex/friends-wiiu/delete_persistent_notification.go index 1b64d6e..c00c006 100644 --- a/nex/friends-wiiu/delete_persistent_notification.go +++ b/nex/friends-wiiu/delete_persistent_notification.go @@ -1,7 +1,7 @@ package nex_friends_wiiu import ( - "github.com/PretendoNetwork/friends-secure/globals" + "github.com/PretendoNetwork/friends/globals" nex "github.com/PretendoNetwork/nex-go" friends_wiiu "github.com/PretendoNetwork/nex-protocols-go/friends-wiiu" friends_wiiu_types "github.com/PretendoNetwork/nex-protocols-go/friends-wiiu/types" diff --git a/nex/friends-wiiu/deny_friend_request.go b/nex/friends-wiiu/deny_friend_request.go index 612b282..b40bbb5 100644 --- a/nex/friends-wiiu/deny_friend_request.go +++ b/nex/friends-wiiu/deny_friend_request.go @@ -3,8 +3,8 @@ package nex_friends_wiiu import ( "time" - database_wiiu "github.com/PretendoNetwork/friends-secure/database/wiiu" - "github.com/PretendoNetwork/friends-secure/globals" + database_wiiu "github.com/PretendoNetwork/friends/database/wiiu" + "github.com/PretendoNetwork/friends/globals" nex "github.com/PretendoNetwork/nex-go" friends_wiiu "github.com/PretendoNetwork/nex-protocols-go/friends-wiiu" friends_wiiu_types "github.com/PretendoNetwork/nex-protocols-go/friends-wiiu/types" diff --git a/nex/friends-wiiu/get_basic_info.go b/nex/friends-wiiu/get_basic_info.go index 5b40f93..b1b805d 100644 --- a/nex/friends-wiiu/get_basic_info.go +++ b/nex/friends-wiiu/get_basic_info.go @@ -1,8 +1,8 @@ package nex_friends_wiiu import ( - database_wiiu "github.com/PretendoNetwork/friends-secure/database/wiiu" - "github.com/PretendoNetwork/friends-secure/globals" + database_wiiu "github.com/PretendoNetwork/friends/database/wiiu" + "github.com/PretendoNetwork/friends/globals" nex "github.com/PretendoNetwork/nex-go" friends_wiiu "github.com/PretendoNetwork/nex-protocols-go/friends-wiiu" friends_wiiu_types "github.com/PretendoNetwork/nex-protocols-go/friends-wiiu/types" diff --git a/nex/friends-wiiu/get_request_block_settings.go b/nex/friends-wiiu/get_request_block_settings.go index ba4c125..ba8008b 100644 --- a/nex/friends-wiiu/get_request_block_settings.go +++ b/nex/friends-wiiu/get_request_block_settings.go @@ -1,8 +1,8 @@ package nex_friends_wiiu import ( - database_wiiu "github.com/PretendoNetwork/friends-secure/database/wiiu" - "github.com/PretendoNetwork/friends-secure/globals" + database_wiiu "github.com/PretendoNetwork/friends/database/wiiu" + "github.com/PretendoNetwork/friends/globals" nex "github.com/PretendoNetwork/nex-go" friends_wiiu "github.com/PretendoNetwork/nex-protocols-go/friends-wiiu" friends_wiiu_types "github.com/PretendoNetwork/nex-protocols-go/friends-wiiu/types" diff --git a/nex/friends-wiiu/mark_friend_requests_as_received.go b/nex/friends-wiiu/mark_friend_requests_as_received.go index d25729b..262adaa 100644 --- a/nex/friends-wiiu/mark_friend_requests_as_received.go +++ b/nex/friends-wiiu/mark_friend_requests_as_received.go @@ -1,8 +1,8 @@ package nex_friends_wiiu import ( - database_wiiu "github.com/PretendoNetwork/friends-secure/database/wiiu" - "github.com/PretendoNetwork/friends-secure/globals" + database_wiiu "github.com/PretendoNetwork/friends/database/wiiu" + "github.com/PretendoNetwork/friends/globals" nex "github.com/PretendoNetwork/nex-go" friends_wiiu "github.com/PretendoNetwork/nex-protocols-go/friends-wiiu" ) diff --git a/nex/friends-wiiu/remove_blacklist.go b/nex/friends-wiiu/remove_blacklist.go index 22e5fb2..1b99acf 100644 --- a/nex/friends-wiiu/remove_blacklist.go +++ b/nex/friends-wiiu/remove_blacklist.go @@ -1,8 +1,8 @@ package nex_friends_wiiu import ( - database_wiiu "github.com/PretendoNetwork/friends-secure/database/wiiu" - "github.com/PretendoNetwork/friends-secure/globals" + database_wiiu "github.com/PretendoNetwork/friends/database/wiiu" + "github.com/PretendoNetwork/friends/globals" nex "github.com/PretendoNetwork/nex-go" friends_wiiu "github.com/PretendoNetwork/nex-protocols-go/friends-wiiu" ) diff --git a/nex/friends-wiiu/remove_friend.go b/nex/friends-wiiu/remove_friend.go index 90ac6fa..f385010 100644 --- a/nex/friends-wiiu/remove_friend.go +++ b/nex/friends-wiiu/remove_friend.go @@ -1,9 +1,9 @@ package nex_friends_wiiu import ( - database_wiiu "github.com/PretendoNetwork/friends-secure/database/wiiu" - "github.com/PretendoNetwork/friends-secure/globals" - notifications_wiiu "github.com/PretendoNetwork/friends-secure/notifications/wiiu" + database_wiiu "github.com/PretendoNetwork/friends/database/wiiu" + "github.com/PretendoNetwork/friends/globals" + notifications_wiiu "github.com/PretendoNetwork/friends/notifications/wiiu" nex "github.com/PretendoNetwork/nex-go" friends_wiiu "github.com/PretendoNetwork/nex-protocols-go/friends-wiiu" ) diff --git a/nex/friends-wiiu/update_and_get_all_information.go b/nex/friends-wiiu/update_and_get_all_information.go index c28fcc1..9c2eaeb 100644 --- a/nex/friends-wiiu/update_and_get_all_information.go +++ b/nex/friends-wiiu/update_and_get_all_information.go @@ -3,10 +3,10 @@ package nex_friends_wiiu import ( "os" - database_wiiu "github.com/PretendoNetwork/friends-secure/database/wiiu" - "github.com/PretendoNetwork/friends-secure/globals" - notifications_wiiu "github.com/PretendoNetwork/friends-secure/notifications/wiiu" - "github.com/PretendoNetwork/friends-secure/types" + database_wiiu "github.com/PretendoNetwork/friends/database/wiiu" + "github.com/PretendoNetwork/friends/globals" + notifications_wiiu "github.com/PretendoNetwork/friends/notifications/wiiu" + "github.com/PretendoNetwork/friends/types" nex "github.com/PretendoNetwork/nex-go" friends_wiiu "github.com/PretendoNetwork/nex-protocols-go/friends-wiiu" friends_wiiu_types "github.com/PretendoNetwork/nex-protocols-go/friends-wiiu/types" diff --git a/nex/friends-wiiu/update_comment.go b/nex/friends-wiiu/update_comment.go index e608180..c28a846 100644 --- a/nex/friends-wiiu/update_comment.go +++ b/nex/friends-wiiu/update_comment.go @@ -1,8 +1,8 @@ package nex_friends_wiiu import ( - database_wiiu "github.com/PretendoNetwork/friends-secure/database/wiiu" - "github.com/PretendoNetwork/friends-secure/globals" + database_wiiu "github.com/PretendoNetwork/friends/database/wiiu" + "github.com/PretendoNetwork/friends/globals" nex "github.com/PretendoNetwork/nex-go" friends_wiiu "github.com/PretendoNetwork/nex-protocols-go/friends-wiiu" friends_wiiu_types "github.com/PretendoNetwork/nex-protocols-go/friends-wiiu/types" diff --git a/nex/friends-wiiu/update_preference.go b/nex/friends-wiiu/update_preference.go index 2bd6582..ff7fa57 100644 --- a/nex/friends-wiiu/update_preference.go +++ b/nex/friends-wiiu/update_preference.go @@ -1,8 +1,8 @@ package nex_friends_wiiu import ( - database_wiiu "github.com/PretendoNetwork/friends-secure/database/wiiu" - "github.com/PretendoNetwork/friends-secure/globals" + database_wiiu "github.com/PretendoNetwork/friends/database/wiiu" + "github.com/PretendoNetwork/friends/globals" nex "github.com/PretendoNetwork/nex-go" friends_wiiu "github.com/PretendoNetwork/nex-protocols-go/friends-wiiu" friends_wiiu_types "github.com/PretendoNetwork/nex-protocols-go/friends-wiiu/types" diff --git a/nex/friends-wiiu/update_presence.go b/nex/friends-wiiu/update_presence.go index 3b96489..a19fc55 100644 --- a/nex/friends-wiiu/update_presence.go +++ b/nex/friends-wiiu/update_presence.go @@ -1,9 +1,9 @@ package nex_friends_wiiu import ( - "github.com/PretendoNetwork/friends-secure/globals" - notifications_wiiu "github.com/PretendoNetwork/friends-secure/notifications/wiiu" - "github.com/PretendoNetwork/friends-secure/types" + "github.com/PretendoNetwork/friends/globals" + notifications_wiiu "github.com/PretendoNetwork/friends/notifications/wiiu" + "github.com/PretendoNetwork/friends/types" nex "github.com/PretendoNetwork/nex-go" friends_wiiu "github.com/PretendoNetwork/nex-protocols-go/friends-wiiu" friends_wiiu_types "github.com/PretendoNetwork/nex-protocols-go/friends-wiiu/types" diff --git a/nex/register_common_authentication_server_protocols.go b/nex/register_common_authentication_server_protocols.go index a9c3d85..0a7e9cc 100644 --- a/nex/register_common_authentication_server_protocols.go +++ b/nex/register_common_authentication_server_protocols.go @@ -3,7 +3,7 @@ package nex import ( "os" - "github.com/PretendoNetwork/friends-secure/globals" + "github.com/PretendoNetwork/friends/globals" nex "github.com/PretendoNetwork/nex-go" ticket_granting "github.com/PretendoNetwork/nex-protocols-common-go/ticket-granting" ) diff --git a/nex/register_common_secure_server_protocols.go b/nex/register_common_secure_server_protocols.go index 4edeb2a..4551eea 100644 --- a/nex/register_common_secure_server_protocols.go +++ b/nex/register_common_secure_server_protocols.go @@ -1,8 +1,8 @@ package nex import ( - "github.com/PretendoNetwork/friends-secure/globals" - nex_secure_connection "github.com/PretendoNetwork/friends-secure/nex/secure-connection" + "github.com/PretendoNetwork/friends/globals" + nex_secure_connection "github.com/PretendoNetwork/friends/nex/secure-connection" secureconnection "github.com/PretendoNetwork/nex-protocols-common-go/secure-connection" ) diff --git a/nex/register_secure_server_protocols.go b/nex/register_secure_server_protocols.go index 96265e8..b2cd6c9 100644 --- a/nex/register_secure_server_protocols.go +++ b/nex/register_secure_server_protocols.go @@ -1,10 +1,10 @@ package nex import ( - "github.com/PretendoNetwork/friends-secure/globals" - 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" + "github.com/PretendoNetwork/friends/globals" + nex_account_management "github.com/PretendoNetwork/friends/nex/account-management" + nex_friends_3ds "github.com/PretendoNetwork/friends/nex/friends-3ds" + nex_friends_wiiu "github.com/PretendoNetwork/friends/nex/friends-wiiu" 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" diff --git a/nex/secure-connection/register_ex.go b/nex/secure-connection/register_ex.go index dda9894..4a61320 100644 --- a/nex/secure-connection/register_ex.go +++ b/nex/secure-connection/register_ex.go @@ -4,10 +4,10 @@ import ( "strconv" "time" - database_3ds "github.com/PretendoNetwork/friends-secure/database/3ds" - database_wiiu "github.com/PretendoNetwork/friends-secure/database/wiiu" - "github.com/PretendoNetwork/friends-secure/globals" - "github.com/PretendoNetwork/friends-secure/types" + database_3ds "github.com/PretendoNetwork/friends/database/3ds" + database_wiiu "github.com/PretendoNetwork/friends/database/wiiu" + "github.com/PretendoNetwork/friends/globals" + "github.com/PretendoNetwork/friends/types" nex "github.com/PretendoNetwork/nex-go" secure_connection "github.com/PretendoNetwork/nex-protocols-go/secure-connection" ) diff --git a/nex/secure.go b/nex/secure.go index e4d677b..dd29127 100644 --- a/nex/secure.go +++ b/nex/secure.go @@ -5,12 +5,12 @@ import ( "os" "time" - database_3ds "github.com/PretendoNetwork/friends-secure/database/3ds" - database_wiiu "github.com/PretendoNetwork/friends-secure/database/wiiu" - "github.com/PretendoNetwork/friends-secure/globals" - notifications_3ds "github.com/PretendoNetwork/friends-secure/notifications/3ds" - notifications_wiiu "github.com/PretendoNetwork/friends-secure/notifications/wiiu" - "github.com/PretendoNetwork/friends-secure/types" + database_3ds "github.com/PretendoNetwork/friends/database/3ds" + database_wiiu "github.com/PretendoNetwork/friends/database/wiiu" + "github.com/PretendoNetwork/friends/globals" + notifications_3ds "github.com/PretendoNetwork/friends/notifications/3ds" + notifications_wiiu "github.com/PretendoNetwork/friends/notifications/wiiu" + "github.com/PretendoNetwork/friends/types" nex "github.com/PretendoNetwork/nex-go" _ "github.com/PretendoNetwork/nex-protocols-go" ) diff --git a/notifications/3ds/send_comment_update.go b/notifications/3ds/send_comment_update.go index 4b9de40..e1e53f4 100644 --- a/notifications/3ds/send_comment_update.go +++ b/notifications/3ds/send_comment_update.go @@ -1,8 +1,8 @@ package notifications_3ds import ( - database_3ds "github.com/PretendoNetwork/friends-secure/database/3ds" - "github.com/PretendoNetwork/friends-secure/globals" + database_3ds "github.com/PretendoNetwork/friends/database/3ds" + "github.com/PretendoNetwork/friends/globals" nex "github.com/PretendoNetwork/nex-go" nintendo_notifications "github.com/PretendoNetwork/nex-protocols-go/nintendo-notifications" nintendo_notifications_types "github.com/PretendoNetwork/nex-protocols-go/nintendo-notifications/types" diff --git a/notifications/3ds/send_favorite_update.go b/notifications/3ds/send_favorite_update.go index aaa7c63..36cb3fb 100644 --- a/notifications/3ds/send_favorite_update.go +++ b/notifications/3ds/send_favorite_update.go @@ -1,8 +1,8 @@ package notifications_3ds import ( - database_3ds "github.com/PretendoNetwork/friends-secure/database/3ds" - "github.com/PretendoNetwork/friends-secure/globals" + database_3ds "github.com/PretendoNetwork/friends/database/3ds" + "github.com/PretendoNetwork/friends/globals" nex "github.com/PretendoNetwork/nex-go" friends_3ds_types "github.com/PretendoNetwork/nex-protocols-go/friends-3ds/types" nintendo_notifications "github.com/PretendoNetwork/nex-protocols-go/nintendo-notifications" diff --git a/notifications/3ds/send_friendship_completed.go b/notifications/3ds/send_friendship_completed.go index aa15651..a826986 100644 --- a/notifications/3ds/send_friendship_completed.go +++ b/notifications/3ds/send_friendship_completed.go @@ -1,7 +1,7 @@ package notifications_3ds import ( - "github.com/PretendoNetwork/friends-secure/globals" + "github.com/PretendoNetwork/friends/globals" nex "github.com/PretendoNetwork/nex-go" nintendo_notifications "github.com/PretendoNetwork/nex-protocols-go/nintendo-notifications" nintendo_notifications_types "github.com/PretendoNetwork/nex-protocols-go/nintendo-notifications/types" diff --git a/notifications/3ds/send_mii_notification.go b/notifications/3ds/send_mii_notification.go index 9e43976..552590c 100644 --- a/notifications/3ds/send_mii_notification.go +++ b/notifications/3ds/send_mii_notification.go @@ -1,8 +1,8 @@ package notifications_3ds import ( - database_3ds "github.com/PretendoNetwork/friends-secure/database/3ds" - "github.com/PretendoNetwork/friends-secure/globals" + database_3ds "github.com/PretendoNetwork/friends/database/3ds" + "github.com/PretendoNetwork/friends/globals" nex "github.com/PretendoNetwork/nex-go" nintendo_notifications "github.com/PretendoNetwork/nex-protocols-go/nintendo-notifications" nintendo_notifications_types "github.com/PretendoNetwork/nex-protocols-go/nintendo-notifications/types" diff --git a/notifications/3ds/send_presence_update.go b/notifications/3ds/send_presence_update.go index aefc75a..41f35cb 100644 --- a/notifications/3ds/send_presence_update.go +++ b/notifications/3ds/send_presence_update.go @@ -1,8 +1,8 @@ package notifications_3ds import ( - database_3ds "github.com/PretendoNetwork/friends-secure/database/3ds" - "github.com/PretendoNetwork/friends-secure/globals" + database_3ds "github.com/PretendoNetwork/friends/database/3ds" + "github.com/PretendoNetwork/friends/globals" nex "github.com/PretendoNetwork/nex-go" friends_3ds_types "github.com/PretendoNetwork/nex-protocols-go/friends-3ds/types" nintendo_notifications "github.com/PretendoNetwork/nex-protocols-go/nintendo-notifications" diff --git a/notifications/3ds/send_user_went_offline.go b/notifications/3ds/send_user_went_offline.go index b56b314..c27490a 100644 --- a/notifications/3ds/send_user_went_offline.go +++ b/notifications/3ds/send_user_went_offline.go @@ -1,8 +1,8 @@ package notifications_3ds import ( - database_3ds "github.com/PretendoNetwork/friends-secure/database/3ds" - "github.com/PretendoNetwork/friends-secure/globals" + database_3ds "github.com/PretendoNetwork/friends/database/3ds" + "github.com/PretendoNetwork/friends/globals" nex "github.com/PretendoNetwork/nex-go" nintendo_notifications "github.com/PretendoNetwork/nex-protocols-go/nintendo-notifications" nintendo_notifications_types "github.com/PretendoNetwork/nex-protocols-go/nintendo-notifications/types" diff --git a/notifications/wiiu/send_friend_request.go b/notifications/wiiu/send_friend_request.go index a08b72b..97264f8 100644 --- a/notifications/wiiu/send_friend_request.go +++ b/notifications/wiiu/send_friend_request.go @@ -1,7 +1,7 @@ package notifications_wiiu import ( - "github.com/PretendoNetwork/friends-secure/globals" + "github.com/PretendoNetwork/friends/globals" nex "github.com/PretendoNetwork/nex-go" friends_wiiu_types "github.com/PretendoNetwork/nex-protocols-go/friends-wiiu/types" nintendo_notifications "github.com/PretendoNetwork/nex-protocols-go/nintendo-notifications" diff --git a/notifications/wiiu/send_friend_request_accepted.go b/notifications/wiiu/send_friend_request_accepted.go index 10e3035..9377e8b 100644 --- a/notifications/wiiu/send_friend_request_accepted.go +++ b/notifications/wiiu/send_friend_request_accepted.go @@ -1,7 +1,7 @@ package notifications_wiiu import ( - "github.com/PretendoNetwork/friends-secure/globals" + "github.com/PretendoNetwork/friends/globals" nex "github.com/PretendoNetwork/nex-go" friends_wiiu_types "github.com/PretendoNetwork/nex-protocols-go/friends-wiiu/types" nintendo_notifications "github.com/PretendoNetwork/nex-protocols-go/nintendo-notifications" diff --git a/notifications/wiiu/send_friendship_removed.go b/notifications/wiiu/send_friendship_removed.go index c801509..e9d82b2 100644 --- a/notifications/wiiu/send_friendship_removed.go +++ b/notifications/wiiu/send_friendship_removed.go @@ -1,7 +1,7 @@ package notifications_wiiu import ( - "github.com/PretendoNetwork/friends-secure/globals" + "github.com/PretendoNetwork/friends/globals" nex "github.com/PretendoNetwork/nex-go" nintendo_notifications "github.com/PretendoNetwork/nex-protocols-go/nintendo-notifications" nintendo_notifications_types "github.com/PretendoNetwork/nex-protocols-go/nintendo-notifications/types" diff --git a/notifications/wiiu/send_presence_update.go b/notifications/wiiu/send_presence_update.go index c4ecd9b..f05705f 100644 --- a/notifications/wiiu/send_presence_update.go +++ b/notifications/wiiu/send_presence_update.go @@ -3,8 +3,8 @@ package notifications_wiiu import ( "fmt" - database_wiiu "github.com/PretendoNetwork/friends-secure/database/wiiu" - "github.com/PretendoNetwork/friends-secure/globals" + database_wiiu "github.com/PretendoNetwork/friends/database/wiiu" + "github.com/PretendoNetwork/friends/globals" nex "github.com/PretendoNetwork/nex-go" friends_wiiu_types "github.com/PretendoNetwork/nex-protocols-go/friends-wiiu/types" nintendo_notifications "github.com/PretendoNetwork/nex-protocols-go/nintendo-notifications" diff --git a/notifications/wiiu/send_user_went_offline.go b/notifications/wiiu/send_user_went_offline.go index 358c6ed..775b394 100644 --- a/notifications/wiiu/send_user_went_offline.go +++ b/notifications/wiiu/send_user_went_offline.go @@ -3,8 +3,8 @@ package notifications_wiiu import ( "time" - database_wiiu "github.com/PretendoNetwork/friends-secure/database/wiiu" - "github.com/PretendoNetwork/friends-secure/globals" + database_wiiu "github.com/PretendoNetwork/friends/database/wiiu" + "github.com/PretendoNetwork/friends/globals" nex "github.com/PretendoNetwork/nex-go" nintendo_notifications "github.com/PretendoNetwork/nex-protocols-go/nintendo-notifications" nintendo_notifications_types "github.com/PretendoNetwork/nex-protocols-go/nintendo-notifications/types" diff --git a/utility/crypto.go b/utility/crypto.go index aa14da7..4b14f48 100644 --- a/utility/crypto.go +++ b/utility/crypto.go @@ -9,8 +9,8 @@ import ( "fmt" "hash/crc32" - "github.com/PretendoNetwork/friends-secure/globals" - "github.com/PretendoNetwork/friends-secure/types" + "github.com/PretendoNetwork/friends/globals" + "github.com/PretendoNetwork/friends/types" ) func DecryptToken(encryptedToken []byte) (*types.NEXToken, error) {