project

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Project

type Project struct {
	ID          string     `json:"id"`
	Name        string     `json:"name"`
	Description string     `json:"description,omitempty"`
	OwnerID     string     `json:"owner_id"`
	CreatedAt   time.Time  `json:"created_at"`
	UpdatedAt   time.Time  `json:"updated_at"`
	DeletedAt   *time.Time `json:"deleted_at,omitempty"`
}

Project represents a project/resource that users can access.

Purpose: Entity representing a resource boundary for authorization. Domain: Platform Invariants: ID must be unique. OwnerID must exist.

type ProjectRepository

type ProjectRepository interface {
	// Create creates a new project
	Create(ctx context.Context, project *Project) error

	// GetByID retrieves a project by ID
	GetByID(ctx context.Context, id string) (*Project, error)

	// GetByName retrieves a project by name
	GetByName(ctx context.Context, name string) (*Project, error)

	// Update updates project information
	Update(ctx context.Context, project *Project) error

	// Delete soft-deletes a project
	Delete(ctx context.Context, id string) error

	// ListByOwner retrieves all projects owned by a user
	ListByOwner(ctx context.Context, ownerID string) ([]*Project, error)

	// ListByUser retrieves all projects a user has access to
	ListByUser(ctx context.Context, userID string) ([]*Project, error)
}

ProjectRepository defines the interface for project persistence.

Purpose: Abstraction for managing resource boundary storage. Domain: Platform

Jump to

Keyboard shortcuts

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