package main
import bottalk "github.com/bottalk/go-plugin"
func main() {
plugin := bottalk.NewPlugin()
plugin.Name = "Weather plugin"
plugin.Description = "This plugin helps to fetch information about weather"
plugin.Actions = map[string]bottalk.Action{"getWeather": bottalk.Action{
Name: "getWeather",
Description: "This action fetches weather by cityId",
Endpoint: "/getWeather",
Action: func() string {
return "ok"
},
Params: map[string]string{"city": "Id of the city"},
}}
plugin.Run(":8080")
}}
-
Notifications
You must be signed in to change notification settings - Fork 0
bottalk/go-plugin
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Plugin package in Go
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published