Documentation ¶
Index ¶
- Constants
- Variables
- func BootstrapCommand(ctx context.Context, client client.Client, command string) error
- func BootstrapLocalList(ctx context.Context, client client.Client) error
- func ComposeDown(ctx context.Context, client client.Client) (types.ETag, error)
- func ComposeRestart(ctx context.Context, client client.Client) (types.ETag, error)
- func ComposeStart(ctx context.Context, c client.Client, force bool) (*defangv1.DeployResponse, error)
- func ComposeStop(ctx context.Context, client client.Client) (types.ETag, error)
- func ConfigDelete(ctx context.Context, client client.Client, names ...string) error
- func ConfigList(ctx context.Context, client client.Client) error
- func ConfigSet(ctx context.Context, client client.Client, name string, value string) error
- func Connect(cluster string, loader client.ProjectLoader) (client.GrpcClient, types.TenantID)
- func Delete(ctx context.Context, client client.Client, names ...string) (types.ETag, error)deprecated
- func GenerateLetsEncryptCert(ctx context.Context, client cliClient.Client) error
- func GenerateWithAI(ctx context.Context, client client.Client, language string, description string) ([]string, error)
- func GetExistingToken(fabric string) string
- func GetServices(ctx context.Context, client client.Client, long bool) error
- func GetTenantID(cluster string) types.TenantIDdeprecated
- func GetVersion(ctx context.Context, client client.Client) (string, error)
- func InitFromSample(ctx context.Context, name string) error
- func InteractiveAgreeToS(ctx context.Context, client client.Client) error
- func InteractiveLogin(ctx context.Context, client client.Client, gitHubClientId, fabric string) error
- func Logout(ctx context.Context, client client.Client) error
- func MarshalPretty(root string, data proto.Message) ([]byte, error)
- func NewClient(cluster string, provider client.Provider, loader client.ProjectLoader) client.Client
- func NonInteractiveAgreeToS(ctx context.Context, client client.Client) error
- func NonInteractiveLogin(ctx context.Context, client client.Client, fabric string) error
- func NormalizeServiceName(s string) string
- func ParseTimeOrDuration(str string, now time.Time) (time.Time, error)
- func PrintObject(root string, data proto.Message) error
- func Restart(ctx context.Context, client client.Client, names ...string) (types.ETag, error)
- func SendMsg(ctx context.Context, client client.Client, subject, _type, id string, ...) error
- func SplitTenantHost(cluster string) (types.TenantID, string)
- func Subscribe(ctx context.Context, client client.Client, services []string) (<-chan *map[string]string, error)
- func Tail(ctx context.Context, client client.Client, params TailOptions) error
- func TearDown(ctx context.Context, client client.Client, force bool) error
- func Token(ctx context.Context, client client.Client, clientId string, ...) error
- func Whoami(ctx context.Context, client client.Client) error
- type CancelError
- type ComposeError
- type ComposeLoader
- type EndLogConditional
- type HTTPClient
- type P
- type Sample
- type ServiceStatus
- type TailDetectStopEventFunc
- type TailOptions
Constants ¶
View Source
const ( MiB = 1024 * 1024 ContextFileLimit = 10 ContextSizeLimit = 10 * MiB )
View Source
const DefaultCluster = "fabric-prod1.defang.dev"
View Source
const (
RFC3339Micro = "2006-01-02T15:04:05.000000Z07:00" // like RFC3339Nano but with 6 digits of precision
)
Variables ¶
View Source
var ( DoDryRun = false ErrDryRun = errors.New("dry run") )
View Source
var (
DoVerbose = false
)
View Source
var ErrTermsNotAgreed = errors.New("You must agree to the Defang terms of service to use this tool")
Functions ¶
func BootstrapCommand ¶
func ComposeRestart ¶
func ComposeStart ¶
func ComposeStart(ctx context.Context, c client.Client, force bool) (*defangv1.DeployResponse, error)
ComposeStart validates a compose project and uploads the services using the client
func ConfigDelete ¶
func Connect ¶
func Connect(cluster string, loader client.ProjectLoader) (client.GrpcClient, types.TenantID)
func GenerateLetsEncryptCert ¶
func GenerateWithAI ¶
func GetExistingToken ¶
func GetTenantID
deprecated
func InteractiveAgreeToS ¶
func InteractiveLogin ¶
func NonInteractiveAgreeToS ¶
func NonInteractiveLogin ¶
func NormalizeServiceName ¶
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).
Types ¶
type CancelError ¶
type CancelError struct { Services []string Etag string Last time.Time // 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 ComposeLoader ¶
type ComposeLoader struct {
ComposeFilePath string
}
func (ComposeLoader) LoadWithDefaultProjectName ¶
func (c ComposeLoader) LoadWithDefaultProjectName(name string) (*compose.Project, error)
func (ComposeLoader) LoadWithProjectName ¶
func (c ComposeLoader) LoadWithProjectName(name string) (*compose.Project, error)
type EndLogConditional ¶
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"` }
type ServiceStatus ¶
type ServiceStatus string
const ( ServiceDeploymentStarting ServiceStatus = "STARTING" ServiceDeploymentInProgress ServiceStatus = "IN_PROGRESS" ServiceStarted ServiceStatus = "COMPLETED" ServiceStopping ServiceStatus = "STOPPING" ServiceStopped ServiceStatus = "STOPPED" ServiceDeactivating ServiceStatus = "DEACTIVATING" ServiceDeprovisioning ServiceStatus = "DEPROVISIONING" ServiceFailed ServiceStatus = "FAILED" ServiceUnknown ServiceStatus = "UNKNOWN" )
type TailDetectStopEventFunc ¶
func CreateEndLogEventDetectFunc ¶
func CreateEndLogEventDetectFunc(conditionals []EndLogConditional) TailDetectStopEventFunc
type TailOptions ¶
Source Files ¶
- agree_tos.go
- bootstrap.go
- cert.go
- common.go
- compose.go
- composeDown.go
- composeRestart.go
- composeStart.go
- composeStop.go
- compose_validation.go
- configDelete.go
- configList.go
- configSet.go
- connect.go
- delete.go
- generate.go
- getServices.go
- getVersion.go
- init.go
- loader.go
- login.go
- logout.go
- restart.go
- sendMsg.go
- subscribe.go
- tail.go
- teardown.go
- token.go
- whoami.go
Click to show internal directories.
Click to hide internal directories.