endpoint

package
v2.0.0-rc.2+incompatible Latest Latest
Warning

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

Go to latest
Published: May 31, 2018 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Destination

type Destination interface {
	Fetchable() bool
	Writable() bool
	MD5able() bool

	Write(ctx context.Context, path string, r io.ReadCloser) (err error)
	Fetch(ctx context.Context, path, url string) (err error)

	Stat(ctx context.Context, p string) (o *model.Object, err error)

	MD5(ctx context.Context, p string) (b string, err error)
}

Destination is the interface for destination endpoint.

type Source

type Source interface {
	Reachable() bool
	Readable() bool
	MD5able() bool

	List(ctx context.Context, j *model.Job, fn func(*model.Object)) (err error)

	Read(ctx context.Context, p string) (r io.ReadCloser, err error)
	Reach(ctx context.Context, p string) (url string, err error)

	Stat(ctx context.Context, p string) (o *model.Object, err error)

	MD5(ctx context.Context, p string) (b string, err error)
}

Source is the interface for source endpoint.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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