Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GokapiClient ¶
type GokapiClient struct {
// contains filtered or unexported fields
}
func New ¶
func New(host string, token string) *GokapiClient
func (*GokapiClient) GetDownloadUrl ¶
func (c *GokapiClient) GetDownloadUrl(f GokapiFile) string
func (*GokapiClient) ListFiles ¶
func (c *GokapiClient) ListFiles() ([]GokapiFile, error)
func (*GokapiClient) UploadBytes ¶
func (c *GokapiClient) UploadBytes(data []byte, opts *UploadOptions) (GokapiFile, error)
func (*GokapiClient) UploadFile ¶
func (c *GokapiClient) UploadFile(filePath string, opts *UploadOptions) (GokapiFile, error)
type GokapiFile ¶
type GokapiFile struct {
ID string `json:"Id"`
Name string `json:"Name"`
Size string `json:"Size"`
HotlinkId string `json:"HotlinkId"`
ContentType string `json:"ContentType"`
ExpireAt int64 `json:"ExpireAt"`
SizeBytes int64 `json:"SizeBytes"`
ExpireAtString string `json:"ExpireAtString"`
DownloadsRemaining int `json:"DownloadsRemaining"`
DownloadCount int `json:"DownloadCount"`
UnlimitedDownloads bool `json:"UnlimitedDownloads"`
UnlimitedTime bool `json:"UnlimitedTime"`
RequiresClientSideDecryption bool `json:"RequiresClientSideDecryption"`
IsEncrypted bool `json:"IsEncrypted"`
IsPasswordProtected bool `json:"IsPasswordProtected"`
IsSavedOnLocalStorage bool `json:"IsSavedOnLocalStorage"`
}
Click to show internal directories.
Click to hide internal directories.