internal

package
v4.12.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 28, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OAuthStaticAccessToken added in v4.12.0

func OAuthStaticAccessToken(client *http.Client, accessToken string) *http.Client

Types

type APIError

type APIError struct {
	Code    string `json:"code"`
	Message string `json:"message"`
}

func (APIError) Error

func (a APIError) Error() string

type APIErrorResponse

type APIErrorResponse struct {
	Error *APIError `json:"error"`
}

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client Vercel client.

func NewClient

func NewClient(hc *http.Client, teamID string) *Client

NewClient creates a Client.

func (*Client) CreateRecord

func (c *Client) CreateRecord(ctx context.Context, zone string, record Record) (*CreateRecordResponse, error)

CreateRecord creates a DNS record. https://vercel.com/docs/rest-api#endpoints/dns/create-a-dns-record

func (*Client) DeleteRecord

func (c *Client) DeleteRecord(ctx context.Context, zone string, recordID string) error

DeleteRecord deletes a DNS record. https://vercel.com/docs/rest-api#endpoints/dns/delete-a-dns-record

type CreateRecordResponse

type CreateRecordResponse struct {
	UID     string `json:"uid"`
	Updated int    `json:"updated,omitempty"`
}

CreateRecordResponse represents a response from Vercel's API after making a DNS record.

type Record

type Record struct {
	ID    string `json:"id,omitempty"`
	Slug  string `json:"slug,omitempty"`
	Name  string `json:"name,omitempty"`
	Type  string `json:"type,omitempty"`
	Value string `json:"value,omitempty"`
	TTL   int    `json:"ttl,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL