metadata

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2025 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SaveMetadata

func SaveMetadata(projectPath string, m *Metadata) error

func WithLock

func WithLock(projectPath string, fn func(*Metadata) error) error

Types

type Metadata

type Metadata struct {
	Sessions map[string]Session `json:"sessions"`
}

func LoadMetadata

func LoadMetadata(projectPath string) (*Metadata, error)

func (*Metadata) GetGistID

func (m *Metadata) GetGistID(sessionID string) string

func (*Metadata) GetNextSessionID

func (m *Metadata) GetNextSessionID(sessionID string) string

func (*Metadata) GetPrevSessionID

func (m *Metadata) GetPrevSessionID(sessionID string) string

func (*Metadata) LinkSession

func (m *Metadata) LinkSession(latestID, newID string)

func (*Metadata) ResolveLatestSession

func (m *Metadata) ResolveLatestSession(startSessionID string) (latestSession, prevSession string)

func (*Metadata) SetGistID

func (m *Metadata) SetGistID(sessionID, gistID string)

type Session

type Session struct {
	PrevSessionID string    `json:"prev_session_id,omitempty"`
	NextSessionID string    `json:"next_session_id,omitempty"`
	GistID        string    `json:"gist_id,omitempty"`
	UpdatedAt     time.Time `json:"updated_at"`
}

Jump to

Keyboard shortcuts

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