This package allows you to use the functions on the MaestroPanel API service with golang.
go get github.com/emrecaglar/maestropanel
m := maestropanel.MaestroPanel{
Url: "maestropanel url (http://domain.com:9715)",
Key: "api key",
Version: "api version (v1)"
}
package main
import (
"fmt"
"github.com/emrecaglar/maestropanel"
)
func main(){
m := maestropanel.MaestroPanel{
Url: "http://domain.com:9715",
Key: "xxxxxx",
Version: "v1"
}
domain := maestropanel.Domain{
Name: "domain.com",
UserName: "admin",
Password: "111111",
PlanAlias: "default",
}
web := m.Web()
result, _ := web.CreateDomain(domain)
fmt.Println(result)
}