26 lines
735 B
Go
26 lines
735 B
Go
package domain
|
|
|
|
import "time"
|
|
|
|
type SessionStatus string
|
|
|
|
const (
|
|
SessionStatusCreated SessionStatus = "created"
|
|
SessionStatusRunning SessionStatus = "running"
|
|
SessionStatusStopped SessionStatus = "stopped"
|
|
SessionStatusExited SessionStatus = "exited"
|
|
SessionStatusError SessionStatus = "error"
|
|
)
|
|
|
|
type Session struct {
|
|
ID string `json:"id"`
|
|
Name string `json:"name"`
|
|
AgentID string `json:"agentId"`
|
|
Command string `json:"command"`
|
|
Status SessionStatus `json:"status"`
|
|
CreatedAt time.Time `json:"createdAt"`
|
|
StartedAt *time.Time `json:"startedAt,omitempty"`
|
|
ExitedAt *time.Time `json:"exitedAt,omitempty"`
|
|
ExitCode *int `json:"exitCode,omitempty"`
|
|
}
|