12345678910111213141516171819202122232425262728293031323334353637383940 |
- package provisioning
- import (
- "github.com/ovh/go-ovh/ovh"
- )
- type Ovh struct {
- ovhClient *ovh.Client
- }
- func NewOvhClient(endpoint, appKey, appSecret string) *Ovh {
- ovhClient, _ := ovh.NewClient(
- endpoint,
- appKey,
- appSecret,
- "",
- )
- // if err != nil {
- // panic(err)
- // }
- return &Ovh{
- ovhClient: ovhClient,
- }
- }
- func (o *Ovh) ConfigureZone(zoneName string) error {
- err := o.ovhClient.Post("/domain/zone", map[string]interface{}{
- "zone": zoneName,
- }, nil)
- if err != nil {
- return err
- }
- return nil
- }
- func (o *Ovh) GetVPSStatus(id string) (string, error) {
- return "", nil
- }
|