memory

package
v1.14.0 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

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