dataaccess

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2017 License: BSD-3-Clause Imports: 3 Imported by: 28

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File interface {
	content.ContentProviderInterface

	String() string
	Id() string
	Name() string
	Parent() route.Route
	Route() route.Route
}

A File represents a file ressource that is associated with an Item.

type Item

type Item interface {
	content.ContentProviderInterface

	String() string
	Id() string
	Type() ItemType
	CanHaveChildren() bool
	Route() route.Route
	Files() []File
	LastHash() string
}

An Item represents a single document in a repository.

type ItemState added in v0.10.0

type ItemState int
const (
	ItemStateStable ItemState = iota
	ItemStateNew
	ItemStateModified
	ItemStateDeleted
)

type ItemType

type ItemType int
const (
	TypePhysical ItemType = iota
	TypeVirtual
	TypeFileCollection
)

func (ItemType) String

func (itemType ItemType) String() string

type ItemsProvider added in v0.10.0

type ItemsProvider interface {
	Items() []Item
	Item(route route.Route) Item
}

type LiveReload added in v0.10.0

type LiveReload interface {
	StartWatching(route route.Route)
	StopWatching(route route.Route)
}

type PathProvider added in v0.10.0

type PathProvider interface {
	Path() string
}

type RoutesProvider added in v0.10.0

type RoutesProvider interface {
	Routes() []route.Route
}

type Subscriber added in v0.10.0

type Subscriber interface {
	Subscribe(updates chan Update)
}

type Update added in v0.10.0

type Update struct {
	// contains filtered or unexported fields
}

Update contains a list of new, modified and deleted routes.

func NewUpdate added in v0.10.0

func NewUpdate(newItemRoutes, modifiedItemRoutes, deletedItemRoutes []route.Route) Update

NewUpdate creates a new Update instance from the given new, modified and deleted routes.

func (*Update) Deleted added in v0.10.0

func (update *Update) Deleted() []route.Route

Deleted returns the routes of releted items.

func (*Update) IsEmpty added in v0.10.0

func (update *Update) IsEmpty() bool

IsEmpty indicates whether this Update is empty or not.

func (*Update) Modified added in v0.10.0

func (update *Update) Modified() []route.Route

Modified returns the routes of modified items.

func (*Update) New added in v0.10.0

func (update *Update) New() []route.Route

New returns the routes of new items.

func (*Update) String added in v0.10.0

func (update *Update) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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