Documentation ¶
Index ¶
- Constants
- Variables
- type CopyOptions
- type DeleteOptions
- type Device
- type DeviceCreate
- type DeviceProvider
- type DeviceUpdate
- type FileCopy
- type FileInfo
- type FileMove
- type FileSpan
- type FileTree
- type FileUpload
- type FolderCreate
- type KoofrClient
- func (c *KoofrClient) Authenticate(email string, password string) (err error)
- func (c *KoofrClient) Devices() (devices []Device, err error)
- func (c *KoofrClient) DevicesCreate(name string, provider DeviceProvider) (device Device, err error)
- func (c *KoofrClient) DevicesDelete(deviceId string) (err error)
- func (c *KoofrClient) DevicesDetails(deviceId string) (device Device, err error)
- func (c *KoofrClient) DevicesUpdate(deviceId string, deviceUpdate DeviceUpdate) (err error)
- func (c *KoofrClient) FilesCopy(mountId string, path string, toMountId string, toPath string, ...) (err error)
- func (c *KoofrClient) FilesDelete(mountId string, path string) (err error)
- func (c *KoofrClient) FilesDeleteWithOptions(mountId string, path string, deleteOptions *DeleteOptions) (err error)
- func (c *KoofrClient) FilesGet(mountId string, path string) (reader io.ReadCloser, err error)
- func (c *KoofrClient) FilesGetRange(mountId string, path string, span *FileSpan) (reader io.ReadCloser, err error)
- func (c *KoofrClient) FilesInfo(mountId string, path string) (info FileInfo, err error)
- func (c *KoofrClient) FilesList(mountId string, basePath string) (files []FileInfo, err error)
- func (c *KoofrClient) FilesMove(mountId string, path string, toMountId string, toPath string) (err error)
- func (c *KoofrClient) FilesNewFolder(mountId string, path string, name string) (err error)
- func (c *KoofrClient) FilesPut(mountId string, path string, name string, reader io.Reader) (newName string, err error)
- func (c *KoofrClient) FilesPutWithOptions(mountId string, path string, name string, reader io.Reader, ...) (fileInfo *FileInfo, err error)
- func (c *KoofrClient) FilesTree(mountId string, path string) (tree FileTree, err error)
- func (c *KoofrClient) GetToken() string
- func (c *KoofrClient) GetUserID() string
- func (c *KoofrClient) Mounts() (mounts []Mount, err error)
- func (c *KoofrClient) MountsDetails(mountId string) (mount Mount, err error)
- func (c *KoofrClient) SetToken(token string)
- func (c *KoofrClient) SetUserAgent(ua string)
- func (c *KoofrClient) SetUserID(userID string)
- func (c *KoofrClient) Shared() (shared []Shared, err error)
- func (c *KoofrClient) UserInfo() (user User, err error)
- type Link
- type Mount
- type MountGroup
- type MountPermissions
- type MountType
- type MountUser
- type PutOptions
- type Receiver
- type Shared
- type Token
- type TokenRequest
- type User
Constants ¶
View Source
const ( MountDeviceType = "device" MountExportType = "export" MountImportType = "import" )
View Source
const ( StorageHubProvider = "storagehub" StorageBlobProvider = "storageblob" )
Variables ¶
View Source
var ErrCannotOverwrite = fmt.Errorf("Can not overwrite (filter constraint fails)")
View Source
var ErrCannotRemove = fmt.Errorf("Can not remove (filter constraint fails)")
Functions ¶
This section is empty.
Types ¶
type CopyOptions ¶
type CopyOptions struct {
SetModified *int64
}
type DeleteOptions ¶
type Device ¶
type Device struct { Id string `json:"id"` ApiKey string `json:"apiKey"` Name string `json:"name"` Status string `json:"status"` SpaceTotal int64 `json:"spaceTotal"` SpaceUsed int64 `json:"spaceUsed"` SpaceFree int64 `json:"spaceFree"` Version int `json:"version"` Provider struct { Name string `json:"name"` Data interface{} `json:"data"` } `json:"provider"` ReadOnly bool `json:"readonly"` RootMountId string `json:"rootMountId"` }
type DeviceCreate ¶
type DeviceCreate struct { Name string `json:"name"` ProviderName DeviceProvider `json:"providerName"` }
type DeviceProvider ¶
type DeviceProvider string
type DeviceUpdate ¶
type DeviceUpdate struct {
Name string `json:"name"`
}
type FileUpload ¶
type FileUpload struct {
Name string `json:"name"`
}
type FolderCreate ¶
type FolderCreate struct {
Name string `json:"name"`
}
type KoofrClient ¶
type KoofrClient struct { *httpclient.HTTPClient // contains filtered or unexported fields }
func NewKoofrClient ¶
func NewKoofrClient(baseUrl string, disableSecurity bool) *KoofrClient
func NewKoofrClientWithHTTPClient ¶
func NewKoofrClientWithHTTPClient(baseUrl string, httpClient *httpclient.HTTPClient) *KoofrClient
func (*KoofrClient) Authenticate ¶
func (c *KoofrClient) Authenticate(email string, password string) (err error)
func (*KoofrClient) Devices ¶
func (c *KoofrClient) Devices() (devices []Device, err error)
func (*KoofrClient) DevicesCreate ¶
func (c *KoofrClient) DevicesCreate(name string, provider DeviceProvider) (device Device, err error)
func (*KoofrClient) DevicesDelete ¶
func (c *KoofrClient) DevicesDelete(deviceId string) (err error)
func (*KoofrClient) DevicesDetails ¶
func (c *KoofrClient) DevicesDetails(deviceId string) (device Device, err error)
func (*KoofrClient) DevicesUpdate ¶
func (c *KoofrClient) DevicesUpdate(deviceId string, deviceUpdate DeviceUpdate) (err error)
func (*KoofrClient) FilesCopy ¶
func (c *KoofrClient) FilesCopy(mountId string, path string, toMountId string, toPath string, options CopyOptions) (err error)
func (*KoofrClient) FilesDelete ¶
func (c *KoofrClient) FilesDelete(mountId string, path string) (err error)
func (*KoofrClient) FilesDeleteWithOptions ¶
func (c *KoofrClient) FilesDeleteWithOptions(mountId string, path string, deleteOptions *DeleteOptions) (err error)
func (*KoofrClient) FilesGet ¶
func (c *KoofrClient) FilesGet(mountId string, path string) (reader io.ReadCloser, err error)
func (*KoofrClient) FilesGetRange ¶
func (c *KoofrClient) FilesGetRange(mountId string, path string, span *FileSpan) (reader io.ReadCloser, err error)
func (*KoofrClient) FilesInfo ¶
func (c *KoofrClient) FilesInfo(mountId string, path string) (info FileInfo, err error)
func (*KoofrClient) FilesList ¶
func (c *KoofrClient) FilesList(mountId string, basePath string) (files []FileInfo, err error)
func (*KoofrClient) FilesNewFolder ¶
func (c *KoofrClient) FilesNewFolder(mountId string, path string, name string) (err error)
func (*KoofrClient) FilesPutWithOptions ¶
func (c *KoofrClient) FilesPutWithOptions(mountId string, path string, name string, reader io.Reader, putOptions *PutOptions) (fileInfo *FileInfo, err error)
func (*KoofrClient) FilesTree ¶
func (c *KoofrClient) FilesTree(mountId string, path string) (tree FileTree, err error)
func (*KoofrClient) GetToken ¶
func (c *KoofrClient) GetToken() string
func (*KoofrClient) GetUserID ¶
func (c *KoofrClient) GetUserID() string
func (*KoofrClient) Mounts ¶
func (c *KoofrClient) Mounts() (mounts []Mount, err error)
func (*KoofrClient) MountsDetails ¶
func (c *KoofrClient) MountsDetails(mountId string) (mount Mount, err error)
func (*KoofrClient) SetToken ¶
func (c *KoofrClient) SetToken(token string)
func (*KoofrClient) SetUserAgent ¶
func (c *KoofrClient) SetUserAgent(ua string)
func (*KoofrClient) SetUserID ¶
func (c *KoofrClient) SetUserID(userID string)
func (*KoofrClient) Shared ¶
func (c *KoofrClient) Shared() (shared []Shared, err error)
func (*KoofrClient) UserInfo ¶
func (c *KoofrClient) UserInfo() (user User, err error)
type Link ¶
type Link struct { Id string `json:id` Name string `json:name` Path string `json:path` Counter int64 `json:counter` Url string `json:url` ShortUrl string `json:shortUrl` Hash string `json:hash` Host string `json:host` HasPassword bool `json:hasPassword` Password string `json:password` ValidFrom int64 `json:validFrom` ValidTo int64 `json:validTo` PasswordRequired bool `json:passwordRequired` }
type Mount ¶
type Mount struct { Id string `json:"id"` Name string `json:"name"` Type MountType `json:"type"` Origin string `json:"origin"` SpaceTotal int64 `json:"spaceTotal"` SpaceUsed int64 `json:"spaceUsed"` Online bool `json:"online"` Owner MountUser `json:"owner"` Users []MountUser `json:"users"` Groups []MountGroup `json:"groups"` Version int `json:"version"` Permissions MountPermissions `json:"permissions"` IsPrimary bool `json:"isPrimary"` }
type MountGroup ¶
type MountGroup struct { Id string `json:"id"` Name string `json:"name"` Permissions MountPermissions `json:"permissions"` }
type MountPermissions ¶
type MountUser ¶
type MountUser struct { Id string `json:"id"` Name string `json:"name"` Email string `json:"email"` Permissions MountPermissions `json:"permissions"` }
type PutOptions ¶
type Receiver ¶
type Receiver struct { Id string `json:id` Name string `json:name` Path string `json:path` Counter int64 `json:counter` Url string `json:url` ShortUrl string `json:shortUrl` Hash string `json:hash` Host string `json:host` HasPassword bool `json:hasPassword` Password string `json:password` ValidFrom int64 `json:validFrom` ValidTo int64 `json:validTo` Alert bool `json:alert` }
type TokenRequest ¶
Click to show internal directories.
Click to hide internal directories.