note

package
v0.0.0-...-9091af8 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Implementation

type Implementation struct {
	desc.Unimplemented
	// contains filtered or unexported fields
}

func NewNoteServerImplementation

func NewNoteServerImplementation(service Service) *Implementation

func (*Implementation) CreateNote

func (i *Implementation) CreateNote(w http.ResponseWriter, r *http.Request, workspace desc.Workspace)

func (*Implementation) GetNoteById

func (i *Implementation) GetNoteById(w http.ResponseWriter, r *http.Request, workspace desc.Workspace, noteId desc.NoteId)

func (*Implementation) ListNotes

func (i *Implementation) ListNotes(w http.ResponseWriter, r *http.Request, workspace desc.Workspace)

func (*Implementation) UpdateNote

func (i *Implementation) UpdateNote(w http.ResponseWriter, r *http.Request, workspace desc.Workspace, noteId desc.NoteId)

type Service

type Service interface {
	Create(ctx context.Context, note *models.Note) (*models.Note, error)
	Update(ctx context.Context, note *models.Note, filename string, file *bytes.Buffer) (*models.Note, error)
	GetByWorkspace(ctx context.Context, workspace string) ([]*models.Note, error)
	GetByID(ctx context.Context, workspace string, ID string) (*models.Note, error)
}

Jump to

Keyboard shortcuts

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