domain

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2024 License: MIT Imports: 3 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 {
	ID           int32
	PublicID     string
	Name         string
	Description  string
	Tags         []string
	ThumbnailURL string
	WebsiteURL   string
	Live         bool
	CreatedAt    time.Time
	UpdatedAt    time.Time
	PostID       int32
}

type ProjectCreate

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

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