domain

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrProjectNotFound = errors.New("project not found")
)

Functions

This section is empty.

Types

type Project

type Project struct {
	CreatedAt    time.Time
	UpdatedAt    time.Time
	PublicID     string
	Name         string
	Description  string
	ThumbnailURL string
	WebsiteURL   string
	Tags         []string
	ID           int32
	PostID       int32
	Live         bool
}

func (Project) Compare added in v1.3.0

func (p Project) Compare(p2 Project) bool

type ProjectCreate

type ProjectCreate struct {
	PublicID     string
	Name         string
	Description  string
	ThumbnailURL string
	WebsiteURL   string
	Tags         []string
	PostID       int32
	Live         bool
}

type ProjectRepository

type ProjectRepository interface {
	CreateProject(ctx context.Context, project *ProjectCreate) (*Project, error)
	GetProject(ctx context.Context, id string) (*Project, error)
	GetProjects(ctx context.Context) ([]*Project, error)
}

type ProjectUsecase

type ProjectUsecase interface {
	Create(ctx context.Context, name, description, thumbnailURL, websiteURL string, live bool, tags []string, postId int32) (*Project, error)
	Get(ctx context.Context, id string) (*Project, error)
	GetProjects(ctx context.Context) ([]*Project, error)
}

Jump to

Keyboard shortcuts

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