session

package
v0.52.1 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2025 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateSession

func CreateSession(workspaceDir, configDir string) func(c *gin.Context)

func DeleteSession

func DeleteSession(configDir string) func(c *gin.Context)

func GetSessionCommandLogs

func GetSessionCommandLogs(configDir string) func(c *gin.Context)

func ListSessions

func ListSessions(c *gin.Context)

func SessionExecuteCommand

func SessionExecuteCommand(configDir string) func(c *gin.Context)

Types

type Command

type Command struct {
	Id       string `json:"id" validate:"required"`
	Command  string `json:"command" validate:"required"`
	ExitCode *int   `json:"exitCode,omitempty" validate:"optional"`

} // @name Command

func (*Command) LogFilePath

func (c *Command) LogFilePath(sessionDir string) string

type CreateSessionRequest

type CreateSessionRequest struct {
	SessionId string `json:"sessionId" validate:"required"`

} // @name CreateSessionRequest

type Session

type Session struct {
	SessionId string     `json:"sessionId" validate:"required"`
	Commands  []*Command `json:"commands" validate:"required"`

} // @name Session

type SessionExecuteRequest

type SessionExecuteRequest struct {
	Command string `json:"command" validate:"required"`
	Async   bool   `json:"async" validate:"optional"`

} // @name SessionExecuteRequest

type SessionExecuteResponse

type SessionExecuteResponse struct {
	CommandId *string `json:"cmdId" validate:"optional"`
	Output    *string `json:"output" validate:"optional"`
	ExitCode  *int    `json:"exitCode" validate:"optional"`

} // @name SessionExecuteResponse

Jump to

Keyboard shortcuts

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