ssh

package
v0.0.0-...-1e996ec Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CastMetadata

type CastMetadata struct {
	Version       int      `json:"version"`
	Width         int      `json:"width"`
	Height        int      `json:"height"`
	Timestamp     UnixTime `json:"timestamp"`
	Command       string   `json:"command,omitempty"`
	SrcNode       string   `json:"srcNode"`
	SrcNodeID     string   `json:"srcNodeID"`
	SrcNodeTags   string   `json:"srcNodeTags,omitempty"`
	SrcNodeUser   string   `json:"srcNodeUser,omitempty"`
	SrcNodeUserID int64    `json:"srcNodeUserID,omitempty"`
	SSHUser       string   `json:"sshUser"`
	LocalUser     string   `json:"localUser"`
	ConnectionID  string   `json:"connectionID"`
}

See https://docs.asciinema.org/manual/asciicast/v2/ and https://github.com/tailscale/tailscale/blob/main/ssh/tailssh/tailssh.go#L1718-L1740

type RecordingService

type RecordingService struct {
	Dir string
}

func NewRecordingService

func NewRecordingService(c types.SSHRecorderConfig) (*RecordingService, error)

func (*RecordingService) Record

func (rec *RecordingService) Record(s io.ReadCloser) error

type UnixTime

type UnixTime struct {
	time.Time
}

Taken from https://ikso.us/posts/unmarshal-timestamp-as-time/

func (UnixTime) MarshalJSON

func (u UnixTime) MarshalJSON() ([]byte, error)

func (*UnixTime) UnmarshalJSON

func (u *UnixTime) UnmarshalJSON(b []byte) error

Jump to

Keyboard shortcuts

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