project

package
v0.0.232 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: MIT Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrConfigExists = fmt.Errorf("sst.config.ts already exists")
View Source
var ErrInvalidStageName = fmt.Errorf("invalid stage name")
View Source
var ErrStackRunFailed = fmt.Errorf("stack run had errors")
View Source
var ErrStageNotFound = fmt.Errorf("stage not found")
View Source
var ErrV2Config = fmt.Errorf("sstv2 config detected")
View Source
var StageRegex = regexp.MustCompile(`^[a-zA-Z0-9-]+$`)

Functions

func Create

func Create(templateName string, home string) error

func Discover

func Discover() (string, error)

func LoadPersonalStage

func LoadPersonalStage(cfgPath string) string

func ResolvePlatformDir

func ResolvePlatformDir(cfgPath string) string

func ResolveWorkingDir

func ResolveWorkingDir(cfgPath string) string

func SetPersonalStage

func SetPersonalStage(cfgPath string, stage string) error

Types

type App

type App struct {
	Name      string                 `json:"name"`
	Stage     string                 `json:"stage"`
	Removal   string                 `json:"removal"`
	Providers map[string]interface{} `json:"providers"`
	Home      string                 `json:"home"`
	// Deprecated: Backend is now Home
	Backend string `json:"backend"`
	// Deprecated: RemovalPolicy is now Removal
	RemovalPolicy string `json:"removalPolicy"`
}

type CompleteEvent

type CompleteEvent struct {
	Links     Links
	Warps     Warps
	Receivers Receivers
	Outputs   map[string]interface{}
	Hints     map[string]string
	Errors    []Error
	Finished  bool
	Resources []apitype.ResourceV3
}

type ConcurrentUpdateEvent

type ConcurrentUpdateEvent struct{}

type Error

type Error struct {
	Message string
	URN     string
}

type ImportOptions

type ImportOptions struct {
	Type   string
	Name   string
	ID     string
	Parent string
}
type Links map[string]interface{}

type PackageJson

type PackageJson struct {
	Version      string            `json:"version"`
	Dependencies map[string]string `json:"dependencies"`
}

type Project

type Project struct {
	Stack *stack
	// contains filtered or unexported fields
}

func New

func New(input *ProjectConfig) (*Project, error)

func (*Project) Add

func (p *Project) Add(pkg string) error

func (*Project) App

func (p *Project) App() *App

func (*Project) Backend

func (p *Project) Backend() provider.Home

func (*Project) CheckPlatform

func (p *Project) CheckPlatform(version string) bool

func (*Project) Cleanup

func (p *Project) Cleanup() error

func (*Project) CopyPlatform

func (p *Project) CopyPlatform(version string) error

func (*Project) Install

func (p *Project) Install() error

func (*Project) LoadHome added in v0.0.219

func (proj *Project) LoadHome() error

func (*Project) NeedsInstall

func (p *Project) NeedsInstall() bool

func (*Project) PathConfig

func (p *Project) PathConfig() string

func (*Project) PathPlatformDir

func (p *Project) PathPlatformDir() string

func (*Project) PathRoot

func (p *Project) PathRoot() string

func (*Project) PathWorkingDir

func (p *Project) PathWorkingDir() string

func (*Project) Version

func (p *Project) Version() string

type ProjectConfig

type ProjectConfig struct {
	Version string
	Stage   string
	Config  string
}

type Receiver

type Receiver struct {
	Links       []string
	Environment map[string]string
}

type Receivers

type Receivers map[string]Receiver

type StackCommandEvent

type StackCommandEvent struct {
	Command string
}

type StackEvent

type StackEvent struct {
	events.EngineEvent
	StdOutEvent           *StdOutEvent
	ConcurrentUpdateEvent *ConcurrentUpdateEvent
	CompleteEvent         *CompleteEvent
	StackCommandEvent     *StackCommandEvent
}

type StackEventStream

type StackEventStream = chan StackEvent

type StackInput

type StackInput struct {
	OnEvent func(event *StackEvent)
	OnFiles func(files []string)
	Command string
	Dev     bool
}

type StdOutEvent

type StdOutEvent struct {
	Text string
}

type Warp

type Warp struct {
	FunctionID string          `json:"functionID"`
	Runtime    string          `json:"runtime"`
	Handler    string          `json:"handler"`
	Bundle     string          `json:"bundle"`
	Properties json.RawMessage `json:"properties"`
	Links      []string        `json:"links"`
	CopyFiles  []struct {
		From string `json:"from"`
		To   string `json:"to"`
	} `json:"copyFiles"`
	Environment map[string]string `json:"environment"`
}

type Warps

type Warps map[string]Warp

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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