Documentation ¶
Index ¶
- Variables
- type AccessType
- type Account
- type BrowserCommand
- type Command
- type CommandBrowserCreateFolder
- type CommandBrowserCreateFolderInput
- type CommandBrowserCreateFolderOutput
- type CommandBrowserDelete
- type CommandBrowserDeleteInput
- type CommandBrowserDownloadLink
- type CommandBrowserDownloadLinkInput
- type CommandBrowserDownloadLinkOutput
- type CommandBrowserList
- type CommandBrowserListInput
- type CommandBrowserListOutput
- type CommandBrowserThumbnail
- type CommandBrowserThumbnailInput
- type CommandBrowserThumbnailOutput
- type CommandBrowserUploadFile
- type CommandBrowserUploadFileInput
- type CommandShareLinkCreate
- type CommandShareLinkCreateInput
- type CommandShareLinkCreateOutput
- type CommandShareLinkDelete
- type CommandShareLinkDeleteInput
- type CommandShareLinkList
- type CommandShareLinkListInput
- type CommandShareLinkListOutput
- type CommandShareLinkUpdate
- type CommandShareLinkUpdateInput
- type CommandShareLinkUpdateOutput
- type CommandStatus
- type CommandsSearchParameters
- type EnumAction
- type EnumCommandErrorCode
- type EnumShareLinkType
- type EnumStatus
- type RequestDummyAuthInput
- type RequestDummyAuthOutput
- type RequestDummyCreateInput
- type RequestDummyGetChallengeOutput
- type RequestGetInfoOutput
- type RequestGetUsersOutput
- type RequestListOutput
- type ShareLink
- type ShareLinkCommand
- type StorageItem
Constants ¶
This section is empty.
Variables ¶
View Source
var RequestDummyAuthUrl = "auths/dummy.auth"
View Source
var RequestDummyCreateUrl = "auths/dummy.create"
View Source
var RequestDummyGetChallengeUrl = "auths/dummy.get_challenge"
View Source
var RequestGetInfoUrl = "config/get_info"
View Source
var RequestGetUsersUrl = "config/get_users"
View Source
var RequestListUrl = "auths/list"
View Source
var RequestLogoutUrl = "auths/logout"
Functions ¶
This section is empty.
Types ¶
type AccessType ¶
type AccessType int
const ( NONE AccessType = 0 READ AccessType = 1 READ_WRITE AccessType = 2 )
type BrowserCommand ¶
type BrowserCommand struct { List *CommandBrowserList `json:"list,omitempty" bson:"list,omitempty"` CreateFolder *CommandBrowserCreateFolder `json:"create_folder,omitempty" bson:"create_folder,omitempty"` Delete *CommandBrowserDelete `json:"delete,omitempty" bson:"delete,omitempty"` DownloadLink *CommandBrowserDownloadLink `json:"download_link,omitempty" bson:"download_link,omitempty"` UploadFile *CommandBrowserUploadFile `json:"upload_file,omitempty" bson:"upload_file,omitempty"` Thumbnail *CommandBrowserThumbnail `json:"thumbnail,omitempty" bson:"thumbnail,omitempty"` }
type Command ¶
type Command struct { Name EnumAction `json:"name"` CommandId string `json:"command_id"` Timeout int64 `json:"timeout,omitempty"` AuthKey *string `json:"auth_key,omitempty"` //Used when calling commands on behalf of a sharedlink Password *string `json:"password"` //Used when a share_link requires a password This should be the hash of AuthKey + Password State CommandStatus `json:"state"` Browser *BrowserCommand `json:"browser,omitempty"` }
type CommandBrowserCreateFolder ¶
type CommandBrowserCreateFolder struct { Input CommandBrowserCreateFolderInput `json:"input" bson:"input"` Output CommandBrowserCreateFolderOutput `json:"output" bson:"output"` }
type CommandBrowserCreateFolderInput ¶
type CommandBrowserCreateFolderInput struct {
Path string `json:"path"`
}
type CommandBrowserCreateFolderOutput ¶
type CommandBrowserCreateFolderOutput struct {
Result StorageItem `json:"result"`
}
type CommandBrowserDelete ¶
type CommandBrowserDelete struct {
Input CommandBrowserDeleteInput `json:"input" bson:"input"`
}
type CommandBrowserDeleteInput ¶
type CommandBrowserDeleteInput struct {
Path string `json:"path"`
}
type CommandBrowserDownloadLink ¶
type CommandBrowserDownloadLink struct { Input CommandBrowserDownloadLinkInput `json:"input" bson:"input"` Output CommandBrowserDownloadLinkOutput `json:"output" bson:"output"` }
type CommandBrowserDownloadLinkInput ¶
type CommandBrowserDownloadLinkInput struct {
Path string `json:"path"`
}
type CommandBrowserDownloadLinkOutput ¶
type CommandBrowserDownloadLinkOutput struct {
DownloadLink string `json:"download_link"`
}
type CommandBrowserList ¶
type CommandBrowserList struct { Input CommandBrowserListInput `json:"input" bson:"input"` Output CommandBrowserListOutput `json:"output" bson:"output"` }
type CommandBrowserListInput ¶
type CommandBrowserListOutput ¶
type CommandBrowserListOutput struct { CurrentItem StorageItem `json:"current_item"` Children []StorageItem `json:"children"` }
type CommandBrowserThumbnail ¶
type CommandBrowserThumbnail struct { Input CommandBrowserThumbnailInput `json:"input" bson:"input"` Output CommandBrowserThumbnailOutput `json:"output" bson:"output"` }
type CommandBrowserThumbnailOutput ¶
type CommandBrowserThumbnailOutput struct {
Content string `json:"content"` // base64 of the image
}
type CommandBrowserUploadFile ¶
type CommandBrowserUploadFile struct {
Input CommandBrowserUploadFileInput `json:"input" bson:"input"`
}
type CommandShareLinkCreate ¶
type CommandShareLinkCreate struct {}
type CommandShareLinkCreateInput ¶
type CommandShareLinkCreateInput struct {
}type CommandShareLinkCreateOutput ¶
type CommandShareLinkCreateOutput struct {
}type CommandShareLinkDelete ¶
type CommandShareLinkDelete struct {
}type CommandShareLinkDeleteInput ¶
type CommandShareLinkDeleteInput struct {
}type CommandShareLinkList ¶
type CommandShareLinkList struct {}
type CommandShareLinkListInput ¶
type CommandShareLinkListInput struct {
}type CommandShareLinkListOutput ¶
type CommandShareLinkListOutput struct {
}type CommandShareLinkUpdate ¶
type CommandShareLinkUpdate struct {}
type CommandShareLinkUpdateInput ¶
type CommandShareLinkUpdateInput struct {
}type CommandShareLinkUpdateOutput ¶
type CommandShareLinkUpdateOutput struct {
}type CommandStatus ¶
type CommandStatus struct { Status EnumStatus `json:"status"` Progress int `json:"progress"` ErrorCode EnumCommandErrorCode `json:"error_code"` }
type CommandsSearchParameters ¶
type CommandsSearchParameters struct {
Status *EnumStatus `json:"status,omitempty"`
}
type EnumAction ¶
type EnumAction string
const ( EnumBrowserList EnumAction = "browser.list" EnumBrowserCreateFolder EnumAction = "browser.create_folder" EnumBrowserDelete EnumAction = "browser.delete" EnumBrowserDownloadLink EnumAction = "browser.download_link" EnumBrowserUploadFile EnumAction = "browser.upload_file" EnumBrowserThumbnail EnumAction = "browser.thumbnail" )
type EnumCommandErrorCode ¶
type EnumCommandErrorCode int
const ( ERROR_NO_ERROR EnumCommandErrorCode = 0 ERROR_MISSING_COMMAND_BODY EnumCommandErrorCode = 1 ERROR_MISSING_PARAMETERS EnumCommandErrorCode = 2 ERROR_INVALID_PARAMETERS EnumCommandErrorCode = 3 ERROR_NOT_ALLOWED EnumCommandErrorCode = 4 ERROR_INVALID_PATH EnumCommandErrorCode = 5 ERROR_FILE_SYSTEM EnumCommandErrorCode = 6 ERROR_SAVING EnumCommandErrorCode = 7 ERROR_UNKNOWN EnumCommandErrorCode = 8 )
type EnumShareLinkType ¶
type EnumShareLinkType int
const ( EnumRestricted EnumShareLinkType = 1 EnumAuthenticated EnumShareLinkType = 2 )
type EnumStatus ¶
type EnumStatus int
const ( COMMAND_STATUS_DONE EnumStatus = 0 COMMAND_STATUS_QUEUED EnumStatus = 1 COMMAND_STATUS_IN_PROGRESS EnumStatus = 2 COMMAND_STATUS_ERROR EnumStatus = 3 COMMAND_STATUS_CANCELLED EnumStatus = 4 )
type RequestDummyAuthInput ¶
type RequestDummyAuthOutput ¶
type RequestDummyCreateInput ¶
type RequestGetInfoOutput ¶
type RequestGetInfoOutput struct { PasswordProtected bool `json:"password_protected"` NbDownloads *int `json:"nb_downloads,omitempty"` // Number of downloads left for this particular sharing Access AccessType `json:"access"` // Kind of access user has on this repository Type EnumShareLinkType `json:"type"` // AcessType: authenfied, resticted, password... }
type RequestGetUsersOutput ¶
type RequestGetUsersOutput struct {
Users []Account `json:"users"`
}
type RequestListOutput ¶
type RequestListOutput struct {
Auths []string `json:"auths"`
}
type ShareLinkCommand ¶
type ShareLinkCommand struct {}
type StorageItem ¶
type StorageItem struct { Name string `json:"name"` IsDir bool `json:"isDir"` MDate int64 `json:"mDate"` Size int64 `json:"size"` Kind string `json:"kind"` // this is the extension of the file. value will be folder for a folder Mimetype string `json:"mimetype"` // this is the mimetype of the file Access AccessType `json:"access"` }
Click to show internal directories.
Click to hide internal directories.