Help us shape the future of Go! Take the 2026 Go Developer Survey

sessions

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

func Delete(dir, sessionID string) error

func Save

func Save(dir string, s *SessionData) error

func UpdateStatus

func UpdateStatus(dir, sessionID, status, errMsg string) error

Types

type SessionData

type SessionData struct {
	ID         string `json:"id"`
	AgentID    string `json:"agent_id"`
	AgentName  string `json:"agent_name"`
	ProjectDir string `json:"project_dir"`
	Port       int    `json:"port"`
	CreatedAt  string `json:"created_at"`
	Status     string `json:"status"`
	Error      string `json:"error,omitempty"`
}

func List

func List(dir string) ([]SessionData, error)

func Load

func Load(dir, sessionID string) (*SessionData, error)

type Store

type Store[T any] struct {
	// contains filtered or unexported fields
}

func NewStore

func NewStore[T any](path string) *Store[T]

func (*Store[T]) Add

func (s *Store[T]) Add(entry T) error

func (*Store[T]) Load

func (s *Store[T]) Load() ([]T, error)

func (*Store[T]) Save

func (s *Store[T]) Save(entries []T) error

func (*Store[T]) Update

func (s *Store[T]) Update(fn func(entries *[]T) error) error

Jump to

Keyboard shortcuts

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