handler

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2021 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 Notes

type Notes struct {
	Stream streamPb.StreamService
}

Notes implements the notes proto definition

func New

func New(c client.Client) *Notes

New returns an initialized Notes

func (*Notes) Create

func (h *Notes) Create(ctx context.Context, req *pb.CreateRequest, rsp *pb.CreateResponse) error

Create inserts a new note in the store

func (*Notes) Delete

func (h *Notes) Delete(ctx context.Context, req *pb.DeleteRequest, rsp *pb.DeleteResponse) error

Delete removes the note from the store, looking up using ID

func (*Notes) List

func (h *Notes) List(ctx context.Context, req *pb.ListRequest, rsp *pb.ListResponse) error

List returns all of the notes in the store

func (*Notes) Read

func (h *Notes) Read(ctx context.Context, req *pb.ReadRequest, rsp *pb.ReadResponse) error

func (*Notes) Subscribe

func (h *Notes) Subscribe(ctx context.Context, req *pb.SubscribeRequest, stream pb.Notes_SubscribeStream) error

func (*Notes) Update

func (h *Notes) Update(ctx context.Context, req *pb.UpdateRequest, rsp *pb.UpdateResponse) error

Update is a unary API which updates a note in the store

Jump to

Keyboard shortcuts

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