{"modulePath":"github.com/claude-code-launch/ccl","version":"v1.7.20","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package cloudsync\n\n## Variables\n\n```go\nvar ErrNoLocalData = errors.New(\"no ccl configuration or OAuth credentials found to sync\")\n```\n\n## Functions\n\n```go\nfunc GoogleDriveUnavailable() error\n```\nGoogleDriveUnavailable explains why this build cannot log in to Google Drive (a development build has no OAuth client), or is nil when it can.\n\n```go\nfunc HasActiveProfile() (bool, error)\n```\n\n```go\nfunc KeyModeDescription(mode string) string\n```\nKeyModeDescription describes how this device unlocks the active profile.\n\n```go\nfunc PrimaryRemoteAlias() (string, error)\n```\n\n```go\nfunc RenameRemote(alias, newAlias string) error\n```\n\n```go\nfunc SetPrimaryRemote(alias string) error\n```\n\n```go\nfunc SetRemoteMirror(alias string, enabled bool) error\n```\n\n```go\nfunc WithPastedRedirect(ctx context.Context, in io.Reader) context.Context\n```\nWithPastedRedirect makes Google Drive login in ctx print the authorization URL instead of opening a browser, and read the address the browser was redirected to from in. Hosts without a browser (SSH, Cloud Shell) need this: Google's device flow rejects the drive.appdata scope, and the 127.0.0.1 redirect only reaches ccl from a browser on the same machine.\n\n## Types\n\n```go\ntype Diagnostic struct {\n\tLevel   string\n\tMessage string\n}\n```\n\n```go\ntype DiagnosticReport struct {\n\tConfigured bool\n\tProfileID  string\n\tRemotes    int\n\tChecks     []Diagnostic\n}\n```\n\n```go\nfunc DiagnoseLocal() DiagnosticReport\n```\nDiagnoseLocal runs the local cloud-sync health checks in fixed order. Each diagnose\\* step appends to the report; steps may halt the pipeline by returning false when later checks would be meaningless.\n\n```go\ntype LoginResult struct {\n\tRemoteDir string\n\tDeviceID  string\n\tAlias     string\n\tProvider  string\n\tExisting  bool\n\tKeyMode   string\n}\n```\n\n```go\nfunc LoginGoogleDriveNamed(\n\tctx context.Context,\n\talias string,\n\tnotice interface{ Write([]byte) (int, error) },\n) (LoginResult, error)\n```\nLoginGoogleDriveNamed connects a Google account under a local alias. On a device without a profile it opens (or creates) the one stored in that account; otherwise it attaches the account to the active profile.\n\n```go\nfunc LoginICloudNamed(alias string) (LoginResult, error)\n```\n\n```go\ntype LogoutOptions struct {\n\tRevoke       bool\n\tDeleteRemote bool\n\tForceLocal   bool\n}\n```\n\n```go\ntype LogoutResult struct {\n\tAlias         string\n\tProvider      string\n\tNewPrimary    string\n\tRemoteDeleted bool\n\tTokenRevoked  bool\n\tLocalOnly     bool\n}\n```\n\n```go\nfunc LogoutRemote(ctx context.Context, alias string, options LogoutOptions) (LogoutResult, error)\n```\n\n```go\ntype Manager struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc Load() (*Manager, error)\n```\n\n```go\nfunc LoadRemote(alias string) (*Manager, error)\n```\nLoadRemote loads a cloud remote. An empty alias selects the primary remote.\n\n```go\nfunc (m *Manager) Pull(tagValue string, force bool) (PullResult, error)\n```\n\n```go\nfunc (m *Manager) Status() (Status, error)\n```\n\n```go\nfunc (m *Manager) Tag(value string) (TagResult, error)\n```\n\n```go\ntype PartialPushError struct {\n\tMessage string\n}\n```\n\n```go\nfunc (err *PartialPushError) Error() string\n```\n\n```go\nfunc (*PartialPushError) ExitCode() int\n```\n\n```go\ntype PullResult struct {\n\tTag        string\n\tHash       string\n\tID         string\n\tDownloaded bool\n\tBackupPath string\n}\n```\n\n```go\ntype PushResult struct {\n\tTag      string\n\tHash     string\n\tID       string\n\tUploaded bool\n}\n```\n\n```go\ntype RemoteInfo struct {\n\tID          string\n\tAlias       string\n\tProvider    string\n\tProfileID   string\n\tPrimary     bool\n\tMirror      bool\n\tEnabled     bool\n\tSignedIn    bool\n\tRemoteLabel string\n\tAccountHint string\n}\n```\n\n```go\nfunc ListRemotes() ([]RemoteInfo, error)\n```\nListRemotes returns the locally configured cloud remotes in stable order. It does not contact any provider.\n\n```go\ntype RemotePushOutcome struct {\n\tAlias  string\n\tResult PushResult\n\tErr    error\n}\n```\n\n```go\nfunc PushRemotes(to string, all, force, bestEffort bool) ([]RemotePushOutcome, error)\n```\nPushRemotes pushes one prepared encrypted snapshot to one or more remotes. All targets are preflighted before the first write unless bestEffort is set.\n\n```go\ntype Status struct {\n\tAlias          string\n\tPrimary        bool\n\tMirror         bool\n\tProvider       string\n\tKeyMode        string\n\tRemoteDir      string\n\tDeviceID       string\n\tLocalHash      string\n\tPendingTag     string\n\tRemoteTag      string\n\tRemoteID       string\n\tRemoteHash     string\n\tRemoteDeviceID string\n\tRemoteCreated  time.Time\n\tLastOperation  string\n\tLastSyncAt     time.Time\n\tState          string\n}\n```\n\n```go\ntype TagResult struct {\n\tTag  string\n\tHash string\n}\n```\n\n","path":"github.com/claude-code-launch/ccl/internal/cloudsync","name":"cloudsync","synopsis":"","isRedistributable":true}
