netlify

package
v0.0.1-rc2 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2020 License: MPL-2.0 Imports: 22 Imported by: 0

Documentation

Overview

Package netlify contains components for deploying to Netlify.

Index

Constants

This section is empty.

Variables

View Source
var Options = []sdk.Option{
	sdk.WithComponents(&Platform{}),
}

Options are the SDK options to use for instantiation for the Netlfiy plugin.

Functions

func Authenticate

func Authenticate(
	ctx context.Context,
	log hclog.Logger,
) (string, error)

Authenticate makes API calls and user interactions appropriate to create and return an API access token todo(pearkes): use Authenticator when it exists

Types

type Config

type Config struct {
	// SiteID is the site to deploy to
	SiteID string `hcl:"site_id,optional"`
	// SiteName is the name of the site we create. Defaults
	// to the application.
	SiteName string `hcl:"site_name,optional"`
	// AccessToken is the access token to use, will
	// prompt oauth exchange if not specified
	AccessToken string `hcl:"access_token,optional"`
}

Config is the configuration structure for the Platform.

type Deployment

type Deployment struct {
	SiteId               string   `protobuf:"bytes,1,opt,name=site_id,json=siteId,proto3" json:"site_id,omitempty"`
	Url                  string   `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Deployment) Descriptor

func (*Deployment) Descriptor() ([]byte, []int)

func (*Deployment) GetSiteId

func (m *Deployment) GetSiteId() string

func (*Deployment) GetUrl

func (m *Deployment) GetUrl() string

func (*Deployment) ProtoMessage

func (*Deployment) ProtoMessage()

func (*Deployment) Reset

func (m *Deployment) Reset()

func (*Deployment) String

func (m *Deployment) String() string

func (*Deployment) XXX_DiscardUnknown

func (m *Deployment) XXX_DiscardUnknown()

func (*Deployment) XXX_Marshal

func (m *Deployment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Deployment) XXX_Merge

func (m *Deployment) XXX_Merge(src proto.Message)

func (*Deployment) XXX_Size

func (m *Deployment) XXX_Size() int

func (*Deployment) XXX_Unmarshal

func (m *Deployment) XXX_Unmarshal(b []byte) error

type Platform

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

Platform is the Platform implementation for Google Cloud Run.

func (*Platform) Auth

func (p *Platform) Auth(
	ctx context.Context,
	log hclog.Logger,
	src *component.Source,
	info *component.JobInfo,
	dir *datadir.Component,
	ui terminal.UI,
) (*component.AuthResult, error)

Auth retrieves a token and stores it

func (*Platform) AuthFunc

func (p *Platform) AuthFunc() interface{}

AuthFunc implements component.Authenticator

func (*Platform) Config

func (p *Platform) Config() (interface{}, error)

Config implements Configurable

func (*Platform) Deploy

func (p *Platform) Deploy(
	ctx context.Context,
	log hclog.Logger,
	src *component.Source,
	files *files.Files,
	dir *datadir.Component,
	deployConfig *component.DeploymentConfig,
	ui terminal.UI,
) (*Deployment, error)

Deploy deploys a set of files to netlify

func (*Platform) DeployFunc

func (p *Platform) DeployFunc() interface{}

DeployFunc implements component.Platform

func (*Platform) Documentation

func (p *Platform) Documentation() (*docs.Documentation, error)

func (*Platform) ValidateAuth

func (p *Platform) ValidateAuth(
	ctx context.Context,
	log hclog.Logger,
	src *component.Source,
	dir *datadir.Component,
	ui terminal.UI,
) error

ValidateAuth checks validity of the stored or supplied credential

func (*Platform) ValidateAuthFunc

func (p *Platform) ValidateAuthFunc() interface{}

ValidateAuthFunc implements component.Authenticator

type Release

type Release struct {
	Url                  string   `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Release) Descriptor

func (*Release) Descriptor() ([]byte, []int)

func (*Release) GetUrl

func (m *Release) GetUrl() string

func (*Release) ProtoMessage

func (*Release) ProtoMessage()

func (*Release) Reset

func (m *Release) Reset()

func (*Release) String

func (m *Release) String() string

func (*Release) XXX_DiscardUnknown

func (m *Release) XXX_DiscardUnknown()

func (*Release) XXX_Marshal

func (m *Release) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Release) XXX_Merge

func (m *Release) XXX_Merge(src proto.Message)

func (*Release) XXX_Size

func (m *Release) XXX_Size() int

func (*Release) XXX_Unmarshal

func (m *Release) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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