pydio

package
v0.0.0-...-b99a58d Latest Latest
Warning

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

Go to latest
Published: May 10, 2017 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Overview

Package pydio contains all objects needed by the Pydio system

  • Copyright 2007-2016 Abstrium <contact (at) pydio.com>
  • This file is part of Pydio. *
  • Pydio is free software: you can redistribute it and/or modify
  • it under the terms of the GNU Affero General Public License as published by
  • the Free Software Foundation, either version 3 of the License, or
  • (at your option) any later version. *
  • Pydio is distributed in the hope that it will be useful,
  • but WITHOUT ANY WARRANTY; without even the implied warranty of
  • MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  • GNU Affero General Public License for more details. *
  • You should have received a copy of the GNU Affero General Public License
  • along with Pydio. If not, see <http://www.gnu.org/licenses/>. *
  • The latest code can be found at <https://pydio.com/>.

Package pydio contains all objects needed by the Pydio system

  • Copyright 2007-2016 Abstrium <contact (at) pydio.com>
  • This file is part of Pydio. *
  • Pydio is free software: you can redistribute it and/or modify
  • it under the terms of the GNU Affero General Public License as published by
  • the Free Software Foundation, either version 3 of the License, or
  • (at your option) any later version. *
  • Pydio is distributed in the hope that it will be useful,
  • but WITHOUT ANY WARRANTY; without even the implied warranty of
  • MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  • GNU Affero General Public License for more details. *
  • You should have received a copy of the GNU Affero General Public License
  • along with Pydio. If not, see <http://www.gnu.org/licenses/>. *
  • The latest code can be found at <https://pydio.com/>.

Package pydio contains all objects needed by the Pydio system

  • Copyright 2007-2016 Abstrium <contact (at) pydio.com>
  • This file is part of Pydio. *
  • Pydio is free software: you can redistribute it and/or modify
  • it under the terms of the GNU Affero General Public License as published by
  • the Free Software Foundation, either version 3 of the License, or
  • (at your option) any later version. *
  • Pydio is distributed in the hope that it will be useful,
  • but WITHOUT ANY WARRANTY; without even the implied warranty of
  • MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  • GNU Affero General Public License for more details. *
  • You should have received a copy of the GNU Affero General Public License
  • along with Pydio. If not, see <http://www.gnu.org/licenses/>. *
  • The latest code can be found at <https://pydio.com/>.

Package pydio contains all objects needed by the Pydio system

  • Copyright 2007-2016 Abstrium <contact (at) pydio.com>
  • This file is part of Pydio. *
  • Pydio is free software: you can redistribute it and/or modify
  • it under the terms of the GNU Affero General Public License as published by
  • the Free Software Foundation, either version 3 of the License, or
  • (at your option) any later version. *
  • Pydio is distributed in the hope that it will be useful,
  • but WITHOUT ANY WARRANTY; without even the implied warranty of
  • MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  • GNU Affero General Public License for more details. *
  • You should have received a copy of the GNU Affero General Public License
  • along with Pydio. If not, see <http://www.gnu.org/licenses/>. *
  • The latest code can be found at <https://pydio.com/>.

Package pydio contains all objects needed by the Pydio system

  • Copyright 2007-2016 Abstrium <contact (at) pydio.com>
  • This file is part of Pydio. *
  • Pydio is free software: you can redistribute it and/or modify
  • it under the terms of the GNU Affero General Public License as published by
  • the Free Software Foundation, either version 3 of the License, or
  • (at your option) any later version. *
  • Pydio is distributed in the hope that it will be useful,
  • but WITHOUT ANY WARRANTY; without even the implied warranty of
  • MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  • GNU Affero General Public License for more details. *
  • You should have received a copy of the GNU Affero General Public License
  • along with Pydio. If not, see <http://www.gnu.org/licenses/>. *
  • The latest code can be found at <https://pydio.com/>.

