project

package
v1.0.0 Latest Latest
Warning

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

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

Documentation

Overview

Package project manages Docker Compose project history and metadata.

It tracks active and recently stopped projects, persisting data to JSON for display in the dashboard and quick restart functionality.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Project

type Project struct {
	Name        string    `json:"name"`
	WorkingDir  string    `json:"working_dir"`
	ConfigFiles string    `json:"config_files"`
	LastActive  time.Time `json:"last_active"`
	Services    []string  `json:"services"`
	Active      bool      `json:"active"`
}

Project represents a docker-compose project

type Store

type Store struct {
	// contains filtered or unexported fields
}

Store manages project history with persistence

func NewStore

func NewStore(filePath string) *Store

NewStore creates a new project store with optional persistence

func (*Store) Count

func (s *Store) Count() int

Count returns the number of projects in the store

func (*Store) Get

func (s *Store) Get(name string) *Project

Get returns a project by name

func (*Store) List

func (s *Store) List(activeOnly bool) []*Project

List returns all projects, optionally filtered by active status

func (*Store) ListActive

func (s *Store) ListActive() []*Project

ListActive returns only active projects

func (*Store) ListInactive

func (s *Store) ListInactive() []*Project

ListInactive returns only inactive projects

func (*Store) Remove

func (s *Store) Remove(name string)

Remove removes a project from the store

func (*Store) SetActive

func (s *Store) SetActive(name string, active bool)

SetActive marks a project as active or inactive

func (*Store) SetAllInactive

func (s *Store) SetAllInactive()

SetAllInactive marks all projects as inactive

func (*Store) Update

func (s *Store) Update(p *Project)

Update adds or updates a project in the store

Jump to

Keyboard shortcuts

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