mydomain

package
v0.135.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2023 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 Comment

type Comment struct {
	ID      CommentID
	Title   string
	Content string

	ReviewState string `enum:"accept;pending;reject;"`
}

type CommentAuditor

type CommentAuditor struct {
	NoteRepository CommentRepository
}

func (CommentAuditor) Review

func (nal CommentAuditor) Review(ctx context.Context, id CommentID) error

type CommentID

type CommentID string

type CommentRepository

type CommentRepository interface {
	crud.Creator[Comment]               // C
	crud.ByIDFinder[Comment, CommentID] // R
	crud.Updater[Comment]               // U
	crud.ByIDDeleter[CommentID]         // D
}

type CommentRepositoryWithoutEmbedding

type CommentRepositoryWithoutEmbedding interface {
	Create(ctx context.Context, ptr *Comment) error
	FindByID(ctx context.Context, id CommentID) (ent Comment, found bool, err error)
	Update(ctx context.Context, ptr *Comment) error
	DeleteByID(ctx context.Context, id CommentID) error
}

Jump to

Keyboard shortcuts

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