domain.go 514 B

1234567891011121314151617181920212223242526272829
  1. package client
  2. import (
  3. "context"
  4. "fmt"
  5. "github.com/porter-dev/porter/api/types"
  6. )
  7. // CreateDNSRecord creates a Github action with basic authentication
  8. func (c *Client) CreateDNSRecord(
  9. ctx context.Context,
  10. projID, clusterID uint,
  11. namespace, name string,
  12. ) (*types.DNSRecord, error) {
  13. resp := &types.DNSRecord{}
  14. err := c.postRequest(
  15. fmt.Sprintf(
  16. "/projects/%d/clusters/%d/namespaces/%s/releases/%s/subdomain",
  17. projID, clusterID,
  18. namespace, name,
  19. ),
  20. nil,
  21. resp,
  22. )
  23. return resp, err
  24. }