load

package
v1.5.3-rc2 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2019 License: MIT Imports: 16 Imported by: 13

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Enabled bool   `toml:"enabled"`
	Dir     string `toml:"dir"`
}

func NewConfig

func NewConfig() Config

func (Config) Validate

func (c Config) Validate() error

Validates verifies that the directory specified is an absolute path and that it contains the directories /tasks and /handlers. The directory may contain additional files, but must at least contain /tasks and /handlers.

type Diagnostic

type Diagnostic interface {
	Debug(msg string)
	Error(msg string, err error)
	Loading(thing string, file string)
}

type Item

type Item struct {
	ID string `json:"id"`
}

func (Item) MarshalBinary

func (i Item) MarshalBinary() ([]byte, error)

func (Item) ObjectID

func (i Item) ObjectID() string

func (*Item) UnmarshalBinary

func (i *Item) UnmarshalBinary(data []byte) error

type ItemsDAO

type ItemsDAO interface {
	Set(i Item) error
	Delete(id string) error
	List(prefix string) ([]Item, error)

	Rebuild() error
}

Data access object for resources loaded from a directory

type Service

type Service struct {
	StorageService interface {
		Store(namespace string) storage.Interface
		Register(name string, store storage.StoreActioner)
	}
	// contains filtered or unexported fields
}

func NewService

func NewService(c Config, h http.Handler, d Diagnostic) (*Service, error)

func (*Service) Close

func (s *Service) Close() error

func (*Service) Load

func (s *Service) Load() error

func (*Service) Open

func (s *Service) Open() error

Jump to

Keyboard shortcuts

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