varialine/about.go

30 lines
1014 B
Go

package main
import (
"net/http"
"github.com/gin-gonic/gin"
"github.com/twilio/twilio-go/twiml"
)
func main() {
gin.SetMode(gin.ReleaseMode)
router := gin.Default()
router.POST("/", func(context *gin.Context) {
say := &twiml.VoiceSay{
Message: "varia (Gouwstraat 3, Rotterdam) is a space for developing collective approaches to everyday technology. As varia members, we maintain and facilitate a collective infrastructure from which we generate questions, opinions, modifications, help and action. We work with free software, organise events and collaborate in different constellations. varia figures things out as they go, tries to keep notes, is multilingual, has open hours and can be contacted at info[@]varia.zone.",
}
twimlResult, err := twiml.Voice([]twiml.Element{say})
if err != nil {
context.String(http.StatusInternalServerError, err.Error())
} else {
context.Header("Content-Type", "text/xml")
context.String(http.StatusOK, twimlResult)
}
})
router.Run(":1312")
}