client

package
v0.0.0-...-d7f6bd1 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2015 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Object     = iota // Minio and S3 compatible object storage
	Filesystem        // POSIX compatible file systems
)

enum types

Variables

This section is empty.

Functions

This section is empty.

Types

type APINotImplemented

type APINotImplemented struct {
	API string
}

APINotImplemented - api not implemented

func (APINotImplemented) Error

func (e APINotImplemented) Error() string

type BucketExists

type BucketExists GenericBucketError

BucketExists - bucket exists

func (BucketExists) Error

func (e BucketExists) Error() string

type Client

type Client interface {
	// Common operations
	Stat() (content *Content, err error)
	List(recursive bool) <-chan ContentOnChannel

	// Bucket operations
	MakeBucket() error
	SetBucketACL(acl string) error

	// Object operations
	GetObject(offset, length int64) (body io.ReadCloser, size int64, err error)
	PutObject(size int64, data io.Reader) error

	// URL returns back internal url
	URL() *URL
}

Client - client interface

type Content

type Content struct {
	Name string
	Time time.Time
	Size int64
	Type os.FileMode
}

Content container for content metadata

type ContentOnChannel

type ContentOnChannel struct {
	Content *Content
	Err     error
}

ContentOnChannel - List contents on channel

type EmptyPath

type EmptyPath struct{}

EmptyPath (EINVAL) - invalid argument

func (EmptyPath) Error

func (e EmptyPath) Error() string

type GenericBucketError

type GenericBucketError struct {
	Bucket string
}

GenericBucketError - generic bucket operations error

type GenericError

type GenericError struct{}

GenericError - generic error

type GenericFileError

type GenericFileError struct {
	Path string
}

GenericFileError - generic file error

type GenericObjectError

type GenericObjectError struct {
	Bucket string
	Object string
}

GenericObjectError - generic object operations error

type ISBrokenSymlink GenericFileError

ISBrokenSymlink (ENOTENT) - file has broken symlink

func (ISBrokenSymlink) Error

func (e ISBrokenSymlink) Error() string

type ISFolder

type ISFolder GenericFileError

ISFolder (EISDIR) - accessed file is a folder

func (ISFolder) Error

func (e ISFolder) Error() string

type InvalidACLType

type InvalidACLType struct {
	ACL string
}

InvalidACLType - invalid acl type

func (InvalidACLType) Error

func (e InvalidACLType) Error() string

type InvalidArgument

type InvalidArgument GenericError

InvalidArgument - bad arguments provided

func (InvalidArgument) Error

func (e InvalidArgument) Error() string

type InvalidBucketName

type InvalidBucketName GenericBucketError

InvalidBucketName - bucket name invalid (http://goo.gl/wJlzDz)

func (InvalidBucketName) Error

func (e InvalidBucketName) Error() string

type InvalidMaxKeys

type InvalidMaxKeys struct {
	MaxKeys int
}

InvalidMaxKeys - invalid maxkeys provided

func (InvalidMaxKeys) Error

func (e InvalidMaxKeys) Error() string

type InvalidObjectName

type InvalidObjectName GenericObjectError

InvalidObjectName - object requested is invalid

func (InvalidObjectName) Error

func (e InvalidObjectName) Error() string

type InvalidQueryURL

type InvalidQueryURL struct {
	URL string
}

InvalidQueryURL - generic error

func (InvalidQueryURL) Error

func (e InvalidQueryURL) Error() string

type InvalidRange

type InvalidRange struct {
	Offset int64
}

InvalidRange - invalid range requested

func (InvalidRange) Error

func (e InvalidRange) Error() string

type NotFolder

type NotFolder GenericFileError

NotFolder (ENOTDIR) - accessed file is not a folder

func (NotFolder) Error

func (e NotFolder) Error() string

type NotFound

type NotFound GenericFileError

NotFound (ENOENT) - file not found

func (NotFound) Error

func (e NotFound) Error() string

type ObjectExists

type ObjectExists GenericObjectError

ObjectExists - object exists

func (ObjectExists) Error

func (e ObjectExists) Error() string

type ObjectNotFound

type ObjectNotFound GenericObjectError

ObjectNotFound - object requested does not exist

func (ObjectNotFound) Error

func (e ObjectNotFound) Error() string

type URL

type URL struct {
	Type      URLType
	Scheme    string
	Host      string
	Path      string
	Separator rune
}

URL client url structure

func Parse

func Parse(urlStr string) (*URL, error)

Parse url

func (*URL) String

func (u *URL) String() string

String convert URL into its canonical form

type URLType

type URLType int

URLType - enum of different url types

type UnexpectedError

type UnexpectedError GenericError

UnexpectedError - unexpected error

func (UnexpectedError) Error

func (e UnexpectedError) Error() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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