Documentation ¶
Overview ¶
Package item provides a hight level API to handle items in a content tree.
The location of an item in the content tree is stored using the node package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Folder ¶
Folder represents a folder in the content tree.
type Report ¶
Report represents a report in the content tree.
type Repository ¶
type Repository interface { Get(ctx context.Context, id string) (i interface{}, err error) Put(ctx context.Context, i interface{}) (id string, err error) }
Repository provides a limited interface to a storage layer.
type Service ¶
type Service interface { Get(ctx context.Context, id string) (interface{}, error) AddFolder(ctx context.Context, name, parent string) (string, error) AddReport(ctx context.Context, name, parent, content string) (string, error) }
Service is the interface that provides the basic Item methods.
func NewService ¶
func NewService(repo Repository) Service
NewService returns a new instance of the default item Service.
Click to show internal directories.
Click to hide internal directories.