asciinema

package
v0.0.0-...-b64c738 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2022 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Title     string
	EnvShell  string
	EnvTerm   string
	Width     int
	Height    int
	Timestamp time.Time
}

type Env

type Env struct {
	Shell string `json:"SHELL"`
	Term  string `json:"TERM"`
}
type Header struct {
	Version   int    `json:"version"`
	Width     int    `json:"width"`
	Height    int    `json:"height"`
	Timestamp int64  `json:"timestamp"`
	Title     string `json:"title"`
	Env       Env    `json:"env"`
}

type Option

type Option func(options *Config)

func WithEnvShell

func WithEnvShell(shell string) Option

func WithEnvTerm

func WithEnvTerm(term string) Option

func WithHeight

func WithHeight(height int) Option

func WithTimestamp

func WithTimestamp(timestamp time.Time) Option

func WithTitle

func WithTitle(title string) Option

func WithWidth

func WithWidth(width int) Option

type Writer

type Writer struct {
	Config
	TimestampNano int64
	// contains filtered or unexported fields
}

func NewWriter

func NewWriter(w io.Writer, opts ...Option) *Writer

func (*Writer) WriteHeader

func (w *Writer) WriteHeader() error

func (*Writer) WriteRow

func (w *Writer) WriteRow(p []byte) error

func (*Writer) WriteStdout

func (w *Writer) WriteStdout(ts float64, data []byte) error

Jump to

Keyboard shortcuts

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