open-api: Index | Files | Directories

package porcelain

import ""


Package Files

assets.go auth.go deploy.go deploy_keys.go deploy_unix.go forms.go netlify_client.go site.go


const DefaultConcurrentUploadLimit = 10
const DefaultRetryAttempts = 3
const DefaultSyncFileLimit = 500


var Default = NewHTTPClient(nil)

Default netlify HTTP client.

type CustomTLSCertificate Uses

type CustomTLSCertificate struct {
    Certificate    string
    Key            string
    CACertificates string

CustomTLSCertificate holds information about custom TLS certificates.

type DeployObserver Uses

type DeployObserver interface {
    OnSetupWalk() error
    OnSuccessfulStep(*FileBundle) error
    OnSuccessfulWalk(*models.DeployFiles) error

    OnSetupDelta(*models.DeployFiles) error
    OnSuccessfulDelta(*models.DeployFiles, *models.Deploy) error

    OnSetupUpload(*FileBundle) error
    OnSuccessfulUpload(*FileBundle) error

type DeployOptions Uses

type DeployOptions struct {
    SiteID            string
    Dir               string
    FunctionsDir      string
    LargeMediaEnabled bool

    IsDraft bool

    Title             string
    Branch            string
    CommitRef         string
    UploadTimeout     time.Duration
    PreProcessTimeout time.Duration

    Observer DeployObserver
    // contains filtered or unexported fields

DeployOptions holds the option for creating a new deploy

type FileBundle Uses

type FileBundle struct {
    Name    string
    Sum     string
    Runtime string
    Size    *int64 `json:"size,omitempty"`

    // Path OR Buffer should be populated
    Path   string
    Buffer io.ReadSeeker

func (*FileBundle) Close Uses

func (f *FileBundle) Close() error

func (*FileBundle) Read Uses

func (f *FileBundle) Read(p []byte) (n int, err error)

func (*FileBundle) Seek Uses

func (f *FileBundle) Seek(offset int64, whence int) (int64, error)

type Netlify Uses

type Netlify struct {
    // contains filtered or unexported fields

Netlify is a client for netlify

func New Uses

func New(transport runtime.ClientTransport, formats strfmt.Registry) *Netlify

New creates a new netlify client.

func NewHTTPClient Uses

func NewHTTPClient(formats strfmt.Registry) *Netlify

NewHTTPClient creates a new netlify HTTP client.

func NewRetryable Uses

func NewRetryable(transport runtime.ClientTransport, formats strfmt.Registry, attempts int) *Netlify

NewRetryable creates a new netlify client with a number of attempts for rate limits.

func NewRetryableHTTPClient Uses

func NewRetryableHTTPClient(formats strfmt.Registry, attempts int) *Netlify

NewRetryableHTTPClient creates a new netlify HTTP client with a number of attempts for rate limits.

func (*Netlify) AddSiteAsset Uses

func (n *Netlify) AddSiteAsset(ctx context.Context, params *operations.CreateSiteAssetParams) (*models.AssetSignature, error)

func (*Netlify) ConfigureSiteTLSCertificate Uses

func (n *Netlify) ConfigureSiteTLSCertificate(ctx context.Context, siteID string, cert *CustomTLSCertificate) (*models.SniCertificate, error)

ConfigureSiteTLSCertificate provisions a TLS certificate for a site with a custom domain. It uses Let's Encrypt if the certificate is empty.

func (*Netlify) CreateDeployKey Uses

func (n *Netlify) CreateDeployKey(ctx context.Context) (*models.DeployKey, error)

func (*Netlify) CreateSite Uses

func (n *Netlify) CreateSite(ctx context.Context, site *models.SiteSetup, configureDNS bool) (*models.Site, error)

CreateSite creates a new site.

func (*Netlify) CreateTicket Uses

func (n *Netlify) CreateTicket(ctx context.Context, clientID string) (*models.Ticket, error)

Create a login ticket to authenticate a user

func (*Netlify) DeploySite Uses

func (n *Netlify) DeploySite(ctx context.Context, options DeployOptions) (*models.Deploy, error)

DeploySite creates a new deploy for a site given a directory in the filesystem. It uploads the necessary files that changed between deploys.

func (*Netlify) DoDeploy Uses

func (n *Netlify) DoDeploy(ctx context.Context, options *DeployOptions, deploy *models.Deploy) (*models.Deploy, error)

DoDeploy deploys the changes for a site given a directory in the filesystem. It uploads the necessary files that changed between deploys.

func (*Netlify) ExchangeTicket Uses

func (n *Netlify) ExchangeTicket(ctx context.Context, ticketID string) (*models.AccessToken, error)

func (*Netlify) GetDeploy Uses

func (n *Netlify) GetDeploy(ctx context.Context, deployID string) (*models.Deploy, error)

GetDeploy returns a deploy.

func (*Netlify) GetSite Uses

func (n *Netlify) GetSite(ctx context.Context, siteID string) (*models.Site, error)

GetSite returns a site.

func (*Netlify) GetSiteAssetPublicSignature Uses

func (n *Netlify) GetSiteAssetPublicSignature(ctx context.Context, params *operations.GetSiteAssetPublicSignatureParams) (*models.AssetPublicSignature, error)

func (*Netlify) GetSiteTLSCertificate Uses

func (n *Netlify) GetSiteTLSCertificate(ctx context.Context, siteID string) (*models.SniCertificate, error)

GetSiteTLSCertificate shows the TLS certificate configured for a site.

func (*Netlify) ListFormSubmissions Uses

func (n *Netlify) ListFormSubmissions(ctx context.Context, formID string) ([]*models.Submission, error)

ListFormSubmissions lists the forms submissions of a particular form

func (*Netlify) ListForms Uses

func (n *Netlify) ListForms(ctx context.Context, params *operations.ListFormsParams) ([]*models.Form, error)

ListForms lists the forms a user has access to.

func (*Netlify) ListFormsBySiteId Uses

func (n *Netlify) ListFormsBySiteId(ctx context.Context, siteID string) ([]*models.Form, error)

ListFormsBySiteId lists the forms of a particular site

func (*Netlify) ListSiteAssets Uses

func (n *Netlify) ListSiteAssets(ctx context.Context, params *operations.ListSiteAssetsParams) ([]*models.Asset, error)

func (*Netlify) ListSites Uses

func (n *Netlify) ListSites(ctx context.Context, params *operations.ListSitesParams) ([]*models.Site, error)

ListSites lists the sites a user has access to.

func (*Netlify) SetConcurrentUploadLimit Uses

func (n *Netlify) SetConcurrentUploadLimit(limit int)

func (*Netlify) SetSyncFileLimit Uses

func (n *Netlify) SetSyncFileLimit(limit int)

func (*Netlify) ShowSiteAssetInfo Uses

func (n *Netlify) ShowSiteAssetInfo(ctx context.Context, params *operations.GetSiteAssetInfoParams, showSignature bool) (*models.Asset, error)

func (*Netlify) ShowTicket Uses

func (n *Netlify) ShowTicket(ctx context.Context, ticketID string) (*models.Ticket, error)

func (*Netlify) UpdateSite Uses

func (n *Netlify) UpdateSite(ctx context.Context, site *models.SiteSetup) (*models.Site, error)

UpdateSite modifies an existent site.

func (*Netlify) UpdateSiteAsset Uses

func (n *Netlify) UpdateSiteAsset(ctx context.Context, params *operations.UpdateSiteAssetParams) (*models.Asset, error)

func (*Netlify) UploadNewSiteAsset Uses

func (n *Netlify) UploadNewSiteAsset(ctx context.Context, asset *SiteAsset) (*models.Asset, error)

func (*Netlify) WaitUntilDeployReady Uses

func (n *Netlify) WaitUntilDeployReady(ctx context.Context, d *models.Deploy, timeout time.Duration) (*models.Deploy, error)

func (*Netlify) WaitUntilTLSCertificateReady Uses

func (n *Netlify) WaitUntilTLSCertificateReady(ctx context.Context, siteID string, cert *models.SniCertificate) (*models.SniCertificate, error)

WaitUntilTLSCertificateReady checks the state of a site's certificate. It waits until the state is "issued", for Let's Encrypt certificates or "custom", which means that the certificate was provided by the user.

func (*Netlify) WaitUntilTicketAuthorized Uses

func (n *Netlify) WaitUntilTicketAuthorized(ctx context.Context, ticket *models.Ticket) (*models.Ticket, error)

type SiteAsset Uses

type SiteAsset struct {
    SiteID  string
    Name    string
    Size    int64
    Private bool
    Body    io.ReadSeeker



Package porcelain imports 30 packages (graph) and is imported by 4 packages. Updated 2019-04-21. Refresh now. Tools for package owners.