Versions in this module Expand all Collapse all v0 v0.1.0 Nov 27, 2023 Changes in this version type HeadBlobResult + ContentDisposition string + Pathname string + type PutBlobPutResult struct + ContentDisposition string + ContentType string + Pathname string + URL string type VercelBlobClient + func (c *VercelBlobClient) Copy(fromUrl, toPath string, options PutCommandOptions) (*PutBlobPutResult, error) v0.0.1 Oct 27, 2023 Changes in this version + const BLOB_API_VERSION + const DEFAULT_BASE_URL + var ErrBadRequest = func(msg string) VercelBlobError + var ErrBlobNotFound = &VercelBlobError + var ErrForbidden = &VercelBlobError + var ErrNotAuthenticated = &VercelBlobError + var ErrStoreNotFound = &VercelBlobError + var ErrStoreSuspended = &VercelBlobError + func GetToken(provider TokenProvider, operation, pathname string) (string, error) + type BlobApiError struct + Error BlobApiErrorDetail + type BlobApiErrorDetail struct + Code string + Message string + type DownloadCommandOptions struct + ByteRange *Range + type EnvTokenProvider struct + func NewEnvTokenProvider(envVar string) (*EnvTokenProvider, error) + func (p *EnvTokenProvider) GetToken(operation, pathname string) (string, error) + type HeadBlobResult struct + CacheControl string + ContentType string + Path string + Size uint64 + URL string + UploadedAt time.Time + type ListBlobResult struct + Blobs []ListBlobResultBlob + Cursor string + HasMore bool + type ListBlobResultBlob struct + PathName string + Size uint64 + URL string + UploadedAt time.Time + type ListCommandOptions struct + Cursor string + Limit uint64 + Prefix string + type PutCommandOptions struct + AddRandomSuffix bool + CacheControlMaxAge uint64 + ContentType string + type PutResult struct + ContentType string + Path string + URL string + type Range struct + End uint + Start uint + type Result struct + Err error + Value interface{} + func Err(err error) Result + func Ok(value interface{}) Result + type TokenProvider interface + GetToken func(operation string, pathname string) (string, error) + type VercelBlobClient struct + func NewVercelBlobClient() *VercelBlobClient + func NewVercelBlobClientExternal(tokenProvider TokenProvider) *VercelBlobClient + func (c *VercelBlobClient) Delete(urlPath string) error + func (c *VercelBlobClient) Download(urlPath string, options DownloadCommandOptions) ([]byte, error) + func (c *VercelBlobClient) Head(pathname string) (*HeadBlobResult, error) + func (c *VercelBlobClient) List(options ListCommandOptions) (*ListBlobResult, error) + func (c *VercelBlobClient) Put(pathname string, body io.Reader, options PutCommandOptions) (*PutResult, error) + type VercelBlobError struct + Code string + Msg string + func NewInvalidInputError(field string) VercelBlobError + func NewUnknownError(statusCode int, message string) VercelBlobError + func (e VercelBlobError) Error() string