migrate

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ForEachFile

func ForEachFile(path string, fn func(metaData *FilesMetaData))

ForEachFile is a callback iterator for files.jsonl created by owncloud data_exporter app

func ForEachShare

func ForEachShare(path string, fn func(metaData *ShareMetaData))

ForEachShare is a callback iterator for shares.jsonl created by owncloud data_exporter app

func ImportMetadata

func ImportMetadata(ctx context.Context, client gateway.GatewayAPIClient, ns string, fileData FilesMetaData) error

ImportMetadata from a files.jsonl file in exportPath. The files must already be present on the storage Will set etag and mtime

func ImportShare

func ImportShare(ctx context.Context, client gateway.GatewayAPIClient, ns string, shareData *ShareMetaData) error

ImportShare from a shares.jsonl file in exportPath. The files must already be present on the storage

Types

type FilesMetaData

type FilesMetaData struct {
	Type        string `json:"type"`
	Path        string `json:"path"`
	Etag        string `json:"eTag"`
	Permissions int    `json:"permissions"`
	MTime       int    `json:"mtime"`
}

FilesMetaData representation in the import data

type ShareMetaData

type ShareMetaData struct {
	Path           string `json:"path"`
	ShareType      string `json:"shareType"`
	Type           string `json:"type"`
	Owner          string `json:"owner"`
	SharedBy       string `json:"sharedBy"`
	SharedWith     string `json:"sharedWith"`
	Permissions    int    `json:"permissions"`
	ExpirationDate string `json:"expirationDate"`
	Password       string `json:"password"`
	Name           string `json:"name"`
	Token          string `json:"token"`
}

ShareMetaData representation in the import metadata

Jump to

Keyboard shortcuts

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