This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--[[ | |
Email Password Recovery module. | |
Using this module, you can request a password reset link from the game using 'recover_email_password' RPC. | |
--]] | |
local nk = require("nakama") | |
local HTTPS_PREFIX = "https://" | |
local MAILGUN_API_BASE_URL = "api.mailgun.net/v3" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM heroiclabs/nakama-pluginbuilder:3.2.0 AS builder | |
ENV GO111MODULE on | |
ENV CGO_ENABLED 1 | |
WORKDIR /backend | |
COPY . . | |
RUN go build --trimpath --mod=vendor --buildmode=plugin -o ./backend.so |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--[[ | |
Copyright 2018 The Nakama Authors | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 | |
Unless required by applicable law or agreed to in writing, software |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3' | |
services: | |
cockroachdb: | |
image: cockroachdb/cockroach:v2.0.1 | |
command: start --insecure --store=attrs=ssd,path=/var/lib/cockroach/ | |
restart: always | |
volumes: | |
- data:/var/lib/cockroach | |
expose: | |
- "8080" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local nk = require("nakama") | |
-- use any string as an ID | |
local id = "8c79b85e-d5a1-11e7-87cc-7bd5871ea4a4" | |
local reset = nil -- no reset | |
local metadata = { | |
} | |
nk.leaderboard_create(id, "desc", reset, metadata, false) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Copyright 2017 The Nakama Authors | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Copyright 2017 The Nakama Authors | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
public class UUID | |
{ | |
public static byte[] FromString(string uuid) | |
{ | |
var guid = new Guid(uuid).ToByteArray(); | |
Array.Reverse(guid, 6, 2); | |
Array.Reverse(guid, 4, 2); | |
Array.Reverse(guid, 0, 4); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"skills": [ | |
{ | |
"context": {"bucket": "b", "collection": "skills", "record": "fireball"}, | |
"value": { | |
"name": "Fireball", | |
"element": 0, | |
"base_damage": 20 | |
} | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--[[ | |
Copyright 2017 The Nakama Authors | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 | |
Unless required by applicable law or agreed to in writing, software |
NewerOlder