client

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 21, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseBlobPath

func ParseBlobPath(blobPath string) (bucketID, path string, err error)

ParseBlobPath parses a blob path in the format "bucketID:path"

Types

type BlobsClient

type BlobsClient struct {
	// contains filtered or unexported fields
}

func NewBlobsClient

func NewBlobsClient(cfg *config.Config) *BlobsClient

func (*BlobsClient) DeleteObject

func (c *BlobsClient) DeleteObject(ctx context.Context, bucketID, remotePath string) error

DeleteObject deletes an object from a bucket

func (*BlobsClient) DownloadFile

func (c *BlobsClient) DownloadFile(ctx context.Context, bucketID, remotePath, localPath string) error

DownloadFile downloads a file from a bucket

func (*BlobsClient) SyncDirectory

func (c *BlobsClient) SyncDirectory(ctx context.Context, bucketID, localDir, remotePrefix string) error

SyncDirectory syncs a local directory to a bucket prefix

func (*BlobsClient) UploadFile

func (c *BlobsClient) UploadFile(ctx context.Context, bucketID, localPath, remotePath string) error

UploadFile uploads a local file to a bucket

type SitesClient

type SitesClient struct {
	// contains filtered or unexported fields
}

func NewSitesClient

func NewSitesClient(cfg *config.Config) *SitesClient

func (*SitesClient) CreateVersion

func (c *SitesClient) CreateVersion(siteID string) (*Version, error)

CreateVersion creates a new version for a site

func (*SitesClient) DeployDirectory

func (c *SitesClient) DeployDirectory(siteID, dirPath string) error

DeployDirectory deploys a directory to a site

func (*SitesClient) SealVersion

func (c *SitesClient) SealVersion(siteID, versionID string) error

SealVersion seals a version and sets it as current

func (*SitesClient) UploadFile

func (c *SitesClient) UploadFile(siteID, versionID, filePath, remotePath string) error

UploadFile uploads a file to a version

type Version

type Version struct {
	ID        string  `json:"id"`
	CreatedAt string  `json:"created_at"`
	SealedAt  *string `json:"sealed_at"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL