This file contains 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
test3.blocks.aggregate([ | |
{ | |
$search: { | |
index: "block-files-idx", | |
phrase: { | |
query: "// method proxies as public functions", | |
path: "block_body.block_data.txs.msg.package.files.body" | |
} |
This file contains 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
import ( | |
"strings" | |
"gno.land/p/demo/ufmt" | |
) |
This file contains 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
package main |
This file contains 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
<strong>Welcome</strong> |
This file contains 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
name: location | |
description: Find Geo Location of an IP Address | |
configuration: | |
env: | |
# We're using MaxMind as a geo location database provider but it can be | |
# changed to another one by overwriting env variables in the deployment time. | |
# Note that service is responsible to respect to these env variables. | |
- PROVIDER=maxmind | |
This file contains 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
name: blog-tutorial | |
description: | | |
A blog workflow | |
Go to blog page at {$configs.domain} to publish some articles! | |
services: | |
# httpServer service serves any content over HTTP. | |
httpServer: https://github.com/ilgooz/service-http-server | |
This file contains 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
name: discord-invites | |
description: | | |
Send discord invites to your fellows. | |
curl -d "[email protected]" -XPOST http://localhost:3000/webhook | |
services: | |
webhook: 4f7891f77a6333787075e95b6d3d73ad50b5d1e9 | |
discord: 1daf16ca98322024824f307a9e11c88e0aba55e2 |
This file contains 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
// stream is *Stream and err is error | |
// err filled if we fail to listen for events | |
stream, err := observable3.Execute(serviceID, "send") | |
if err != nil { | |
log.Fatal(err) | |
} | |
for { | |
select { | |
case execution := <- stream.Executions: |
This file contains 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
// Package main is an application that uses functionalities from following services: | |
// https://github.com/mesg-foundation/service-webhook | |
// https://github.com/mesg-foundation/service-discord-invitation | |
package main | |
import ( | |
"fmt" | |
"log" | |
"github.com/ilgooz/mesg-go/application" |
This file contains 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
execution := application.NewExecution("v1_yyy", "send") // has Name, Info, Data inputs | |
mapper := application.NewMapper(func(req *application.Request) interface {} { | |
var data eventOutput | |
req.Get(&data) | |
data.Info = "info" | |
return data | |
}) | |
// Wait for request event from v1_xxx service but filter with name=x. |
NewerOlder