Documentation
¶
Index ¶
- Constants
- Variables
- func BootstrapCommand(ctx context.Context, projectName string, verbose bool, ...) error
- func BootstrapLocalList(ctx context.Context, provider client.Provider) error
- func CanMonitorService(service compose.ServiceConfig) bool
- func ComposeDown(ctx context.Context, projectName string, fabric client.FabricClient, ...) (types.ETag, error)
- func ComposeUp(ctx context.Context, project *compose.Project, fabric client.FabricClient, ...) (*defangv1.DeployResponse, *compose.Project, error)
- func ConfigDelete(ctx context.Context, projectName string, provider client.Provider, ...) error
- func ConfigList(ctx context.Context, projectName string, provider client.Provider) error
- func ConfigSet(ctx context.Context, projectName string, provider client.Provider, name string, ...) error
- func Connect(ctx context.Context, addr string) (*client.GrpcClient, error)
- func DebugDeployment(ctx context.Context, client client.FabricClient, debugConfig DebugConfig) error
- func Delete(ctx context.Context, projectName string, c client.FabricClient, ...) (types.ETag, error)
- func DeploymentsList(ctx context.Context, listType defangv1.DeploymentType, projectName string, ...) error
- func EnableUTCMode()
- func GenerateLetsEncryptCert(ctx context.Context, project *compose.Project, client client.FabricClient, ...) error
- func GeneratePreview(ctx context.Context, project *compose.Project, client client.FabricClient, ...) (string, error)
- func GenerateWithAI(ctx context.Context, client client.FabricClient, args GenerateArgs) ([]string, error)
- func GetServices(ctx context.Context, projectName string, provider client.Provider, long bool) error
- func GetVersion(ctx context.Context, client client.FabricClient) (string, error)
- func InitFromSamples(ctx context.Context, dir string, names []string) error
- func InteractiveComposeDown(ctx context.Context, provider client.Provider, projectName string) (types.ETag, error)
- func InteractiveDebugDeployment(ctx context.Context, client client.FabricClient, debugConfig DebugConfig) error
- func InteractiveDebugForClientError(ctx context.Context, client client.FabricClient, project *compose.Project, ...) error
- func IsProjectFile(basename string) bool
- func Logout(ctx context.Context, client client.FabricClient) error
- func MarshalPretty(root string, data proto.Message) ([]byte, error)
- func MixinFromSample(ctx context.Context, dir string, name string) error
- func NewProvider(ctx context.Context, providerID client.ProviderID, ...) (client.Provider, error)
- func ParseTimeOrDuration(str string, now time.Time) (time.Time, error)
- func Preview(ctx context.Context, project *compose.Project, fabric cliClient.FabricClient, ...) error
- func PrintEstimate(mode defangv1.DeploymentMode, estimate *defangv1.EstimateResponse)
- func PrintObject(root string, data proto.Message) error
- func RunEstimate(ctx context.Context, project *compose.Project, client client.FabricClient, ...) (*defangv1.EstimateResponse, error)
- func SendMsg(ctx context.Context, client client.FabricClient, subject, _type, id string, ...) error
- func SplitProjectStack(name string) (projectName string, stackName string)
- func Tail(ctx context.Context, provider client.Provider, projectName string, ...) error
- func TailAndWaitForCD(ctx context.Context, provider client.Provider, projectName string, ...) error
- func TearDown(ctx context.Context, provider client.Provider, force bool) error
- func Token(ctx context.Context, client client.FabricClient, tenant types.TenantName, ...) error
- func Upgrade(ctx context.Context) error
- func WaitForCdTaskExit(ctx context.Context, provider client.Provider) error
- type CancelError
- type ComposeError
- type DNSResult
- type DebugConfig
- type ErrNoServices
- type EstimateLineItemTableItem
- type GenerateArgs
- type HTTPClient
- type LogEntryHandler
- type PrintConfig
- type PrintDeployment
- type Sample
- type ServiceStates
- type ShowAccountData
- type TailDetectStopEventFuncdeprecated
- type TailOptions
Constants ¶
View Source
const (
RFC3339Milli = "2006-01-02T15:04:05.000Z07:00" // like RFC3339Nano but with 3 digits of precision
)
Variables ¶
View Source
var ErrDoNotComposeDown = errors.New("user did not want to compose down")
View Source
var ErrNothingToMonitor = errors.New("no services to monitor")
View Source
var ErrSampleNotFound = errors.New("sample not found")
View Source
var P = track.P
View Source
var SupportedLanguages = []string{"Nodejs", "Golang", "Python"}
Functions ¶
func BootstrapCommand ¶
func BootstrapLocalList ¶
func CanMonitorService ¶
func CanMonitorService(service compose.ServiceConfig) bool
func ComposeDown ¶
func ComposeUp ¶
func ComposeUp(ctx context.Context, project *compose.Project, fabric client.FabricClient, p client.Provider, upload compose.UploadMode, mode defangv1.DeploymentMode) (*defangv1.DeployResponse, *compose.Project, error)
ComposeUp validates a compose project and uploads the services using the client
func ConfigDelete ¶
func ConfigList ¶
func DebugDeployment ¶
func DebugDeployment(ctx context.Context, client client.FabricClient, debugConfig DebugConfig) error
func DeploymentsList ¶
func DeploymentsList(ctx context.Context, listType defangv1.DeploymentType, projectName string, client client.FabricClient, limit uint32) error
func GenerateLetsEncryptCert ¶
func GeneratePreview ¶
func GeneratePreview(ctx context.Context, project *compose.Project, client client.FabricClient, previewProvider client.Provider, estimateProviderID client.ProviderID, mode defangv1.DeploymentMode, region string) (string, error)
func GenerateWithAI ¶
func GenerateWithAI(ctx context.Context, client client.FabricClient, args GenerateArgs) ([]string, error)
func GetServices ¶
func GetVersion ¶
func InitFromSamples ¶
InitFromSamples copies the sample(s) into the given directory, aborting if any files already exist.
func InteractiveComposeDown ¶
func InteractiveDebugDeployment ¶
func InteractiveDebugDeployment(ctx context.Context, client client.FabricClient, debugConfig DebugConfig) error
func IsProjectFile ¶
func MixinFromSample ¶
MixinFromSamples copies the sample files into the given directory, skipping existing files.
func NewProvider ¶
func NewProvider(ctx context.Context, providerID client.ProviderID, fabricClient client.FabricClient) (client.Provider, error)
func ParseTimeOrDuration ¶
ParseTimeOrDuration parses a time string or duration string (e.g. 1h30m) and returns a time.Time. At a minimum, this function supports RFC3339Nano, Go durations, and our own TimestampFormat (local).
func PrintEstimate ¶
func PrintEstimate(mode defangv1.DeploymentMode, estimate *defangv1.EstimateResponse)
func RunEstimate ¶
func RunEstimate(ctx context.Context, project *compose.Project, client client.FabricClient, previewProvider client.Provider, estimateProviderID client.ProviderID, region string, mode defangv1.DeploymentMode) (*defangv1.EstimateResponse, error)
func SplitProjectStack ¶
func TailAndWaitForCD ¶
Types ¶
type CancelError ¶
type CancelError struct { TailOptions ProjectName string // contains filtered or unexported fields }
func (CancelError) Error ¶
func (cerr CancelError) Error() string
func (CancelError) Unwrap ¶
func (cerr CancelError) Unwrap() error
type ComposeError ¶
type ComposeError struct {
// contains filtered or unexported fields
}
func (ComposeError) Unwrap ¶
func (e ComposeError) Unwrap() error
type DebugConfig ¶
type DebugConfig struct { Deployment types.ETag FailedServices []string ModelId string Project *compose.Project Provider client.Provider Since time.Time Until time.Time }
func (DebugConfig) String ¶
func (dc DebugConfig) String() string
type ErrNoServices ¶
type ErrNoServices struct {
ProjectName string // may be empty
}
func (ErrNoServices) Error ¶
func (e ErrNoServices) Error() string
type GenerateArgs ¶
type LogEntryHandler ¶
type LogEntryHandler func(*defangv1.LogEntry, *TailOptions) error
type PrintConfig ¶
type PrintConfig struct {
Name string
}
type PrintDeployment ¶
type Sample ¶
type Sample struct { Name string `json:"name"` Title string `json:"title"` Category string `json:"category"` // Deprecated: use Languages instead Readme string `json:"readme"` // unused DirectoryName string `json:"directoryName"` ShortDescription string `json:"shortDescription"` Tags []string `json:"tags"` Languages []string `json:"languages"` Configs []string `json:"configs"` }
type ServiceStates ¶
type ServiceStates = map[string]defangv1.ServiceState
func TailAndMonitor ¶
func WaitServiceState ¶
type ShowAccountData ¶
type ShowAccountData struct { client.AccountInfo SubscriberTier defangv1.SubscriptionTier Tenant string TenantID string }
func Whoami ¶
func Whoami(ctx context.Context, fabric client.FabricClient, provider client.Provider) (ShowAccountData, error)
type TailDetectStopEventFunc
deprecated
type TailOptions ¶
type TailOptions struct { EndEventDetectFunc TailDetectStopEventFunc // Deprecated: use Subscribe and GetDeploymentStatus instead #851 Deployment types.ETag Filter string LogType logs.LogType Raw bool Services []string Since time.Time Until time.Time Verbose bool }
func (TailOptions) String ¶
func (to TailOptions) String() string
Source Files
¶
- bootstrap.go
- cert.go
- common.go
- composeDown.go
- composeUp.go
- configDelete.go
- configList.go
- configSet.go
- connect.go
- debug.go
- delete.go
- deploymentsList.go
- estimate.go
- generate.go
- getServices.go
- getVersion.go
- logout.go
- new.go
- preview.go
- sendMsg.go
- subscribe.go
- tail.go
- tailAndMonitor.go
- teardown.go
- token.go
- upgrade.go
- waitForCdTaskExit.go
- whoami.go
Click to show internal directories.
Click to hide internal directories.