Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExportSite ¶
func ExportSite(site *storage.Site, src ExportBackend, tempDir string, clusters []storage.TrustedCluster) (io.ReadCloser, error)
ExportSite transfers site state from specified site into a temporary file and returns a reader to it. tempDir defines the temporary working directory and should not be deleted by caller until returned ReadCloser is closed
Types ¶
type ExportBackend ¶
type ExportBackend interface { GetAccount(accountID string) (*storage.Account, error) GetSiteUsers(domain string) ([]storage.User, error) GetPackage(repository, packageName, packageVersion string) (*storage.Package, error) GetAPIKeys(email string) ([]storage.APIKey, error) GetUserRoles(email string) ([]teleservices.Role, error) GetSiteOperations(domain string) ([]storage.SiteOperation, error) GetTrustedClusters() ([]teleservices.TrustedCluster, error) GetSiteProvisioningTokens(domain string) ([]storage.ProvisioningToken, error) GetLastProgressEntry(domain, operationID string) (*storage.ProgressEntry, error) GetOperationPlan(domain, operationID string) (*storage.OperationPlan, error) }
ExportBackend exposes a subset of storage.Backend to perform site export.
This interface defines a facade to provide alternate implementations of (some of) the Backend methods used in export.
Click to show internal directories.
Click to hide internal directories.