Documentation
¶
Index ¶
- Variables
- func FileTypeString(t FileType) string
- func SortFiles(files []File)
- type Account
- type AppStoreAccountState
- type Core
- type CreditCard
- type Error
- type ErrorCode
- type ExportFileInfo
- type File
- type FileID
- type FileType
- type FileTypeDocument
- type FileTypeFolder
- type FileTypeLink
- type FileUsage
- type GooglePlayAccountState
- type ImageFormat
- type ImportFileInfo
- type Share
- type ShareMode
- type StripeInfo
- type SubscriptionInfo
- type SyncProgress
- type UsageItemMetric
- type UsageMetrics
- type WorkCalculated
- type WorkUnit
- type WorkUnitType
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultAPILocation = C.GoString((*C.char)(unsafe.Pointer(&C.LB_DEFAULT_API_LOCATION[0])))
Functions ¶
func FileTypeString ¶
Types ¶
type AppStoreAccountState ¶
type AppStoreAccountState int
const ( AppStoreNone AppStoreAccountState = iota AppStoreOk AppStoreGracePeriod AppStoreFailedToRenew AppStoreExpired )
func (AppStoreAccountState) String ¶
func (s AppStoreAccountState) String() string
type Core ¶
type Core interface { WriteablePath() string GetAccount() (Account, error) CreateAccount(uname, apiURL string, welcome bool) (Account, error) ImportAccount(acctStr string) (Account, error) ExportAccount() (string, error) FileByID(id FileID) (File, error) FileByPath(lbPath string) (File, error) GetRoot() (File, error) GetChildren(id FileID) ([]File, error) GetAndGetChildrenRecursively(id FileID) ([]File, error) ListMetadatas() ([]File, error) PathByID(id FileID) (string, error) ReadDocument(id FileID) ([]byte, error) WriteDocument(id FileID, data []byte) error CreateFile(name string, parentID FileID, typ FileType) (File, error) CreateFileAtPath(lbPath string) (File, error) DeleteFile(id FileID) error RenameFile(id FileID, newName string) error MoveFile(srcID, destID FileID) error ImportFile(src string, dest FileID, fn func(ImportFileInfo)) error ExportFile(id FileID, dest string, fn func(ExportFileInfo)) error ExportDrawing(id FileID, imgFmt ImageFormat) ([]byte, error) ExportDrawingToDisk(id FileID, imgFmt ImageFormat, dest string) error GetLastSynced() (time.Time, error) GetLastSyncedHumanString() (string, error) GetUsage() (UsageMetrics, error) GetUncompressedUsage() (UsageItemMetric, error) CalculateWork() (WorkCalculated, error) SyncAll(fn func(SyncProgress)) error GetSubscriptionInfo() (SubscriptionInfo, error) UpgradeViaStripe(card *CreditCard) error CancelSubscription() error Validate() ([]string, error) }
type CreditCard ¶
type ErrorCode ¶
type ErrorCode uint32
const ( CodeSuccess ErrorCode = iota CodeUnexpected CodeAccountExists CodeAccountNonexistent CodeAccountStringCorrupted CodeAlreadyCanceled CodeAlreadyPremium CodeAppStoreAccountAlreadyLinked CodeCannotCancelSubscriptionForAppStore CodeCardDecline CodeCardExpired CodeCardInsufficientFunds CodeCardInvalidCvc CodeCardInvalidExpMonth CodeCardInvalidExpYear CodeCardInvalidNumber CodeCardNotSupported CodeClientUpdateRequired CodeCurrentUsageIsMoreThanNewTier CodeDiskPathInvalid CodeDiskPathTaken CodeDrawingInvalid CodeExistingRequestPending CodeFileNameContainsSlash CodeFileNameEmpty CodeFileNonexistent CodeFileNotDocument CodeFileNotFolder CodeFileParentNonexistent CodeFolderMovedIntoSelf CodeInsufficientPermission CodeInvalidPurchaseToken CodeInvalidAuthDetails CodeLinkTargetIsOwned CodeLinkTargetNonexistent CodeMultipleLinksToSameFile CodeNotPremium CodeOldCardDoesNotExist CodePathContainsEmptyFileName CodePathTaken CodeRootModificationInvalid CodeRootNonexistent CodeServerDisabled CodeServerUnreachable CodeTryAgain CodeUsageIsOverFreeTierDataCap CodeUsernameInvalid CodeUsernameNotFound CodeUsernamePublicKeyMismatch CodeUsernameTaken )
type ExportFileInfo ¶
type File ¶
type FileTypeDocument ¶
type FileTypeDocument struct{}
type FileTypeFolder ¶
type FileTypeFolder struct{}
type FileTypeLink ¶
type FileTypeLink struct{ Target FileID }
type GooglePlayAccountState ¶
type GooglePlayAccountState int
const ( GooglePlayNone GooglePlayAccountState = iota GooglePlayOk GooglePlayCanceled GooglePlayGracePeriod GooglePlayOnHold )
func (GooglePlayAccountState) String ¶
func (s GooglePlayAccountState) String() string
type ImageFormat ¶
type ImageFormat int
const ( ImgFmtPNG ImageFormat = iota ImgFmtJPEG ImgFmtPNM ImgFmtTGA ImgFmtFarbfeld ImgFmtBMP )
type ImportFileInfo ¶
ImportFileInfo is the data sent (via closure) at certain stages of file import. The stage and type of information is determined by the zero value of each field. A non-zero `Total` means a "total calculated" update. A non-empty `DiskPath` means a "file started" update. A non-nil `FileDone` means a "file finished" update.
type StripeInfo ¶
type StripeInfo struct {
Last4 string
}
type SubscriptionInfo ¶
type SubscriptionInfo struct { StripeLast4 string GooglePlay GooglePlayAccountState AppStore AppStoreAccountState PeriodEnd time.Time }
type SyncProgress ¶
SyncProgress is the data sent (via closure) at certain stages of sync.
type UsageItemMetric ¶
type UsageMetrics ¶
type UsageMetrics struct { Usages []FileUsage ServerUsage UsageItemMetric DataCap UsageItemMetric }
type WorkCalculated ¶
type WorkUnit ¶
type WorkUnit struct { Type WorkUnitType ID FileID }
type WorkUnitType ¶
type WorkUnitType int
const ( WorkUnitTypeLocal WorkUnitType = iota WorkUnitTypeServer )
Click to show internal directories.
Click to hide internal directories.