Skip to content

Commit

Permalink
Improves cast comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Ciro S. Costa committed Jul 2, 2018
1 parent 7d56ecd commit 993efe6
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion cast/cast.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,29 @@ type Header struct {
} `json:"env,omitempty"`
}

// Event represents terminal inputs that get recorded by asciinema.
type Event struct {
// Time indicates when this event happened, represented as the number
// of seconds since the beginning of the recording session.
Time float64

// Type represents the type of the data that's been recorded.
//
// Two types are possible:
// - "o": data written to stdout; and
// - "i": data read from stdin.
Type string

// Data represents the data recorded from the terminal.
Data string
}

// Cast represents the whole asciinema session.
type Cast struct {
Header Header
// Header presents the recording metadata.
Header Header

// EventStream contains all the events that were generated during
// the recording.
EventStream []*Event
}

0 comments on commit 993efe6

Please sign in to comment.