lib

package
v0.9.9 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2015 License: BSD-2-Clause Imports: 15 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const MB = int64(1048576)

Variables

This section is empty.

Functions

func SetBasicAuth

func SetBasicAuth(username, password string)

func SetTokenAuth

func SetTokenAuth(t *Token)

Types

type Acls

type Acls struct {
	R bool
	W bool
	D bool
}

type Node

type Node node.Node

func (*Node) AclAdd

func (n *Node) AclAdd(acl, users string) (err error)

func (*Node) AclChown

func (n *Node) AclChown(user string) (err error)

func (*Node) AclRemove

func (n *Node) AclRemove(acl, users string) (err error)

func (*Node) Create

func (n *Node) Create(opts Opts) (err error)

func (*Node) Download

func (n *Node) Download(opts Opts) (download io.Reader, err error)

func (*Node) Get

func (n *Node) Get() (err error)

func (*Node) PP

func (n *Node) PP()

func (*Node) PrettyPrint

func (n *Node) PrettyPrint()

func (*Node) String

func (n *Node) String() string

func (*Node) Update

func (n *Node) Update(opts Opts) (err error)

func (*Node) UploadPart

func (n *Node) UploadPart(part string, r io.Reader, size int64) (err error)

type OLP

type OLP struct {
	Offset int64
	Length int64
	Part   int
}

type Opts

type Opts map[string]string

func (*Opts) HasKey

func (o *Opts) HasKey(key string) bool

func (*Opts) Value

func (o *Opts) Value(key string) string

type Token

type Token struct {
	AccessToken string `json:"access_token"`
	ExpiresIn   int    `json:"expires_in"`
	UserName    string `json:"user_name"`
}

func OAuthToken

func OAuthToken(username, password string) (t *Token, err error)

func (*Token) Delete

func (t *Token) Delete() (err error)

func (*Token) ExpiresInDays

func (t *Token) ExpiresInDays() int

func (*Token) Load

func (t *Token) Load() (err error)

func (*Token) Path

func (t *Token) Path() (path string)

func (*Token) Store

func (t *Token) Store() (err error)

type Trans

type Trans struct {
	Url   string
	Count int
	Path  string
	Name  string
	Size  int64
	Parts []OLP
}

func PartionUpload

func PartionUpload(url string, path string) (t Trans, err error)

type User

type User struct {
	Username string
	Password string
	Token    string
	Expire   string
}

type WAcl

type WAcl struct {
	Data  *acl.Acl  `json:"data"`
	Error *[]string `json:"error"`
}

type WNode

type WNode struct {
	Status int       `json:"status"`
	Data   *Node     `json:"data"`
	Error  *[]string `json:"error"`
}

type Wrapper

type Wrapper struct {
	Data  interface{} `json:"data"`
	Error *[]string   `json:"error"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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