Documentation ¶
Index ¶
- Variables
- func AcceptTerms() error
- func GetAnonID() string
- func TermsAccepted() bool
- type Client
- type ErrNotImplemented
- type FabricClient
- type GrpcClient
- func (g GrpcClient) AgreeToS(ctx context.Context) error
- func (g GrpcClient) CheckLoginAndToS(ctx context.Context) error
- func (g GrpcClient) Debug(ctx context.Context, req *defangv1.DebugRequest) (*defangv1.DebugResponse, error)
- func (g GrpcClient) DelegateSubdomainZone(ctx context.Context, req *defangv1.DelegateSubdomainZoneRequest) (*defangv1.DelegateSubdomainZoneResponse, error)
- func (g GrpcClient) DeleteSubdomainZone(ctx context.Context) error
- func (g GrpcClient) GenerateFiles(ctx context.Context, req *defangv1.GenerateFilesRequest) (*defangv1.GenerateFilesResponse, error)
- func (g GrpcClient) GetDelegateSubdomainZone(ctx context.Context) (*defangv1.DelegateSubdomainZoneResponse, error)
- func (g GrpcClient) GetVersions(ctx context.Context) (*defangv1.Version, error)
- func (g GrpcClient) Publish(ctx context.Context, req *defangv1.PublishRequest) error
- func (g GrpcClient) RevokeToken(ctx context.Context) error
- func (g GrpcClient) Token(ctx context.Context, req *defangv1.TokenRequest) (*defangv1.TokenResponse, error)
- func (g GrpcClient) Track(event string, properties ...Property) error
- func (g GrpcClient) VerifyDNSSetup(ctx context.Context, req *defangv1.VerifyDNSSetupRequest) error
- func (g GrpcClient) WhoAmI(ctx context.Context) (*defangv1.WhoAmIResponse, error)
- type MockClient
- func (m MockClient) CreateUploadURL(ctx context.Context, req *defangv1.UploadURLRequest) (*defangv1.UploadURLResponse, error)
- func (m MockClient) Follow(ctx context.Context, req *defangv1.TailRequest) (ServerStream[defangv1.TailResponse], error)
- func (m MockClient) ListConfig(ctx context.Context) (*defangv1.Secrets, error)
- func (m MockClient) LoadProject(ctx context.Context) (*composeTypes.Project, error)
- func (m MockClient) LoadProjectName(ctx context.Context) (string, error)
- func (m MockClient) ServiceDNS(service string) string
- func (m MockClient) SetProjectName(projectName string)
- type MockServerStream
- type PlaygroundClient
- func (g *PlaygroundClient) BootstrapCommand(ctx context.Context, command string) (types.ETag, error)
- func (g *PlaygroundClient) BootstrapList(context.Context) ([]string, error)
- func (g PlaygroundClient) CreateUploadURL(ctx context.Context, req *defangv1.UploadURLRequest) (*defangv1.UploadURLResponse, error)
- func (g PlaygroundClient) Delete(ctx context.Context, req *defangv1.DeleteRequest) (*defangv1.DeleteResponse, error)
- func (g PlaygroundClient) DeleteConfig(ctx context.Context, req *defangv1.Secrets) error
- func (g PlaygroundClient) Deploy(ctx context.Context, req *defangv1.DeployRequest) (*defangv1.DeployResponse, error)
- func (g *PlaygroundClient) Destroy(ctx context.Context) (types.ETag, error)
- func (g *PlaygroundClient) Follow(ctx context.Context, req *defangv1.TailRequest) (ServerStream[defangv1.TailResponse], error)
- func (g PlaygroundClient) GetService(ctx context.Context, req *defangv1.ServiceID) (*defangv1.ServiceInfo, error)
- func (g PlaygroundClient) GetServices(ctx context.Context) (*defangv1.ListServicesResponse, error)
- func (g PlaygroundClient) ListConfig(ctx context.Context) (*defangv1.Secrets, error)
- func (g PlaygroundClient) LoadProject(ctx context.Context) (*composeTypes.Project, error)
- func (g PlaygroundClient) LoadProjectName(ctx context.Context) (string, error)
- func (g PlaygroundClient) Preview(ctx context.Context, req *defangv1.DeployRequest) (*defangv1.DeployResponse, error)
- func (g PlaygroundClient) PutConfig(ctx context.Context, req *defangv1.PutConfigRequest) error
- func (g PlaygroundClient) ServiceDNS(name string) string
- func (g *PlaygroundClient) SetProjectName(projectName string)
- func (g *PlaygroundClient) Subscribe(ctx context.Context, req *defangv1.SubscribeRequest) (ServerStream[defangv1.SubscribeResponse], error)
- func (g *PlaygroundClient) TearDown(ctx context.Context) error
- type ProjectLoader
- type Property
- type Provider
- type Retrier
- type ServerStream
- type State
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // StateDir is the directory where the state file is stored StateDir = filepath.Join(stateDir, "defang") )
Functions ¶
func AcceptTerms ¶
func AcceptTerms() error
func TermsAccepted ¶
func TermsAccepted() bool
Types ¶
type Client ¶
type Client interface { FabricClient BootstrapCommand(context.Context, string) (types.ETag, error) BootstrapList(context.Context) ([]string, error) CreateUploadURL(context.Context, *defangv1.UploadURLRequest) (*defangv1.UploadURLResponse, error) Delete(context.Context, *defangv1.DeleteRequest) (*defangv1.DeleteResponse, error) DeleteConfig(context.Context, *defangv1.Secrets) error Deploy(context.Context, *defangv1.DeployRequest) (*defangv1.DeployResponse, error) Destroy(context.Context) (types.ETag, error) GetService(context.Context, *defangv1.ServiceID) (*defangv1.ServiceInfo, error) GetServices(context.Context) (*defangv1.ListServicesResponse, error) ListConfig(context.Context) (*defangv1.Secrets, error) Preview(context.Context, *defangv1.DeployRequest) (*defangv1.DeployResponse, error) PutConfig(context.Context, *defangv1.PutConfigRequest) error ServiceDNS(name string) string Subscribe(context.Context, *defangv1.SubscribeRequest) (ServerStream[defangv1.SubscribeResponse], error) Follow(context.Context, *defangv1.TailRequest) (ServerStream[defangv1.TailResponse], error) TearDown(context.Context) error WhoAmI(context.Context) (*defangv1.WhoAmIResponse, error) LoadProject(context.Context) (*composeTypes.Project, error) LoadProjectName(context.Context) (string, error) SetProjectName(string) }
type ErrNotImplemented ¶
type ErrNotImplemented string
func (ErrNotImplemented) Error ¶
func (n ErrNotImplemented) Error() string
type FabricClient ¶
type FabricClient interface { AgreeToS(context.Context) error CheckLoginAndToS(context.Context) error Debug(context.Context, *defangv1.DebugRequest) (*defangv1.DebugResponse, error) DelegateSubdomainZone(context.Context, *defangv1.DelegateSubdomainZoneRequest) (*defangv1.DelegateSubdomainZoneResponse, error) DeleteSubdomainZone(context.Context) error GenerateFiles(context.Context, *defangv1.GenerateFilesRequest) (*defangv1.GenerateFilesResponse, error) GetDelegateSubdomainZone(context.Context) (*defangv1.DelegateSubdomainZoneResponse, error) GetVersions(context.Context) (*defangv1.Version, error) Publish(context.Context, *defangv1.PublishRequest) error RevokeToken(context.Context) error // Subscribe(context.Context, *v1.SubscribeRequest) (*v1.SubscribeResponse, error) Token(context.Context, *defangv1.TokenRequest) (*defangv1.TokenResponse, error) Track(string, ...Property) error VerifyDNSSetup(context.Context, *defangv1.VerifyDNSSetupRequest) error }
type GrpcClient ¶
type GrpcClient struct { TenantID types.TenantID Loader ProjectLoader // contains filtered or unexported fields }
func NewGrpcClient ¶
func NewGrpcClient(host, accessToken string, tenantID types.TenantID, loader ProjectLoader) GrpcClient
func (GrpcClient) CheckLoginAndToS ¶
func (g GrpcClient) CheckLoginAndToS(ctx context.Context) error
func (GrpcClient) Debug ¶
func (g GrpcClient) Debug(ctx context.Context, req *defangv1.DebugRequest) (*defangv1.DebugResponse, error)
func (GrpcClient) DelegateSubdomainZone ¶
func (g GrpcClient) DelegateSubdomainZone(ctx context.Context, req *defangv1.DelegateSubdomainZoneRequest) (*defangv1.DelegateSubdomainZoneResponse, error)
func (GrpcClient) DeleteSubdomainZone ¶
func (g GrpcClient) DeleteSubdomainZone(ctx context.Context) error
func (GrpcClient) GenerateFiles ¶
func (g GrpcClient) GenerateFiles(ctx context.Context, req *defangv1.GenerateFilesRequest) (*defangv1.GenerateFilesResponse, error)
func (GrpcClient) GetDelegateSubdomainZone ¶
func (g GrpcClient) GetDelegateSubdomainZone(ctx context.Context) (*defangv1.DelegateSubdomainZoneResponse, error)
func (GrpcClient) GetVersions ¶
func (GrpcClient) Publish ¶
func (g GrpcClient) Publish(ctx context.Context, req *defangv1.PublishRequest) error
func (GrpcClient) RevokeToken ¶
func (g GrpcClient) RevokeToken(ctx context.Context) error
func (GrpcClient) Token ¶
func (g GrpcClient) Token(ctx context.Context, req *defangv1.TokenRequest) (*defangv1.TokenResponse, error)
func (GrpcClient) VerifyDNSSetup ¶
func (g GrpcClient) VerifyDNSSetup(ctx context.Context, req *defangv1.VerifyDNSSetupRequest) error
func (GrpcClient) WhoAmI ¶
func (g GrpcClient) WhoAmI(ctx context.Context) (*defangv1.WhoAmIResponse, error)
type MockClient ¶
type MockClient struct { Client UploadUrl string Project *composeTypes.Project ServerStream ServerStream[defangv1.TailResponse] }
func (MockClient) CreateUploadURL ¶
func (m MockClient) CreateUploadURL(ctx context.Context, req *defangv1.UploadURLRequest) (*defangv1.UploadURLResponse, error)
func (MockClient) Follow ¶
func (m MockClient) Follow(ctx context.Context, req *defangv1.TailRequest) (ServerStream[defangv1.TailResponse], error)
func (MockClient) ListConfig ¶
func (MockClient) LoadProject ¶
func (m MockClient) LoadProject(ctx context.Context) (*composeTypes.Project, error)
func (MockClient) LoadProjectName ¶
func (m MockClient) LoadProjectName(ctx context.Context) (string, error)
func (MockClient) ServiceDNS ¶
func (m MockClient) ServiceDNS(service string) string
func (MockClient) SetProjectName ¶
func (m MockClient) SetProjectName(projectName string)
type MockServerStream ¶
type MockServerStream struct { Resps []*defangv1.TailResponse Errs []error }
func (*MockServerStream) Close ¶
func (m *MockServerStream) Close() error
func (*MockServerStream) Err ¶
func (m *MockServerStream) Err() error
func (*MockServerStream) Msg ¶
func (m *MockServerStream) Msg() *defangv1.TailResponse
func (*MockServerStream) Receive ¶
func (m *MockServerStream) Receive() bool
type PlaygroundClient ¶
type PlaygroundClient struct { GrpcClient // contains filtered or unexported fields }
func (*PlaygroundClient) BootstrapCommand ¶
func (*PlaygroundClient) BootstrapList ¶
func (g *PlaygroundClient) BootstrapList(context.Context) ([]string, error)
func (PlaygroundClient) CreateUploadURL ¶
func (g PlaygroundClient) CreateUploadURL(ctx context.Context, req *defangv1.UploadURLRequest) (*defangv1.UploadURLResponse, error)
func (PlaygroundClient) Delete ¶
func (g PlaygroundClient) Delete(ctx context.Context, req *defangv1.DeleteRequest) (*defangv1.DeleteResponse, error)
func (PlaygroundClient) DeleteConfig ¶
func (PlaygroundClient) Deploy ¶
func (g PlaygroundClient) Deploy(ctx context.Context, req *defangv1.DeployRequest) (*defangv1.DeployResponse, error)
func (*PlaygroundClient) Follow ¶
func (g *PlaygroundClient) Follow(ctx context.Context, req *defangv1.TailRequest) (ServerStream[defangv1.TailResponse], error)
func (PlaygroundClient) GetService ¶
func (g PlaygroundClient) GetService(ctx context.Context, req *defangv1.ServiceID) (*defangv1.ServiceInfo, error)
func (PlaygroundClient) GetServices ¶
func (g PlaygroundClient) GetServices(ctx context.Context) (*defangv1.ListServicesResponse, error)
func (PlaygroundClient) ListConfig ¶
func (PlaygroundClient) LoadProject ¶
func (g PlaygroundClient) LoadProject(ctx context.Context) (*composeTypes.Project, error)
func (PlaygroundClient) LoadProjectName ¶
func (g PlaygroundClient) LoadProjectName(ctx context.Context) (string, error)
func (PlaygroundClient) Preview ¶
func (g PlaygroundClient) Preview(ctx context.Context, req *defangv1.DeployRequest) (*defangv1.DeployResponse, error)
func (PlaygroundClient) PutConfig ¶
func (g PlaygroundClient) PutConfig(ctx context.Context, req *defangv1.PutConfigRequest) error
func (PlaygroundClient) ServiceDNS ¶
func (g PlaygroundClient) ServiceDNS(name string) string
func (*PlaygroundClient) SetProjectName ¶
func (g *PlaygroundClient) SetProjectName(projectName string)
func (*PlaygroundClient) Subscribe ¶
func (g *PlaygroundClient) Subscribe(ctx context.Context, req *defangv1.SubscribeRequest) (ServerStream[defangv1.SubscribeResponse], error)
type ProjectLoader ¶
type Retrier ¶
type Retrier struct{}
func (Retrier) WrapStreamingClient ¶
func (Retrier) WrapStreamingClient(next connect.StreamingClientFunc) connect.StreamingClientFunc
func (Retrier) WrapStreamingHandler ¶
func (Retrier) WrapStreamingHandler(next connect.StreamingHandlerFunc) connect.StreamingHandlerFunc
type ServerStream ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.