Documentation ¶
Index ¶
- func AssertDeepEqual[T any](t testing.TB, got, want T)
- func AuthorizeFor(t testing.TB, server *server.Server, notebook, password string) string
- func DecodeJson[T any](t testing.TB, res *httptest.ResponseRecorder) T
- func DeleteAPIRequest(t testing.TB, path string) *http.Request
- func EncodeJson[T any](t testing.TB, got T) string
- func GetAPIRequest(t testing.TB, path string) *http.Request
- func HashWithDefault(password string) string
- func PostAPIRequest(t testing.TB, path string, body string, headers http.Header) *http.Request
- func PutAPIRequest(t testing.TB, path string, body string, headers http.Header) *http.Request
- func ValidateWith(notebook string, token []byte, issuerKey string) bool
- type StubServerStore
- func (store *StubServerStore) CreateNote(data *model.Note) error
- func (store *StubServerStore) CreateNotebook(id string, name string, protection auth.ProtectionLevel, hash string) error
- func (store *StubServerStore) DeleteNote(id string) error
- func (store *StubServerStore) DeleteNotebook(id string) error
- func (store *StubServerStore) GetNote(id string) (*model.Note, error)
- func (store *StubServerStore) GetNoteByOrder(notebook string, order uint) (*model.Note, error)
- func (store *StubServerStore) GetNotebook(id string) (*model.Notebook, error)
- func (store *StubServerStore) GetNotesByNotebook(id string) ([]model.Note, error)
- func (store *StubServerStore) NoteCount(notebook string) uint
- func (store *StubServerStore) UpdateNote(data *model.Note) (model.Note, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertDeepEqual ¶
func AuthorizeFor ¶
func DecodeJson ¶
func DecodeJson[T any](t testing.TB, res *httptest.ResponseRecorder) T
func HashWithDefault ¶
func PostAPIRequest ¶
func PutAPIRequest ¶
Types ¶
type StubServerStore ¶
func NewStubServerStore ¶
func NewStubServerStore() *StubServerStore
func (*StubServerStore) CreateNote ¶
func (store *StubServerStore) CreateNote(data *model.Note) error
func (*StubServerStore) CreateNotebook ¶
func (store *StubServerStore) CreateNotebook(id string, name string, protection auth.ProtectionLevel, hash string) error
func (*StubServerStore) DeleteNote ¶
func (store *StubServerStore) DeleteNote(id string) error
func (*StubServerStore) DeleteNotebook ¶
func (store *StubServerStore) DeleteNotebook(id string) error
func (*StubServerStore) GetNote ¶
func (store *StubServerStore) GetNote(id string) (*model.Note, error)
func (*StubServerStore) GetNoteByOrder ¶
func (*StubServerStore) GetNotebook ¶
func (store *StubServerStore) GetNotebook(id string) (*model.Notebook, error)
func (*StubServerStore) GetNotesByNotebook ¶
func (store *StubServerStore) GetNotesByNotebook(id string) ([]model.Note, error)
func (*StubServerStore) NoteCount ¶
func (store *StubServerStore) NoteCount(notebook string) uint
func (*StubServerStore) UpdateNote ¶
Click to show internal directories.
Click to hide internal directories.