fittings

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FittingsManager

type FittingsManager struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewManager

func NewManager(httpClient *http.Client, providers ...provider.FittingsProvider) *FittingsManager

func (*FittingsManager) AddFitting

func (m *FittingsManager) AddFitting(r *pb.FittingRecord) (ID int, fitting *pb.FittingRecord, err error)

func (*FittingsManager) AssignFittingToCharacter

func (m *FittingsManager) AssignFittingToCharacter(f *pb.FittingRecord, characterName string)

func (*FittingsManager) AvailableProviders added in v0.8.2

func (m *FittingsManager) AvailableProviders(ctx context.Context) map[string]provider.AvailabilityResult

func (*FittingsManager) ClearAssignments

func (m *FittingsManager) ClearAssignments()

func (*FittingsManager) DeleteFitting

func (m *FittingsManager) DeleteFitting(index int)

func (*FittingsManager) FetchFittingIDs added in v0.8.2

func (m *FittingsManager) FetchFittingIDs(ctx context.Context, provider string) []string

func (*FittingsManager) GetByID

func (m *FittingsManager) GetByID(ID int) *pb.FittingRecord

func (*FittingsManager) GetFittingForPilot

func (m *FittingsManager) GetFittingForPilot(characterName string) *pb.FittingRecord

func (*FittingsManager) ImportFittings added in v0.8.2

func (m *FittingsManager) ImportFittings(ctx context.Context, source string, callback func(current, max int)) error

func (*FittingsManager) LoadCache

func (m *FittingsManager) LoadCache() error

LoadCache loads records of fittings from cache file if it exists.

func (*FittingsManager) Model

func (m *FittingsManager) Model() *FittingsModel

func (*FittingsManager) PersistCache

func (m *FittingsManager) PersistCache() error

PersistCache stores current state to cache file

type FittingsModel

type FittingsModel struct {
	walk.TableModelBase
	walk.SorterBase
	// contains filtered or unexported fields
}

func (*FittingsModel) Checked

func (m *FittingsModel) Checked(row int) bool

Called by the TableView to retrieve if a given row is checked.

func (*FittingsModel) RowCount

func (m *FittingsModel) RowCount() int

func (*FittingsModel) SetChecked

func (m *FittingsModel) SetChecked(row int, checked bool) error

Called by the TableView when the user toggled the check box of a given row.

func (*FittingsModel) Sort

func (m *FittingsModel) Sort(col int, order walk.SortOrder) error

Called by the TableView to sort the model.

func (*FittingsModel) StyleCell

func (m *FittingsModel) StyleCell(style *walk.CellStyle)

func (*FittingsModel) Value

func (m *FittingsModel) Value(row, col int) interface{}

Called by the TableView when it needs the text to display for a given cell.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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