http

package
v0.0.15 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHappeningService added in v0.0.15

func NewHappeningService(client *Client) storage.HappeningService

func NewLogEntryService

func NewLogEntryService(client *Client) storage.LogEntryService

func NewLogNoteService

func NewLogNoteService(client *Client) storage.LogNoteService

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(serverAddr string, serverAuthToken string) *Client

type HappeningHttpService added in v0.0.15

type HappeningHttpService struct {
	// contains filtered or unexported fields
}

HappeningHttpService implements storage.HappeningService

func (*HappeningHttpService) Add added in v0.0.15

func (*HappeningHttpService) Delete added in v0.0.15

func (s *HappeningHttpService) Delete(ctx context.Context, id int64) error

func (*HappeningHttpService) List added in v0.0.15

func (*HappeningHttpService) Update added in v0.0.15

type LogEntryHttpService

type LogEntryHttpService struct {
	// contains filtered or unexported fields
}

LogEntryHttpService implements storage.LogEntryService

func (*LogEntryHttpService) Add

func (s *LogEntryHttpService) Add(entry models.LogEntry) (int64, error)

func (*LogEntryHttpService) Delete

func (s *LogEntryHttpService) Delete(id int64) error

func (*LogEntryHttpService) GetTree added in v0.0.12

func (s *LogEntryHttpService) GetTree(ctx context.Context, id int64, includeHistory bool) ([]models.LogEntry, error)

func (*LogEntryHttpService) List

func (*LogEntryHttpService) Move

func (s *LogEntryHttpService) Move(id int64, newParentID int64) error

func (*LogEntryHttpService) Update

func (s *LogEntryHttpService) Update(id int64, update models.LogEntryOptional) error

type LogNoteHttpService

type LogNoteHttpService struct {
	// contains filtered or unexported fields
}

LogNoteHttpService implements storage.LogNoteService

func (*LogNoteHttpService) Add

func (s *LogNoteHttpService) Add(entryID int64, note models.Note) (int64, error)

func (*LogNoteHttpService) Delete

func (s *LogNoteHttpService) Delete(entryID int64, noteID int64) error

func (*LogNoteHttpService) List

func (s *LogNoteHttpService) List(entryID int64, options storage.LogNoteListOptions) ([]models.Note, int64, error)

func (*LogNoteHttpService) ListForEntries

func (s *LogNoteHttpService) ListForEntries(entryIDs []int64) (map[int64][]models.Note, error)

func (*LogNoteHttpService) Update

func (s *LogNoteHttpService) Update(entryID int64, noteID int64, update models.NoteOptional) error

type OptionalNumber added in v0.0.15

type OptionalNumber string

OptionalNumber represents an optional number that can be null, empty string, or a number

func (OptionalNumber) Int64 added in v0.0.15

func (c OptionalNumber) Int64() (int64, error)

func (*OptionalNumber) UnmarshalJSON added in v0.0.15

func (c *OptionalNumber) UnmarshalJSON(data []byte) error

type Request added in v0.0.15

type Request struct {
	*RequestBase
	TodoID      OptionalNumber   `json:"todoID"`
	ThreadForID OptionalNumber   `json:"threadForID"`
	TodoStatus  TodoRecordStatus `json:"todoStatus"`
}

Request replicates ListHappeningReq from lifelog

type RequestBase added in v0.0.15

type RequestBase struct {
	Search string  `json:"search"`
	ID     int64   `json:"id"`
	IDs    []int64 `json:"ids"`

	ContextBefore int `json:"contextBefore"`
	ContextAhead  int `json:"contextAhead"`

	IncludeAutogen  string  `json:"includeAutogen"`
	NewerThanID     int64   `json:"newerThanID"`
	NeedCollections bool    `json:"needCollections"`
	CollectionIDs   []int64 `json:"collectionIDs"`

	ThreadID int64 `json:"threadID"`

	Offset int `json:"offset"`
	Limit  int `json:"limit"`
}

RequestBase replicates ListHappeningReqBase from lifelog

type ServerResponse

type ServerResponse struct {
	Code int             `json:"code"`
	Msg  string          `json:"msg"`
	Data json.RawMessage `json:"data"`
}

ServerResponse wraps all server responses

type TodoRecordStatus added in v0.0.15

type TodoRecordStatus string

TodoRecordStatus represents the status of a todo record

const (
	TodoRecordStatus_Init    TodoRecordStatus = ""
	TodoRecordStatus_Doing   TodoRecordStatus = "doing"
	TodoRecordStatus_Pending TodoRecordStatus = "pending"
	TodoRecordStatus_Pause   TodoRecordStatus = "pause"
	TodoRecordStatus_Expire  TodoRecordStatus = "expire"
	TodoRecordStatus_Done    TodoRecordStatus = "done"
	TodoRecordStatus_Archive TodoRecordStatus = "archived"
)

Jump to

Keyboard shortcuts

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