Documentation ¶
Index ¶
- Constants
- func RegionsDistanceKm(a, b *Region) float64
- func ServerRegionCode(h *http.Header) (string, error)
- func StorageServerRegionCode(h *http.Header) (string, error)
- type Client
- func (c *Client) EdgeServersIP(ctx context.Context) ([]string, error)
- func (c *Client) NewStorageZoneClient(ctx context.Context, zoneName string) (*StorageZoneClient, error)
- func (c *Client) Regions(ctx context.Context) ([]Region, error)
- func (c *Client) StorageZoneByName(ctx context.Context, name string) (*StorageZone, error)
- func (c *Client) StorageZones(ctx context.Context) ([]StorageZone, error)
- type Region
- type StorageZone
- type StorageZoneClient
- func (sz *StorageZoneClient) Delete(ctx context.Context, filePath string) error
- func (sz *StorageZoneClient) Download(ctx context.Context, filePath string) (io.ReadCloser, int, error)
- func (sz *StorageZoneClient) List(ctx context.Context, dirPath string) ([]string, error)
- func (sz *StorageZoneClient) Upload(ctx context.Context, filePath string, contents io.Reader) error
Constants ¶
View Source
const ClientUserAgent = "go-bunnyapi-client 1.0"
Variables ¶
This section is empty.
Functions ¶
func RegionsDistanceKm ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) EdgeServersIP ¶
func (*Client) NewStorageZoneClient ¶
func (*Client) StorageZoneByName ¶
func (*Client) StorageZones ¶
func (c *Client) StorageZones(ctx context.Context) ([]StorageZone, error)
type StorageZone ¶
type StorageZone struct { Id int UserId string Name string Password string DateModified string Deleted bool StorageUsed int64 FilesStored int64 Region string ReplicationRegions []string ReadOnlyPassword string Rewrite404To200 bool Custom404FilePath string StorageHostname string ZoneTier int ReplicationChangeInProgress bool PriceOverride float64 Discount int }
type StorageZoneClient ¶
type StorageZoneClient struct {
// contains filtered or unexported fields
}
func NewStorageZoneClient ¶
func NewStorageZoneClient(zoneName, storageEndpoint, accessKey string) *StorageZoneClient
func (*StorageZoneClient) Delete ¶
func (sz *StorageZoneClient) Delete(ctx context.Context, filePath string) error
func (*StorageZoneClient) Download ¶
func (sz *StorageZoneClient) Download(ctx context.Context, filePath string) (io.ReadCloser, int, error)
Click to show internal directories.
Click to hide internal directories.