-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprovider.go
More file actions
42 lines (34 loc) · 1.28 KB
/
Copy pathprovider.go
File metadata and controls
42 lines (34 loc) · 1.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package deploy
import "github.com/tinywasm/wizard"
// Store is the interface for the deployment configuration and secret storage.
// It is defined here to allow providers to reference it without circular imports.
type Store interface {
Get(key string) (string, error)
Set(key, value string) error
}
// Provider is the interface for a deployment target backend.
// Implementations wrap provider-specific tools (goflare, SSH, etc).
// tinywasm/app depends only on this interface — never on goflare directly.
type Provider interface {
// Build compiles the project artifacts.
Build() error
// Deploy uploads built artifacts to the provider.
Deploy(store interface {
Get(string) (string, error)
Set(string, string) error
}) error
// SetLog injects the application logger.
SetLog(f func(...any))
// WizardSteps returns wizard steps to collect provider credentials.
WizardSteps(store interface {
Get(string) (string, error)
Set(string, string) error
}, log func(...any)) []*wizard.Step
// Supports reports whether the provider handles the given deployment method.
Supports(method string) bool
// devwatch integration
MainInputFileRelativePath() string
NewFileEvent(fileName, extension, filePath, event string) error
SupportedExtensions() []string
UnobservedFiles() []string
}