Documentation
¶
Overview ¶
Package bookmark creates, loads and updates saved HTTP and HTTPS links.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateCommand ¶
CreateCommand supplies raw values for a new bookmark; optional collections may be empty.
type CreateHandler ¶
type CreateHandler struct {
// contains filtered or unexported fields
}
CreateHandler validates input, assigns identity and lifecycle metadata, and saves a bookmark.
func NewCreateHandler ¶
func NewCreateHandler(repository ports.BookmarkRepository, ids ports.IDGenerator) *CreateHandler
NewCreateHandler creates the use-case handler with its dependencies.
func (*CreateHandler) Handle ¶
func (handler *CreateHandler) Handle(ctx context.Context, command CreateCommand) (CreateResult, error)
Handle validates raw input before persisting a new bookmark and its index projection.
type CreateResult ¶
CreateResult contains the bookmark returned after a successful create operation.
type GetHandler ¶
type GetHandler struct {
// contains filtered or unexported fields
}
GetHandler loads a bookmark from its source document and verifies the requested identity.
func NewGetHandler ¶
func NewGetHandler(repository ports.BookmarkRepository) *GetHandler
NewGetHandler creates the use-case handler with its dependencies.
type GetQuery ¶
type GetQuery struct {
ID string
}
GetQuery identifies a bookmark by its stable UUID.
type UpdateCommand ¶
UpdateCommand replaces the editable fields of an existing bookmark. Empty optional values clear their previous contents.
type UpdateHandler ¶
type UpdateHandler struct {
// contains filtered or unexported fields
}
UpdateHandler validates replacement values and retains the bookmark's identity and creation time.
func NewUpdateHandler ¶
func NewUpdateHandler(repository ports.BookmarkRepository) *UpdateHandler
NewUpdateHandler creates the use-case handler with its dependencies.
func (*UpdateHandler) Handle ¶
func (handler *UpdateHandler) Handle(ctx context.Context, command UpdateCommand) (UpdateResult, error)
Handle loads the existing bookmark, validates its replacement and persists the updated entity.
type UpdateResult ¶
UpdateResult contains the bookmark returned after a successful update operation.