Documentation
¶
Overview ¶
Package convert provides functions for converting BSR data into other formats.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrUnsupportedProtocol = errors.New("unsupported protocol") ErrMalformedBsr = errors.New("malformed bsr data file") )
Common convert errors.
Functions ¶
func ToAsciicast ¶
func ToAsciicast(ctx context.Context, session *bsr.Session, tmp storage.TempFile, connectionId string, options ...Option) (io.ReadCloser, error)
ToAsciicast accepts a bsr.Session and will convert the underlying BSR connection or channel file to an asciinema file. The tempFs will be used to write the asciinema file to disk It returns an io.Reader to the converted asciinema file. This supports the following options:
- WithChannelId to indicate this conversion should occur on a channel on a multiplexed session
- WithMinWidth to set a minimum width for the asciicast
- WithMinHeigh to set a minimum height for the asciicast
Types ¶
type Option ¶
type Option func(*options)
Option - how Options are passed as arguments
func WithChannelId ¶
WithChannelId provides and option to specify the channelId
func WithMinHeight ¶
WithMinHeight can be used to set a minimum height for playback.
func WithMinWidth ¶
WithMinWidth can be used to set a minimum width for playback.
Click to show internal directories.
Click to hide internal directories.