Package pydio contains all objects needed by the Pydio system

  • Copyright 2007-2016 Abstrium <contact (at) pydio.com>
  • This file is part of Pydio. *
  • Pydio is free software: you can redistribute it and/or modify
  • it under the terms of the GNU Affero General Public License as published by
  • the Free Software Foundation, either version 3 of the License, or
  • (at your option) any later version. *
  • Pydio is distributed in the hope that it will be useful,
  • but WITHOUT ANY WARRANTY; without even the implied warranty of
  • MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  • GNU Affero General Public License for more details. *
  • You should have received a copy of the GNU Affero General Public License
  • along with Pydio. If not, see <http://www.gnu.org/licenses/>. *
  • The latest code can be found at <https://pydio.com/>.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Decoder

type Decoder interface {
	Decode(v interface{}) error
}

Decoder interface for a node

func NewDecoder

func NewDecoder(r io.Reader) Decoder

NewDecoder returns a new encoder that reads from r.

type Dir

type Dir struct {
	ParentDir *Dir   `path:",first:last-1"`
	DirName   string `path:",last-1:last" query:"dir,"`
}

Dir format definition

func NewDir

func NewDir(dirs ...string) *Dir

NewDir based on array of strings

func (*Dir) Read

func (d *Dir) Read(p []byte) (int, error)

Read the node by encoding to its json representation

func (*Dir) String

func (d *Dir) String() string

String value of the structure Dir

func (*Dir) UnmarshalPath

func (d *Dir) UnmarshalPath(b []byte) (err error)

UnmarshalPath implementation

func (*Dir) UnmarshalQuery

func (d *Dir) UnmarshalQuery(b []byte) (err error)

UnmarshalQuery implementation

type Encoder

type Encoder interface {
	Encode(v interface{}) error
}

Encoder interface for a node

func NewEncoder

func NewEncoder(w io.Writer) Encoder

NewEncoder returns a new encoder that writes to w.

type File

type File struct {
	Node *Node

	*Reader
	Writer

	sync.WaitGroup
	// contains filtered or unexported fields
}

File format definition

func NewFile

func NewFile(node *Node, str string, reader *Reader, w interface{}, writeLock chan (int)) *File

NewFile from a node

func (*File) Close

func (f *File) Close()

Close pipe

func (*File) String

func (f *File) String() string

type FileOptions

type FileOptions struct {
	Type string `json:"TYPE"`
	Path string `json:"PATH"`
}

FileOptions format definition

type Node

type Node struct {
	Repo     *Repo  `path:",0:1" query:"repo"`
	Dir      *Dir   `path:",1:last-1" query:"dir"`
	Basename string `path:",last-1:last" query:"file"`

	Options Options `json:"-"`
}

Node format definition

func NewNode

func NewNode(items ...string) *Node

NewNode from a bunch of string (or concatenated ones)

func NewTmpNode

func NewTmpNode() (*Node, error)

NewTmpNode with random name

func (*Node) Read

func (n *Node) Read(p []byte) (int, error)

Read the node by encoding to its json representation

func (*Node) String

func (n *Node) String() string

String representation of a node

func (*Node) UnmarshalPath

func (n *Node) UnmarshalPath(b []byte) (err error)

UnmarshalPath implementation

func (*Node) UnmarshalQuery

func (n *Node) UnmarshalQuery(b []byte) (err error)

UnmarshalQuery implementation

func (*Node) Write

func (n *Node) Write(p []byte) (int, error)

Read the node by encoding to its json representation

type Options

type Options struct {
	PartialTargetBytesize  int64  `json:"partial_target_bytesize"`
	PartialUpload          bool   `json:"partial_upload"`
	XHRUploader            bool   `json:"xhr_uploader"`
	ForcePost              bool   `json:"force_post"`
	URLEncodedFilename     string `json:"urlencoded_filename"`
	AppendToURLEncodedPart string `json:"appendto_urlencoded_part"`
	Path                   string `json:"PATH"`

	FileOptions `json:"OPTIONS"`
	S3Options
}

Options format definition

func NewOptionsFromJWT

