stores

package
v0.0.0-...-11ed053 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2020 License: MIT Imports: 41 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

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

	Archive    *ArchiveStore
	Editor     *EditorStore
	Connection *ConnectionStore
	Local      *LocalStore
	Scanner    *ScannerStore
	Compile    *CompileStore
	Share      *ShareStore
	Request    *RequestStore
	Deploy     *DeployStore
	Page       *PageStore
	Source     *SourceStore
	History    *HistoryStore
}

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) Fail

func (a *App) Fail(err error)

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) Watch

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

type ArchiveStore

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

func NewArchiveStore

func NewArchiveStore(app *App) *ArchiveStore

func (*ArchiveStore) AllFresh

func (s *ArchiveStore) AllFresh() bool

func (*ArchiveStore) Cache

func (s *ArchiveStore) Cache() map[string]CacheItem

func (*ArchiveStore) CacheStrings

func (s *ArchiveStore) CacheStrings() map[string]string

func (*ArchiveStore) Compile

func (s *ArchiveStore) Compile(path string, tags []string) ([]Dep, error)

func (*ArchiveStore) Fresh

func (s *ArchiveStore) Fresh(mainPath string) bool

Fresh is true if current cache matches the previously downloaded archives

func (*ArchiveStore) Handle

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

type CacheItem

type CacheItem struct {
	Hash    string
	Archive *compiler.Archive // This archive is stripped of JS
	Js      []byte
}

type CompileStore

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

func NewCompileStore

func NewCompileStore(app *App) *CompileStore

func (*CompileStore) Compiled

func (s *CompileStore) Compiled() bool

func (*CompileStore) Compiling

func (s *CompileStore) Compiling() bool

func (*CompileStore) Handle

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

func (*CompileStore) Tags

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

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 Dep

type Dep struct {
	Path string
	Js   []byte
}

type DeployStore

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

func NewDeployStore

func NewDeployStore(app *App) *DeployStore

func (*DeployStore) Handle

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

func (*DeployStore) Index

func (s *DeployStore) Index() string

func (*DeployStore) LoaderJs

func (s *DeployStore) LoaderJs() string

type EditorStore

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

func NewEditorStore

func NewEditorStore(app *App) *EditorStore

func (*EditorStore) CurrentFile

func (s *EditorStore) CurrentFile() string

func (*EditorStore) CurrentPackage

func (s *EditorStore) CurrentPackage() string

func (*EditorStore) Handle

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

func (*EditorStore) Loaded

func (s *EditorStore) Loaded() bool

func (*EditorStore) Sizes

func (s *EditorStore) Sizes() []float64

type EmptyStore

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

func NewEmptyStore

func NewEmptyStore(app *App) *EmptyStore

func (*EmptyStore) Handle

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

type HistoryStore

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

func NewHistoryStore

func NewHistoryStore(app *App) *HistoryStore

func (*HistoryStore) Handle

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

type LocalStore

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

func NewLocalStore

func NewLocalStore(app *App) *LocalStore

func (*LocalStore) Handle

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

func (*LocalStore) Initialized

func (s *LocalStore) Initialized() bool

type PageStore

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

func NewPageStore

func NewPageStore(app *App) *PageStore

func (*PageStore) Console

func (s *PageStore) Console() bool

func (*PageStore) Handle

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

func (*PageStore) Minify

func (s *PageStore) Minify() bool

func (*PageStore) ModalOpen

func (s *PageStore) ModalOpen(modal models.Modal) bool

func (*PageStore) ShowAllDeps

func (s *PageStore) ShowAllDeps() bool

type RequestStore

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

func NewRequestStore

func NewRequestStore(app *App) *RequestStore

func (*RequestStore) Handle

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

type ScannerStore

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

func NewScannerStore

func NewScannerStore(app *App) *ScannerStore

func (*ScannerStore) AllImports

func (s *ScannerStore) AllImports() map[string]bool

func (*ScannerStore) AllImportsOrdered

func (s *ScannerStore) AllImportsOrdered() []string

func (*ScannerStore) Clashes

func (s *ScannerStore) Clashes() map[string]map[string]bool

func (*ScannerStore) DisplayName

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

func (*ScannerStore) DisplayPath

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

func (*ScannerStore) Handle

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

func (*ScannerStore) Imports

func (s *ScannerStore) Imports(path string) []string

Imports returns all the imports from all files in a package

func (*ScannerStore) Main

func (s *ScannerStore) Main() (string, int)

Main is the path of the main package

func (*ScannerStore) MainPackages

func (s *ScannerStore) MainPackages() map[string]bool

func (*ScannerStore) Name

func (s *ScannerStore) Name(path string) string

func (*ScannerStore) Names

func (s *ScannerStore) Names() map[string]string

type ShareStore

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

func NewShareStore

func NewShareStore(app *App) *ShareStore

func (*ShareStore) Handle

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

type SourceStore

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

func NewSourceStore

func NewSourceStore(app *App) *SourceStore

func (*SourceStore) Contents

func (s *SourceStore) Contents(path, name string) string

func (*SourceStore) Count

func (s *SourceStore) Count() int

func (*SourceStore) Current

func (s *SourceStore) Current() string

func (*SourceStore) Filenames

func (s *SourceStore) Filenames(path string) []string

func (*SourceStore) Files

func (s *SourceStore) Files(path string) map[string]string

func (*SourceStore) Handle

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

func (*SourceStore) HasFile

func (s *SourceStore) HasFile(path, name string) bool

func (*SourceStore) HasPackage

func (s *SourceStore) HasPackage(path string) bool

func (*SourceStore) Packages

func (s *SourceStore) Packages() []string

func (*SourceStore) SingleFile

func (s *SourceStore) SingleFile() (path, name, contents string)

SingleFile returns a random file in a random package. Use for when Count() == 1

func (*SourceStore) SinglePackage

func (s *SourceStore) SinglePackage() (path string, files map[string]string)

SinglePackage returns a random package. Use for when len(s.source) == 1

func (*SourceStore) Source

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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