loader

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	STORY_BORG_FILE = "/tmp/replay-loader-story.borg"
)

Variables

View Source
var Load stories.InitFunc = func(ctx context.Context) (mux.Screen, error) {
	if _, err := os.Stat(STORY_BORG_FILE); os.IsNotExist(err) {
		if err := createBorg(); err != nil {
			return nil, err
		}
	}

	return New(
		ctx,
		params.New(),
		bind.NewBindScope(nil),
		bind.NewBindScope(nil),
		STORY_BORG_FILE,
	), nil
}

Functions

func New

func New(
	ctx context.Context,
	params *params.Parameters,
	timeBinds, copyBinds *bind.BindScope,
	path string,
	options ...replay.Option,
) mux.Screen

Types

type Loader

type Loader struct {
	util.Lifetime
	// contains filtered or unexported fields
}

Loader loads a .borg file from disk and opens its contents in a Replay.

func (*Loader) Init

func (l *Loader) Init() tea.Cmd

func (*Loader) Update

func (l *Loader) Update(msg tea.Msg) (taro.Model, tea.Cmd)

func (*Loader) View

func (l *Loader) View(state *tty.State)

Jump to

Keyboard shortcuts

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