api

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2018 License: AGPL-3.0 Imports: 37 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ShareTypeUser       ShareType = 0
	ShareTypeGroup                = 1
	ShareTypePublicLink           = 3

	PermissionRead      Permission = 1
	PermissionReadWrite Permission = 15
	PermissionDropOnly  Permission = 4

	ItemTypeFile   ItemType = "file"
	ItemTypeFolder ItemType = "folder"

	ShareStateAccepted ShareState = 0
	ShareStatePending             = 1
	ShareStateRejected            = 2
)

Variables

View Source
var SkipDir = errors.New("skip this directory")

Functions

func GetContextWithAuth added in v0.0.2

func GetContextWithAuth(ctx context.Context) context.Context

func New added in v0.0.2

func New(opt *Options) (http.Handler, error)

Types

type FlipDirection added in v0.0.2

type FlipDirection int

The FlipDirection type is used by the Flip option in DecodeOpts to indicate in which direction to flip an image.

const (
	FlipVertical FlipDirection = 1 << iota
	FlipHorizontal
)

FlipVertical and FlipHorizontal are two possible FlipDirections values to indicate in which direction an image will be flipped.

type ItemType added in v0.0.2

type ItemType string

type JSONInt added in v0.0.2

type JSONInt struct {
	Value int
	Valid bool
	Set   bool
}

func (*JSONInt) UnmarshalJSON added in v0.0.2

func (i *JSONInt) UnmarshalJSON(data []byte) error

type JSONString added in v0.0.2

type JSONString struct {
	Value string
	Valid bool
	Set   bool
}

func (*JSONString) UnmarshalJSON added in v0.0.2

func (i *JSONString) UnmarshalJSON(data []byte) error

type LDAPAccountType added in v0.0.2

type LDAPAccountType string
var (
	LDAPAccountTypePrimary   LDAPAccountType = "primary"
	LDAPAccountTypeSecondary LDAPAccountType = "secondary"
	LDAPAccountTypeService   LDAPAccountType = "service"
	LDAPAccountTypeEGroup    LDAPAccountType = "egroup"
	LDAPAccountTypeUnixGroup LDAPAccountType = "unixgroup"
	LDAPAccountTypeUndefined LDAPAccountType = "undefined"
)

type LoadFileResponse added in v0.0.2

type LoadFileResponse struct {
	FileContents string `json:"filecontents"`
	Writable     bool   `json:"writeable"`
	Mime         string `json:"mime"`
	MTime        int    `json:"mtime"`
}

type NewShareOCSRequest added in v0.0.2

type NewShareOCSRequest struct {
	Path         string     `json:"path"`
	Name         string     `json:"name"`
	ShareType    ShareType  `json:"shareType"`
	ShareWith    string     `json:"shareWith"`
	PublicUpload bool       `json:"publicUpload"`
	Password     JSONString `json:"password"`
	Permissions  JSONInt    `json:"permissions"`
	ExpireDate   JSONString `json:"expireDate"`
}

type OCSPayload added in v0.0.2

type OCSPayload struct {
	Meta *ResponseMeta `json:"meta"`
	Data interface{}   `json:"data"`
}

type OCSResponse added in v0.0.2

type OCSResponse struct {
	OCS *OCSPayload `json:"ocs"`
}

type OCSShare added in v0.0.2

