memory

package
v1.19.0 Latest Latest
Warning

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

Go to latest
Published: May 4, 2026 License: Apache-2.0 Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ProjectRepository

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

ProjectRepository is an in-memory implementation of project.Repository

func NewProjectRepository

func NewProjectRepository() *ProjectRepository

NewProjectRepository creates a new in-memory project repository

func (*ProjectRepository) Clear

func (r *ProjectRepository) Clear()

Clear removes all projects (useful for testing)

func (*ProjectRepository) Count

func (r *ProjectRepository) Count() int

Count returns the number of projects

func (*ProjectRepository) Delete

func (r *ProjectRepository) Delete(id string) error

Delete removes a project

func (*ProjectRepository) Exists

func (r *ProjectRepository) Exists(id string) (bool, error)

Exists checks if a project exists

func (*ProjectRepository) ExistsByName

func (r *ProjectRepository) ExistsByName(name string) (bool, error)

ExistsByName checks if a project with given name exists

func (*ProjectRepository) FindAll

func (r *ProjectRepository) FindAll() ([]*project.Project, error)

FindAll retrieves all projects

func (*ProjectRepository) FindByID

func (r *ProjectRepository) FindByID(id string) (*project.Project, error)

FindByID retrieves a project by its ID

func (*ProjectRepository) FindByName

func (r *ProjectRepository) FindByName(name string) (*project.Project, error)

FindByName retrieves a project by its name

func (*ProjectRepository) Save

func (r *ProjectRepository) Save(proj *project.Project) error

Save persists a project

Jump to

Keyboard shortcuts

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