Documentation
¶
Index ¶
- Constants
- Variables
- type CreateItemRequest
- type CreateTopicRequest
- type Event
- type Item
- type Service
- func (s *Service) BringItemToFront(ctx context.Context, noteID string) (Item, error)
- func (s *Service) ClearTrashTopic(ctx context.Context, topicID string) error
- func (s *Service) Close() error
- func (s *Service) CreateItem(ctx context.Context, req CreateItemRequest) (Item, error)
- func (s *Service) CreateTopic(ctx context.Context, req CreateTopicRequest) (Topic, error)
- func (s *Service) DeleteItem(ctx context.Context, noteID string) error
- func (s *Service) DeleteTopic(ctx context.Context, topicID string) error
- func (s *Service) DeleteTrashedItemPermanently(ctx context.Context, noteID string) error
- func (s *Service) RestoreItem(ctx context.Context, noteID string) (Item, error)
- func (s *Service) Snapshot(ctx context.Context) (Snapshot, error)
- func (s *Service) Subscribe(ctx context.Context, afterSeq int64) ([]Event, <-chan Event, error)
- func (s *Service) UpdateItem(ctx context.Context, req UpdateItemRequest) (Item, error)
- func (s *Service) UpdateTopic(ctx context.Context, req UpdateTopicRequest) (Topic, error)
- type Snapshot
- type Store
- type Topic
- type TrashItem
- type UpdateItemRequest
- type UpdateTopicRequest
Constants ¶
View Source
const ( RetentionHours = 72 DefaultStyleVersion = "note/v1" DefaultPreviewMaxRunes = 120 )
Variables ¶
View Source
var ( ErrTopicNotFound = errors.New("topic not found") ErrNoteNotFound = errors.New("note not found") ErrInvalidTopicName = errors.New("invalid topic name") ErrInvalidNoteTitle = errors.New("invalid note title") ErrInvalidNoteBody = errors.New("invalid note body") ErrInvalidColor = errors.New("invalid note color") ErrInvalidNoteID = errors.New("invalid note id") ErrInvalidTopicID = errors.New("invalid topic id") )
Functions ¶
This section is empty.
Types ¶
type CreateItemRequest ¶
type CreateTopicRequest ¶
type CreateTopicRequest struct {
Name string `json:"name"`
}
type Item ¶
type Item struct {
NoteID string `json:"note_id"`
TopicID string `json:"topic_id"`
Title string `json:"title"`
Headline string `json:"headline,omitempty"`
Body string `json:"body"`
PreviewText string `json:"preview_text"`
CharacterCount int `json:"character_count"`
SizeBucket int `json:"size_bucket"`
StyleVersion string `json:"style_version"`
ColorToken string `json:"color_token"`
X float64 `json:"x"`
Y float64 `json:"y"`
ZIndex int `json:"z_index"`
CreatedAtUnixMs int64 `json:"created_at_unix_ms"`
UpdatedAtUnixMs int64 `json:"updated_at_unix_ms"`
}
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) BringItemToFront ¶
func (*Service) ClearTrashTopic ¶
func (*Service) CreateItem ¶
func (*Service) CreateTopic ¶
func (*Service) DeleteTopic ¶
func (*Service) DeleteTrashedItemPermanently ¶
func (*Service) RestoreItem ¶
func (*Service) UpdateItem ¶
func (*Service) UpdateTopic ¶
type Topic ¶
type Topic struct {
TopicID string `json:"topic_id"`
Name string `json:"name"`
IconKey string `json:"icon_key"`
IconAccent string `json:"icon_accent"`
SortOrder int `json:"sort_order"`
CreatedAtUnixMs int64 `json:"created_at_unix_ms"`
UpdatedAtUnixMs int64 `json:"updated_at_unix_ms"`
DeletedAtUnixMs int64 `json:"deleted_at_unix_ms"`
}
type UpdateItemRequest ¶
type UpdateTopicRequest ¶
Click to show internal directories.
Click to hide internal directories.