cmd

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SCHEMA string

Functions

This section is empty.

Types

type Command

type Command struct {
	ID          int64
	ExecutedAt  time.Time
	CompletedAt time.Time
	Session     int64
	Text        string
	Directory   string
	Prompted    int64
	Executed    int64
	Completed   int64
}

type CreateCommandParams

type CreateCommandParams struct {
	ExecutedAt  time.Time
	CompletedAt time.Time
	Session     int64
	Text        string
	Directory   string
	Prompted    int64
	Executed    int64
	Completed   int64
}

type CreateSelectionParams

type CreateSelectionParams struct {
	Command int64
	Input   bool
	FromRow int64
	FromCol int64
	ToRow   int64
	ToCol   int64
}

type DBTX

type DBTX interface {
	ExecContext(context.Context, string, ...interface{}) (sql.Result, error)
	PrepareContext(context.Context, string) (*sql.Stmt, error)
	QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error)
	QueryRowContext(context.Context, string, ...interface{}) *sql.Row
}

type ListCommandsRow

type ListCommandsRow struct {
	ID          int64
	ExecutedAt  time.Time
	CompletedAt time.Time
	Path        string
	Text        string
	Directory   string
	Prompted    int64
	Executed    int64
	Completed   int64
	Input       bool
	FromRow     int64
	FromCol     int64
	ToRow       int64
	ToCol       int64
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) CreateCommand

func (q *Queries) CreateCommand(ctx context.Context, arg CreateCommandParams) (int64, error)

func (*Queries) CreateSelection

func (q *Queries) CreateSelection(ctx context.Context, arg CreateSelectionParams) error

func (*Queries) CreateSession

func (q *Queries) CreateSession(ctx context.Context, path string) (int64, error)

func (*Queries) GetSession

func (q *Queries) GetSession(ctx context.Context, path string) (int64, error)

func (*Queries) ListCommands

func (q *Queries) ListCommands(ctx context.Context) ([]ListCommandsRow, error)

func (*Queries) ListSessions

func (q *Queries) ListSessions(ctx context.Context) ([]Session, error)

func (*Queries) RemoveCommandSelections

func (q *Queries) RemoveCommandSelections(ctx context.Context, command int64) error

func (*Queries) RemoveSession

func (q *Queries) RemoveSession(ctx context.Context, id int64) error

func (*Queries) RemoveSessionCommands

func (q *Queries) RemoveSessionCommands(ctx context.Context, session int64) error

func (*Queries) WithTx

func (q *Queries) WithTx(tx *sql.Tx) *Queries

type Selection

type Selection struct {
	ID      int64
	Command int64
	Input   bool
	FromRow int64
	FromCol int64
	ToRow   int64
	ToCol   int64
}

type Session

type Session struct {
	ID   int64
	Path string
}

Jump to

Keyboard shortcuts

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