Documentation
¶
Index ¶
- type Client
- func (c *Client) CryptoGetRoot(ctx context.Context, auth string) (*CryptoGetRootResponse, error)
- func (c *Client) CryptoGetUserKeys(ctx context.Context, auth string) (*CryptoGetUserKeysResponse, error)
- func (c *Client) GetDigest(ctx context.Context) (*GetDigestResponse, error)
- func (c *Client) GetFileLink(ctx context.Context, auth string, fileID int) (*GetFileLinkResponse, error)
- func (c *Client) ListFolder(ctx context.Context, auth string, folderID int) (*ListFolderResponse, error)
- func (c *Client) UploadCreate(ctx context.Context, auth string) (*UploadCreateResponse, error)
- func (c *Client) UploadSave(ctx context.Context, auth string, req *UploadSaveRequest) (*UploadSaveResponse, error)
- func (c *Client) UploadWrite(ctx context.Context, auth string, req *UploadWriteRequest) error
- func (c *Client) UserInfo(ctx context.Context, req *UserInfoRequest) (*UserInfoResponse, error)
- type CryptoGetRootResponse
- type CryptoGetUserKeysResponse
- type GetDigestResponse
- type GetFileLinkResponse
- type ListFolderResponse
- type Metadata
- type RootMetadata
- type UploadCreateResponse
- type UploadSaveRequest
- type UploadSaveResponse
- type UploadWriteRequest
- type UserInfoRequest
- type UserInfoResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) CryptoGetRoot ¶
func (*Client) CryptoGetUserKeys ¶
func (*Client) GetDigest ¶
func (c *Client) GetDigest(ctx context.Context) (*GetDigestResponse, error)
func (*Client) GetFileLink ¶
func (*Client) ListFolder ¶
func (*Client) UploadCreate ¶
func (*Client) UploadSave ¶
func (c *Client) UploadSave(ctx context.Context, auth string, req *UploadSaveRequest) (*UploadSaveResponse, error)
func (*Client) UploadWrite ¶
func (*Client) UserInfo ¶
func (c *Client) UserInfo(ctx context.Context, req *UserInfoRequest) (*UserInfoResponse, error)
type CryptoGetRootResponse ¶
type CryptoGetRootResponse struct {
Metadata *RootMetadata `json:"metadata"`
}
type GetDigestResponse ¶
type GetFileLinkResponse ¶
type ListFolderResponse ¶
type Metadata ¶
type Metadata struct {
Name string `json:"name"`
Created string `json:"created"`
IsMine bool `json:"ismine"`
Thumb bool `json:"thumb"`
Modified string `json:"modified"`
Comments int `json:"comments"`
Encrypted bool `json:"encrypted"`
ID string `json:"id"`
Icon string `json:"icon"`
ParentFolderID int `json:"parentfolderid"`
FolderID int `json:"folderid"`
Contents []*Metadata `json:"contents"`
IsFolder bool `json:"isfolder"`
FileID int `json:"fileid"`
Category int `json:"category"`
Size int `json:"size"`
ContentType string `json:"contenttype"`
Hash json.RawMessage `json:"hash"`
}
type RootMetadata ¶
type RootMetadata struct {
Name string `json:"name"`
Created string `json:"created"`
IsMine bool `json:"ismine"`
Thumb bool `json:"thumb"`
Modified string `json:"modified"`
Comments int `json:"comments"`
Encrypted bool `json:"encrypted"`
ID string `json:"id"`
Icon string `json:"icon"`
IsFolder bool `json:"isfolder"`
ParentFolderID int `json:"parentfolderid"`
FolderID int `json:"folderid"`
}
type UploadCreateResponse ¶
type UploadCreateResponse struct {
UploadID int `json:"uploadid"`
}
type UploadSaveRequest ¶
type UploadSaveResponse ¶
type UploadSaveResponse struct {
Metadata Metadata `json:"metadata"`
}
type UploadWriteRequest ¶
type UserInfoRequest ¶
type UserInfoResponse ¶
type UserInfoResponse struct {
Auth string `json:"auth"`
Email string `json:"email"` // address of the user
EmailVerified bool `json:"emailverified"` // true if the user had verified it's email
Premium bool `json:"premium"` // true if the user is premium
PremiumExpires string `json:"premiumexpires"` // date when the premium expires
Quota int `json:"quota"` // quota in bytes
UsedQuota int `json:"usedquota"` // used quota in bytes
Language string `json:"language"` // 2-3 characters lowercase languageid
}
Click to show internal directories.
Click to hide internal directories.