Documentation
¶
Index ¶
- Constants
- type Client
- func (c *Client) Delete(path string, isPath bool) error
- func (c *Client) Describe(path string) (Object, error)
- func (c *Client) Download(path string) ([]byte, error)
- func (c *Client) DownloadPartial(path string, rangeStart int64, rangeEnd int64) ([]byte, error)
- func (c *Client) List(path string) ([]Object, error)
- func (c *Client) Upload(path string, content []byte, generateChecksum bool) error
- func (c *Client) WithLogger(l resty.Logger) *Client
- type Object
Constants ¶
View Source
const ENDPOINT_FALKENSTEIN_DE = "storage.bunnycdn.com"
View Source
const ENDPOINT_JOHANNESBURG_SA = "jh.storage.bunnycdn.com"
View Source
const ENDPOINT_LONDON_UK = "uk.storage.bunnycdn.com"
View Source
const ENDPOINT_LOS_ANGELES_US = "la.storage.bunnycdn.com"
View Source
const ENDPOINT_NEW_YORK_US = "ny.storage.bunnycdn.com"
View Source
const ENDPOINT_SAO_PAULO_BR = "br.storage.bunnycdn.com"
View Source
const ENDPOINT_SINGAPORE_SG = "sg.storage.bunnycdn.com"
View Source
const ENDPOINT_STOCKHOLM_SE = "se.storage.bunnycdn.com"
View Source
const ENDPOINT_SYDNEY_SYD = "syd.storage.bunnycdn.com"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
func NewClient ¶
Initialize a new bunnystorage-go client with default settings. Endpoint format is https://<region endpoint>/<Storage Zone Name> e.g. https://la.storage.bunnycdn.com/mystoragezone/
func (*Client) Delete ¶
Delete a file or a directory. If the path to delete is a directory, set the isPath flag to true
func (*Client) Describe ¶ added in v0.0.5
Describes an Object. EXPERIMENTAL. The official Java SDK uses it, but the DESCRIBE HTTP method used is not officially documented.
func (*Client) DownloadPartial ¶ added in v0.0.7
Downloads a byte range of a file. Uses the semantics for HTTP range requests. If you want to avoid passing buffers directly for performance, use DownloadPartialWithReaderCloser
https://developer.mozilla.org/en-US/docs/Web/HTTP/Range_requests
type Object ¶
type Object struct {
GUID string `json:"Guid,omitempty"`
StorageZoneName string `json:"StorageZoneName,omitempty"`
Path string `json:"Path,omitempty"`
ObjectName string `json:"ObjectName,omitempty"`
Length int `json:"Length,omitempty"`
LastChanged string `json:"LastChanged,omitempty"`
ServerID int `json:"ServerId,omitempty"`
ArrayNumber int `json:"ArrayNumber,omitempty"`
IsDirectory bool `json:"IsDirectory,omitempty"`
UserID string `json:"UserId,omitempty"`
ContentType string `json:"ContentType,omitempty"`
DateCreated string `json:"DateCreated,omitempty"`
StorageZoneID int `json:"StorageZoneId,omitempty"`
Checksum string `json:"Checksum,omitempty"`
ReplicatedZones string `json:"ReplicatedZones,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.