stores

package
v0.0.0-...-c1df235 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2018 License: MIT Imports: 30 Imported by: 0

Documentation

Index

Constants

View Source
const MaxResolveTypeDepth = 100

Variables

This section is empty.

Functions

func RegisterExternalStoreFunc

func RegisterExternalStoreFunc(id models.Id, store StoreFunc)

Types

type App

type App struct {
	Dispatcher flux.DispatcherInterface
	Watcher    flux.WatcherInterface
	Notifier   flux.NotifierInterface

	Empty      *EmptyStore
	Page       *PageStore
	Injector   *InjectorStore
	Connection *ConnectionStore
	Packages   *PackageStore
	Tags       *TagStore
	Data       *DataStore
	Editor     *EditorStore
	// contains filtered or unexported fields
}

func (*App) Debug

func (a *App) Debug(message ...interface{})

func (*App) Delete

func (a *App) Delete(key interface{})

func (*App) Dispatch

func (a *App) Dispatch(action flux.ActionInterface) chan struct{}

func (*App) ExternalStore

func (a *App) ExternalStore(id models.Id) flux.StoreInterface

func (*App) Fail

func (a *App) Fail(err error)

func (*App) HandleGenericStatusMessage

func (a *App) HandleGenericStatusMessage(payload *flux.Payload, message interface{}) bool

func (*App) Init

func (a *App) Init()

func (*App) Log

func (a *App) Log(args ...interface{})

func (*App) LogHide

func (a *App) LogHide(args ...interface{})

LogHide hides the message after 2 seconds

func (*App) LogHidef

func (a *App) LogHidef(format string, args ...interface{})

func (*App) Logf

func (a *App) Logf(format string, args ...interface{})

func (*App) RegisterExternalStore

func (a *App) RegisterExternalStore(id models.Id, app *App)

func (*App) Watch

func (a *App) Watch(key interface{}, f func(done chan struct{}))

type ConnectionStore

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

func NewConnectionStore

func NewConnectionStore(app *App) *ConnectionStore

func (*ConnectionStore) Handle

func (s *ConnectionStore) Handle(payload *flux.Payload) bool

func (*ConnectionStore) Open

func (s *ConnectionStore) Open() bool

type DataStore

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

func NewDataStore

func NewDataStore(a *App) *DataStore

func (*DataStore) Expr

func (s *DataStore) Expr(ob gotypes.Object) dst.Expr

func (*DataStore) File

func (s *DataStore) File(ob gotypes.Object) *dst.File

func (*DataStore) Handle

func (s *DataStore) Handle(payload *flux.Payload) bool

func (*DataStore) Import

func (s *DataStore) Import(path, file, alias string) string

type EditorStore

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

func NewEditorStore

func NewEditorStore(a *App) *EditorStore

func (*EditorStore) Data

func (s *EditorStore) Data() dst.Expr

func (*EditorStore) Handle

func (s *EditorStore) Handle(payload *flux.Payload) bool

func (*EditorStore) Name

func (s *EditorStore) Name() string

func (*EditorStore) Root

func (s *EditorStore) Root() gotypes.Object

func (*EditorStore) Type

func (s *EditorStore) Type() gotypes.Type

type EmptyStore

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

func NewEmptyStore

func NewEmptyStore(a *App) *EmptyStore

func (*EmptyStore) Handle

func (s *EmptyStore) Handle(payload *flux.Payload) bool

type InjectorStore

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

func NewInjectorStore

func NewInjectorStore(a *App) *InjectorStore

func (*InjectorStore) Handle

func (s *InjectorStore) Handle(payload *flux.Payload) bool

type PackageStore

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

func NewPackageStore

func NewPackageStore(a *App) *PackageStore

func (*PackageStore) DisplayName

func (s *PackageStore) DisplayName(path string) string

func (*PackageStore) DisplayPath

func (s *PackageStore) DisplayPath(path string) string

func (*PackageStore) Fresh

func (s *PackageStore) Fresh() bool

Fresh is true if current cache matches the previously downloaded archives

func (*PackageStore) Handle

func (s *PackageStore) Handle(payload *flux.Payload) bool

func (*PackageStore) ObjectsHashes

func (s *PackageStore) ObjectsHashes() map[string]string

func (*PackageStore) ObjectsInFile

func (s *PackageStore) ObjectsInFile(path, file string) map[string]gotypes.Object

func (*PackageStore) PackageName

func (s *PackageStore) PackageName(path string) string

func (*PackageStore) Path

func (s *PackageStore) Path() string

func (*PackageStore) ResolveType

func (s *PackageStore) ResolveType(t gotypes.Type, path, file string, data dst.Expr) gotypes.Type

ResolveType resolves Reference, Named, Pointer or Interface types to their underlying types. Tries to return one of: Basic, Array, Slice, Struct, Tuple, Signature, Map, or Chan. If the interface cannot be resolved or data == nil, it may return *Interface. If the reference can't be resolved, it may return *Reference.

func (*PackageStore) SortedObjectsInFile

func (s *PackageStore) SortedObjectsInFile(path, file string) []gotypes.Object

func (*PackageStore) SortedSourceFiles

func (s *PackageStore) SortedSourceFiles(path string) []string

func (*PackageStore) SortedSourcePackages

func (s *PackageStore) SortedSourcePackages() []string

func (*PackageStore) Source

func (s *PackageStore) Source() map[string]map[string]string

func (*PackageStore) SourceHashes

func (s *PackageStore) SourceHashes() map[string]string

type PageStore

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

func NewPageStore

func NewPageStore(app *App) *PageStore

func (*PageStore) CurrentPackage

func (s *PageStore) CurrentPackage() string

func (*PageStore) Handle

func (s *PageStore) Handle(payload *flux.Payload) bool

func (*PageStore) SplitSizes

func (s *PageStore) SplitSizes() []float64

type StoreFunc

type StoreFunc func(a *App) flux.StoreInterface

func GetExternalStoreFunc

func GetExternalStoreFunc(id models.Id) StoreFunc

type TagStore

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

func NewTagStore

func NewTagStore(a *App) *TagStore

func (*TagStore) Handle

func (s *TagStore) Handle(payload *flux.Payload) bool

func (*TagStore) Tags

func (s *TagStore) Tags() []string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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