notes

package
v0.0.0-...-9139af7 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2025 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Service    = &service{}
	Controller = &controller{}
	Module     = &gonethttp.Module{
		Pattern:    "/notes",
		Service:    Service,
		Controller: Controller,
		BeforeLoadFn: func(m *gonethttp.Module) {
			m.Middlewares = gonethttp.NewMiddlewares(
				internalmiddleware.AuthenticateAccessToken,
			)
		},
		RegisterRoutesFn: func(m *gonethttp.Module) {
			m.RegisterExactRoute(
				"GET /",
				Controller.ListUserNotes,
			)
			m.RegisterExactRoute(
				"POST /sync",
				Controller.SyncUserNotesByLastSyncedAt,
			)
		},
	}
)

Functions

This section is empty.

Types

type ListUserNotesResponseBody

type ListUserNotesResponseBody struct {
	gonethttpresponse.BaseJSendSuccessBody
	Data ListUserNotesResponseData `json:"data"`
}

ListUserNotesResponseBody is the response body DTO to list user notes

type ListUserNotesResponseData

type ListUserNotesResponseData struct {
	NotesID []int64 `json:"notes"`
}

ListUserNotesResponseData is the response data DTO to list user notes

type SyncUserNotesByLastSyncedAtResponseBody

type SyncUserNotesByLastSyncedAtResponseBody struct {
	gonethttpresponse.BaseJSendSuccessBody
	Data SyncUserNotesByLastSyncedAtResponseData `json:"data"`
}

SyncUserNotesByLastSyncedAtResponseBody is the response body DTO to sync user notes by last synced at timestamp

type SyncUserNotesByLastSyncedAtResponseData

type SyncUserNotesByLastSyncedAtResponseData struct {
	SyncNotes []*internalpostgresmodel.SyncUserNoteWithID `json:"sync_notes"`
}

SyncUserNotesByLastSyncedAtResponseData is the response data DTO to sync user notes by last synced at timestamp

Jump to

Keyboard shortcuts

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