func NewOptionsFromJWT(token string, signatureSecret string) (*Options, error)

NewOptionsFromJWT creates a user based on a JWT token string

func (*Options) JWT

func (o *Options) JWT(signatureSecret string, hoursBeforeExpiry int) (string, error)

JWT representation of the User

func (*Options) Read

func (o *Options) Read(p []byte) (int, error)

Read the options by encoding to its json representation

type Reader

type Reader struct {
	//io.ReaderAt
	io.ReadSeeker

	*io.PipeReader
}

Reader pydio style

func (*Reader) Read

func (r *Reader) Read(p []byte) (n int, err error)

func (*Reader) Seek

func (r *Reader) Seek(offset int64, whence int) (int64, error)

Seek faking

type Repo

type Repo struct {
	ID  string `xml:"id,attr" json:"id" path:",0:1"`
	ACL string `xml:"acl,attr" json:"acl"`
}

Repo format definition

func (*Repo) IsReadable

func (r *Repo) IsReadable() bool

IsReadable Repo ?

func (*Repo) IsWritable

func (r *Repo) IsWritable() bool

IsWritable Repo ?

func (*Repo) Read

func (r *Repo) Read(p []byte) (int, error)

Read the node by encoding to its json representation

func (*Repo) String

func (r *Repo) String() string

String representation of a repo

func (*Repo) UnmarshalPath

func (r *Repo) UnmarshalPath(b []byte) (err error)

UnmarshalPath implementation

func (*Repo) UnmarshalQuery

func (r *Repo) UnmarshalQuery(b []byte) (err error)

UnmarshalQuery implementation

type S3Options

type S3Options struct {
	Type              string `json:"TYPE"`
	APIKey            string `json:"API_KEY"`
	APIVersion        string `json:"API_VERSION"`
	Container         string `json:"CONTAINER"`
	Proxy             string `json:"PROXY"`
	VHostNotSupported bool   `json:"VHOST_NOT_SUPPORTED"`
	Region            string `json:"REGION"`
	SecretKey         string `json:"SECRET_KEY"`
	SignatureVersion  string `json:"SIGNATURE_VERSION"`
	StorageURL        string `json:"STORAGE_URL"`
}

S3Options from server

type User

type User struct {
	ID        string `xml:"id,attr" json:"id"`
	GroupPath string `xml:"groupPath,attr" json:"grp"`
	Repos     []Repo `xml:"repositories>repo" json:"rep"`
}

User format definition

func NewUser

func NewUser() *User

NewUser object with pipewriting

func NewUserFromJWT

func NewUserFromJWT(token string, signatureSecret string) (*User, error)

NewUserFromJWT creates a user based on a JWT token string

func (*User) GetRepo

func (u *User) GetRepo(id string) *Repo

GetRepo via its ID

func (*User) JWT

func (u *User) JWT(signatureSecret string, hoursBeforeExpiry int) (string, error)

JWT representation of the User

func (*User) Read

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

Read the node by encoding to its json representation

type Writer

type Writer interface {
	io.Writer
	io.Closer
	io.WriterAt
}

Writer pydio style

Directories

Path Synopsis
Package localio contains logic for dealing with local files * Copyright 2007-2016 Abstrium <contact (at) pydio.com> * This file is part of Pydio.
Package localio contains logic for dealing with local files * Copyright 2007-2016 Abstrium <contact (at) pydio.com> * This file is part of Pydio.
* Copyright 2007-2016 Abstrium <contact (at) pydio.com> * This file is part of Pydio.
* Copyright 2007-2016 Abstrium <contact (at) pydio.com> * This file is part of Pydio.
Package s3io contains all logic for dealing with s3 files * Copyright 2007-2016 Abstrium <contact (at) pydio.com> * This file is part of Pydio.
Package s3io contains all logic for dealing with s3 files * Copyright 2007-2016 Abstrium <contact (at) pydio.com> * This file is part of Pydio.

Jump to

Keyboard shortcuts

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