repoclient

package
v0.0.0-...-33abfaa Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2019 License: MIT Imports: 15 Imported by: 1

Documentation

Index

Constants

View Source
const SupportedAPIVersion = "1"

Variables

View Source
var UnsupportedAPIVersionError = errors.New("unsupported api verson")

Functions

func BuildDefaultClientConfigurationPath

func BuildDefaultClientConfigurationPath() string

func WriteClientConfiguration

func WriteClientConfiguration(c *ClientConfiguration, path string)

Types

type ClientConfiguration

type ClientConfiguration struct {
	BaseURL       string `json:"baseURL"`
	ConfigVersion string `json:"configVersion"`
}

func ReadClientConfiguration

func ReadClientConfiguration(path string) *ClientConfiguration

type DownloadWriter

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

func NewDownloadWriter

func NewDownloadWriter(w io.Writer, size int64) *DownloadWriter

func (*DownloadWriter) Write

func (d *DownloadWriter) Write(p []byte) (int, error)

type RepositronConnection

type RepositronConnection struct {
	BaseURL string
}

func Connect

func Connect(baseURL string) (*RepositronConnection, error)

func (*RepositronConnection) Append

func (c *RepositronConnection) Append(b *models.Blob, sz int64, r io.Reader, verbose bool) (*models.Blob, error)

func (*RepositronConnection) Delete

func (c *RepositronConnection) Delete(blobId int64) error

func (*RepositronConnection) Download

func (c *RepositronConnection) Download(b *models.Blob, w io.Writer, verbose bool) error

func (*RepositronConnection) GetRawURL

func (c *RepositronConnection) GetRawURL(sub string) string

func (*RepositronConnection) GetURL

func (c *RepositronConnection) GetURL(sub string) string

func (*RepositronConnection) QueryByBucket

func (c *RepositronConnection) QueryByBucket(bucket string) ([]int64, error)

func (*RepositronConnection) QueryByChecksum

func (c *RepositronConnection) QueryByChecksum(checksum string) ([]int64, error)

func (*RepositronConnection) QueryById

func (c *RepositronConnection) QueryById(blobId int64) (*models.Blob, error)

func (*RepositronConnection) QueryByName

func (c *RepositronConnection) QueryByName(name string) ([]int64, error)

func (*RepositronConnection) Upload

func (c *RepositronConnection) Upload(b *models.Blob, r io.Reader, verbose bool) (*models.Blob, error)

type UploadReader

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

func NewUploadReader

func NewUploadReader(r io.Reader, size int64) *UploadReader

func (*UploadReader) Read

func (u *UploadReader) Read(p []byte) (int, error)

Jump to

Keyboard shortcuts

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