type OCSShare struct {
	ID                   string     `json:"id"`
	ShareType            ShareType  `json:"share_type"`
	UIDOwner             string     `json:"uid_owner"`
	DisplayNameOwner     string     `json:"displayname_owner"`
	Permissions          Permission `json:"permissions"`
	ShareTime            int        `json:"stime"`
	Token                string     `json:"token"`
	UIDFileOwner         string     `json:"uid_file_owner"`
	DisplayNameFileOwner string     `json:"displayname_file_owner"`
	Path                 string     `json:"path"`
	ItemType             ItemType   `json:"item_type"`
	MimeType             string     `json:"mimetype"`
	ItemSource           string     `json:"item_source"`
	FileSource           string     `json:"file_source"`
	FileTarget           string     `json:"file_target"`
	ShareWith            *string    `json:"share_with"`
	ShareWithDisplayName string     `json:"share_with_displayname"`
	Name                 string     `json:"name"`
	URL                  string     `json:"url"`
	State                ShareState `json:"state"`
	Expiration           string     `json:"expiration,omitempty"`
}
{
           "id":"1",
           "share_type":3,
           "uid_owner":"admin",
           "displayname_owner":"admin",
           "permissions":1,
           "stime":1528476368,
           "parent":null,
           "expiration":null,
           "token":"wI9qedAsjltaihj",
           "uid_file_owner":"admin",
           "displayname_file_owner":"admin",
           "path":"\/Reverse cowgirl hotness.mp4",
           "item_type":"file",
           "mimetype":"video\/mp4",
           "storage_id":"home::admin",
           "storage":3,
           "item_source":82,
           "file_source":82,
           "file_parent":25,
           "file_target":"\/Reverse cowgirl hotness.mp4",
           "share_with":null,
           "share_with_displayname":null,
           "name":"Reverse cowgirl hotness.mp4 link",
           "url":"https:\/\/demo.owncloud.org\/s\/wI9qedAsjltaihj",
           "mail_send":0
        }

type OCSShareeData added in v0.0.2

type OCSShareeData struct {
	Exact   *OCSShareeExact   `json:"exact"`
	Users   []*OCSShareeEntry `json:"users"`
	Groups  []*OCSShareeEntry `json:"groups"`
	Remotes []*OCSShareeEntry `json:"remotes"`
}

type OCSShareeEntry added in v0.0.2

type OCSShareeEntry struct {
	Label string               `json:"label"`
	Value *OCSShareeEntryValue `json:"value"`
}

type OCSShareeEntryValue added in v0.0.2

type OCSShareeEntryValue struct {
	ShareType ShareType `json:"shareType"`
	ShareWith string    `json:"shareWith"`
}

type OCSShareeExact added in v0.0.2

type OCSShareeExact struct {
	Users   []*OCSShareeEntry `json:"users"`
	Groups  []*OCSShareeEntry `json:"groups"`
	Remotes []*OCSShareeEntry `json:"remotes"`
}

type Options added in v0.0.2

type Options struct {
	Logger            *zap.Logger
	TemporaryFolder   string
	ChunksFolder      string
	MaxUploadFileSize uint64
	REVAHost          string
	Router            *mux.Router

	OwnCloudHomePrefix string
	RevaHomePrefix     string

	OwnCloudSharePrefix string
	RevaSharePrefix     string

	OwnCloudPublicLinkPrefix string
	RevaPublicLinkPrefix     string

	OwnCloudPersonalProjectsPrefix string
	RevaPersonalProjectsPrefix     string

	CBOXGroupDaemonURI    string
	CBOXGroupDaemonSecret string

	MaxNumFilesForArchive int
	MaxSizeForArchive     int
	MaxViewerFileFize     int

	OverwriteHost string

	WopiServer string
	WopiSecret string

	DrawIOURL string

	CacheSize     int
	CacheEviction int

	MailServer            string
	MailServerFromAddress string
}

type Permission added in v0.0.2

type Permission int

type ResponseMeta added in v0.0.2

type ResponseMeta struct {
	Status       string `json:"status"`
	StatusCode   int    `json:"statuscode"`
	Message      string `json:"message"`
	TotalItems   string `json:"totalitems"`
	ItemsPerPage string `json:"itemsperpage"`
}

type SaveFileResponse added in v0.0.2

type SaveFileResponse struct {
	Size  int `json:"size"`
	Mtime int `json:"mtime"`
}

type ShareState added in v0.0.2

type ShareState int

type ShareType added in v0.0.2

type ShareType int

type WalkFunc added in v0.0.2

type WalkFunc func(path string, md *reva_api.Metadata, err error) error

Jump to

Keyboard shortcuts

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