Versions in this module Expand all Collapse all v0 v0.8.4 Feb 5, 2024 Changes in this version + var DefaultAPILocation = C.GoString((*C.char)(unsafe.Pointer(&C.LB_DEFAULT_API_LOCATION[0]))) + func FileTypeString(t FileType) string + func SortFiles(files []File) + type Account struct + APIURL string + Username string + type AppStoreAccountState int + const AppStoreExpired + const AppStoreFailedToRenew + const AppStoreGracePeriod + const AppStoreNone + const AppStoreOk + func (s AppStoreAccountState) String() string + type Core interface + CalculateWork func() (WorkCalculated, error) + CancelSubscription func() error + CreateAccount func(uname, apiURL string, welcome bool) (Account, error) + CreateFile func(name string, parentID FileID, typ FileType) (File, error) + CreateFileAtPath func(lbPath string) (File, error) + DeleteFile func(id FileID) error + DeletePendingShare func(id FileID) error + ExportAccount func() (string, error) + ExportDrawing func(id FileID, imgFmt ImageFormat) ([]byte, error) + ExportDrawingToDisk func(id FileID, imgFmt ImageFormat, dest string) error + ExportFile func(id FileID, dest string, fn func(ExportFileInfo)) error + FileByID func(id FileID) (File, error) + FileByPath func(lbPath string) (File, error) + GetAccount func() (Account, error) + GetAndGetChildrenRecursively func(id FileID) ([]File, error) + GetChildren func(id FileID) ([]File, error) + GetLastSynced func() (time.Time, error) + GetLastSyncedHumanString func() (string, error) + GetPendingShares func() ([]File, error) + GetRoot func() (File, error) + GetSubscriptionInfo func() (SubscriptionInfo, error) + GetUncompressedUsage func() (UsageItemMetric, error) + GetUsage func() (UsageMetrics, error) + ImportAccount func(acctStr string) (Account, error) + ImportFile func(src string, dest FileID, fn func(ImportFileInfo)) error + ListMetadatas func() ([]File, error) + MoveFile func(srcID, destID FileID) error + PathByID func(id FileID) (string, error) + ReadDocument func(id FileID) ([]byte, error) + RenameFile func(id FileID, newName string) error + ShareFile func(id FileID, uname string, mode ShareMode) error + SyncAll func(fn func(SyncProgress)) error + UpgradeViaStripe func(card *CreditCard) error + Validate func() ([]string, error) + WriteDocument func(id FileID, data []byte) error + WriteablePath func() string + func NewCore(fpath string) (Core, error) + type CreditCard struct + CVC string + ExpiryMonth int + ExpiryYear int + Number string + type Error struct + Code ErrorCode + Msg string + Trace string + func (e *Error) Error() string + type ErrorCode uint32 + const CodeAccountExists + const CodeAccountNonexistent + const CodeAccountStringCorrupted + const CodeAlreadyCanceled + const CodeAlreadyPremium + const CodeAppStoreAccountAlreadyLinked + const CodeCannotCancelSubscriptionForAppStore + const CodeCardDecline + const CodeCardExpired + const CodeCardInsufficientFunds + const CodeCardInvalidCvc + const CodeCardInvalidExpMonth + const CodeCardInvalidExpYear + const CodeCardInvalidNumber + const CodeCardNotSupported + const CodeClientUpdateRequired + const CodeCurrentUsageIsMoreThanNewTier + const CodeDiskPathInvalid + const CodeDiskPathTaken + const CodeDrawingInvalid + const CodeExistingRequestPending + const CodeFileNameContainsSlash + const CodeFileNameEmpty + const CodeFileNonexistent + const CodeFileNotDocument + const CodeFileNotFolder + const CodeFileParentNonexistent + const CodeFolderMovedIntoSelf + const CodeInsufficientPermission + const CodeInvalidAuthDetails + const CodeInvalidPurchaseToken + const CodeLinkInSharedFolder + const CodeLinkTargetIsOwned + const CodeLinkTargetNonexistent + const CodeMultipleLinksToSameFile + const CodeNotPremium + const CodeOldCardDoesNotExist + const CodePathContainsEmptyFileName + const CodePathTaken + const CodeRootModificationInvalid + const CodeRootNonexistent + const CodeServerDisabled + const CodeServerUnreachable + const CodeShareAlreadyExists + const CodeShareNonexistent + const CodeSuccess + const CodeTryAgain + const CodeUnexpected + const CodeUsageIsOverFreeTierDataCap + const CodeUsernameInvalid + const CodeUsernameNotFound + const CodeUsernamePublicKeyMismatch + const CodeUsernameTaken + type ExportFileInfo struct + DiskPath string + LbPath string + type File struct + ID FileID + Lastmod time.Time + LastmodBy string + Name string + Parent FileID + Shares []Share + Type FileType + func MaybeFileByPath(core Core, p string) (File, bool, error) + func (f *File) IsDir() bool + func (f *File) IsRoot() bool + type FileID = uuid.UUID + type FileType interface + type FileTypeDocument struct + type FileTypeFolder struct + type FileTypeLink struct + Target FileID + type FileUsage struct + FileID FileID + SizeBytes uint64 + type GooglePlayAccountState int + const GooglePlayCanceled + const GooglePlayGracePeriod + const GooglePlayNone + const GooglePlayOk + const GooglePlayOnHold + func (s GooglePlayAccountState) String() string + type ImageFormat int + const ImgFmtBMP + const ImgFmtFarbfeld + const ImgFmtJPEG + const ImgFmtPNG + const ImgFmtPNM + const ImgFmtTGA + type ImportFileInfo struct + DiskPath string + FileDone *File + Total int + type Share struct + Mode ShareMode + SharedBy string + SharedWith string + type ShareMode int + const ShareModeRead + const ShareModeWrite + func (s ShareMode) String() string + type StripeInfo struct + Last4 string + type SubscriptionInfo struct + AppStore AppStoreAccountState + GooglePlay GooglePlayAccountState + PeriodEnd time.Time + StripeLast4 string + type SyncProgress struct + Msg string + Progress uint64 + Total uint64 + type UsageItemMetric struct + Exact uint64 + Readable string + type UsageMetrics struct + DataCap UsageItemMetric + ServerUsage UsageItemMetric + Usages []FileUsage + type WorkCalculated struct + LastServerUpdateAt uint64 + WorkUnits []WorkUnit + type WorkUnit struct + ID FileID + Type WorkUnitType + type WorkUnitType int + const WorkUnitTypeLocal + const WorkUnitTypeServer