Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateNoteRequest ¶
type CreateNoteRequest struct {
Title string `json:"title"`
Content string `json:"content"`
Type string `json:"type"`
Tags []string `json:"tags,omitempty"`
Metadata map[string]interface{} `json:"metadata,omitempty"`
}
CreateNoteRequest represents the DTO for creating a note
type ListNotesRequest ¶
type ListNotesRequest struct {
Limit int `json:"limit,omitempty"`
Offset int `json:"offset,omitempty"`
Search string `json:"search,omitempty"`
Tags []string `json:"tags,omitempty"`
Type string `json:"type,omitempty"`
OrderBy string `json:"order_by,omitempty"`
OrderDir string `json:"order_dir,omitempty"`
}
ListNotesRequest represents the DTO for listing notes
type ListNotesResponse ¶
ListNotesResponse represents the DTO for listing response
type Note ¶
type Note struct {
ID int64 `json:"id"`
Title string `json:"title"`
Content string `json:"content"`
Type string `json:"type"`
Tags []string `json:"tags,omitempty"`
Metadata map[string]interface{} `json:"metadata,omitempty"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
Note represents the domain model for a note entity
type Storage ¶
type Storage interface {
// Create creates a new note
Create(ctx context.Context, req CreateNoteRequest) (*Note, error)
// Get retrieves a note by ID
Get(ctx context.Context, id int64) (*Note, error)
// Update updates an existing note
Update(ctx context.Context, id int64, req UpdateNoteRequest) (*Note, error)
// Delete deletes a note by ID
Delete(ctx context.Context, id int64) error
// List lists notes with pagination and filtering
List(ctx context.Context, req ListNotesRequest) (*ListNotesResponse, error)
}
Storage defines the interface for note storage operations
type UpdateNoteRequest ¶
type UpdateNoteRequest struct {
Title *string `json:"title,omitempty"`
Content *string `json:"content,omitempty"`
Type *string `json:"type,omitempty"`
Tags []string `json:"tags,omitempty"`
Metadata map[string]interface{} `json:"metadata,omitempty"`
}
UpdateNoteRequest represents the DTO for updating a note
Click to show internal directories.
Click to hide internal directories.