diff

package
v0.0.0-...-c2bc880 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDetail

func NewDetail(params DetailParams) (*tea.Program, error)

func NewReconcile

func NewReconcile(params ShowParams) (*tea.Program, error)

func NewShow

func NewShow(params ShowParams) (*tea.Program, error)

Types

type Controller

type Controller interface {
	Next() []selector.Selector
	Process(context.Context, selector.Selector) (diff.Type, error)
}

type Detail

type Detail struct {
	Context         context.Context
	Error           error
	Spinner         spinner.Model
	InputPath       string
	Config          view.Config
	Controller      *controller.DiffController
	State           string
	DetailViewModel *component.DetailModel

	Logger hclog.Logger
}

func (*Detail) Init

func (v *Detail) Init() tea.Cmd

func (*Detail) Update

func (v *Detail) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*Detail) View

func (v *Detail) View() string

type DetailParams

type DetailParams struct {
	Controller *controller.DiffController
	Context    context.Context
	Debug      bool
	Path       string
}

type Reconcile

type Reconcile struct {
	Context       context.Context
	Config        view.Config
	State         string
	Input         help.Model
	InputPath     string
	ReconcileTree *component.TreeModel
	DiffTree      *component.TreeModel
	Spinner       spinner.Model
	API           *api.API
	Error         error

	Controller          *controller.DiffController
	ReconcileController *controller.ReconcileController

	Logger hclog.Logger
}

func (*Reconcile) Init

func (r *Reconcile) Init() tea.Cmd

func (*Reconcile) Update

func (r *Reconcile) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*Reconcile) View

func (r *Reconcile) View() string

type Show

type Show struct {
	Context   context.Context
	Config    view.Config
	State     string
	InputPath string
	DiffTree  *component.TreeModel
	Spinner   spinner.Model
	Error     error

	Controller *controller.DiffController

	Logger hclog.Logger
}

func (*Show) Init

func (v *Show) Init() tea.Cmd

func (*Show) Update

func (v *Show) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*Show) View

func (v *Show) View() string

type ShowParams

type ShowParams struct {
	Context context.Context
	Path    string
	Debug   bool
}

Jump to

Keyboard shortcuts

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