notes

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2023 License: Apache-2.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_proto_notes_proto protoreflect.FileDescriptor

Functions

func NewNotesEndpoints

func NewNotesEndpoints() []*api.Endpoint

func RegisterNotesHandler

func RegisterNotesHandler(s server.Server, hdlr NotesHandler, opts ...server.HandlerOption) error

Types

type CreateRequest

type CreateRequest struct {

	// note title
	Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
	// note text
	Text string `protobuf:"bytes,2,opt,name=text,proto3" json:"text,omitempty"`
	// contains filtered or unexported fields
}

Create a new note

func (*CreateRequest) Descriptor deprecated

func (*CreateRequest) Descriptor() ([]byte, []int)

Deprecated: Use CreateRequest.ProtoReflect.Descriptor instead.

func (*CreateRequest) GetText

func (x *CreateRequest) GetText() string

func (*CreateRequest) GetTitle

func (x *CreateRequest) GetTitle() string

func (*CreateRequest) ProtoMessage

func (*CreateRequest) ProtoMessage()

func (*CreateRequest) ProtoReflect

func (x *CreateRequest) ProtoReflect() protoreflect.Message

func (*CreateRequest) Reset

func (x *CreateRequest) Reset()

func (*CreateRequest) String

func (x *CreateRequest) String() string

type CreateResponse

type CreateResponse struct {

	// The created note
	Note *Note `protobuf:"bytes,1,opt,name=note,proto3" json:"note,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateResponse) Descriptor deprecated

func (*CreateResponse) Descriptor() ([]byte, []int)

Deprecated: Use CreateResponse.ProtoReflect.Descriptor instead.

func (*CreateResponse) GetNote

func (x *CreateResponse) GetNote() *Note

func (*CreateResponse) ProtoMessage

func (*CreateResponse) ProtoMessage()

func (*CreateResponse) ProtoReflect

func (x *CreateResponse) ProtoReflect() protoreflect.Message

func (*CreateResponse) Reset

func (x *CreateResponse) Reset()

func (*CreateResponse) String

func (x *CreateResponse) String() string

type DeleteRequest

type DeleteRequest struct {

	// specify the id of the note
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

Delete a note

func (*DeleteRequest) Descriptor deprecated

func (*DeleteRequest) Descriptor() ([]byte, []int)

Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead.

func (*DeleteRequest) GetId

func (x *DeleteRequest) GetId() string

func (*DeleteRequest) ProtoMessage

func (*DeleteRequest) ProtoMessage()

func (*DeleteRequest) ProtoReflect

func (x *DeleteRequest) ProtoReflect() protoreflect.Message

func (*DeleteRequest) Reset

func (x *DeleteRequest) Reset()

func (*DeleteRequest) String

func (x *DeleteRequest) String() string

type DeleteResponse

type DeleteResponse struct {
	Note *Note `protobuf:"bytes,1,opt,name=note,proto3" json:"note,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteResponse) Descriptor deprecated

func (*DeleteResponse) Descriptor() ([]byte, []int)

Deprecated: Use DeleteResponse.ProtoReflect.Descriptor instead.

func (*DeleteResponse) GetNote

func (x *DeleteResponse) GetNote() *Note

func (*DeleteResponse) ProtoMessage

func (*DeleteResponse) ProtoMessage()

func (*DeleteResponse) ProtoReflect

func (x *DeleteResponse) ProtoReflect() protoreflect.Message

func (*DeleteResponse) Reset

func (x *DeleteResponse) Reset()

func (*DeleteResponse) String

func (x *DeleteResponse) String() string

type EventsRequest added in v0.22.0

type EventsRequest struct {

	// optionally specify a note id
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

Specify the note to events

func (*EventsRequest) Descriptor deprecated added in v0.22.0

func (*EventsRequest) Descriptor() ([]byte, []int)

Deprecated: Use EventsRequest.ProtoReflect.Descriptor instead.

func (*EventsRequest) GetId added in v0.22.0

func (x *EventsRequest) GetId() string

func (*EventsRequest) ProtoMessage added in v0.22.0

func (*EventsRequest) ProtoMessage()

func (*EventsRequest) ProtoReflect added in v0.22.0

func (x *EventsRequest) ProtoReflect() protoreflect.Message

func (*EventsRequest) Reset added in v0.22.0

func (x *EventsRequest) Reset()

func (*EventsRequest) String added in v0.22.0

func (x *EventsRequest) String() string

type EventsResponse added in v0.22.0

type EventsResponse struct {

	// the event which occured; create, delete, update
	Event string `protobuf:"bytes,1,opt,name=event,proto3" json:"event,omitempty"`
	// the note which the operation occured on
	Note *Note `protobuf:"bytes,2,opt,name=note,proto3" json:"note,omitempty"`
	// contains filtered or unexported fields
}

func (*EventsResponse) Descriptor deprecated added in v0.22.0

func (*EventsResponse) Descriptor() ([]byte, []int)

Deprecated: Use EventsResponse.ProtoReflect.Descriptor instead.

func (*EventsResponse) GetEvent added in v0.22.0

func (x *EventsResponse) GetEvent() string

func (*EventsResponse) GetNote added in v0.22.0

func (x *EventsResponse) GetNote() *Note

func (*EventsResponse) ProtoMessage added in v0.22.0

func (*EventsResponse) ProtoMessage()

func (*EventsResponse) ProtoReflect added in v0.22.0

func (x *EventsResponse) ProtoReflect() protoreflect.Message

func (*EventsResponse) Reset added in v0.22.0

func (x *EventsResponse) Reset()

func (*EventsResponse) String added in v0.22.0

func (x *EventsResponse) String() string

type ListRequest

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

List all the notes

func (*ListRequest) Descriptor deprecated

func (*ListRequest) Descriptor() ([]byte, []int)

Deprecated: Use ListRequest.ProtoReflect.Descriptor instead.

func (*ListRequest) ProtoMessage

func (*ListRequest) ProtoMessage()

func (*ListRequest) ProtoReflect

func (x *ListRequest) ProtoReflect() protoreflect.Message

func (*ListRequest) Reset

func (x *ListRequest) Reset()

func (*ListRequest) String

func (x *ListRequest) String() string

type ListResponse

type ListResponse struct {

	// the list of notes
	Notes []*Note `protobuf:"bytes,1,rep,name=notes,proto3" json:"notes,omitempty"`
	// contains filtered or unexported fields
}

func (*ListResponse) Descriptor deprecated

func (*ListResponse) Descriptor() ([]byte, []int)

Deprecated: Use ListResponse.ProtoReflect.Descriptor instead.

func (*ListResponse) GetNotes

func (x *ListResponse) GetNotes() []*Note

func (*ListResponse) ProtoMessage

func (*ListResponse) ProtoMessage()

func (*ListResponse) ProtoReflect

func (x *ListResponse) ProtoReflect() protoreflect.Message

func (*ListResponse) Reset

func (x *ListResponse) Reset()

func (*ListResponse) String

func (x *ListResponse) String() string

type Note

type Note struct {

	// unique id for the note, generated if not specified
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// time at which the note was created
	Created string `protobuf:"bytes,2,opt,name=created,proto3" json:"created,omitempty"`
	// time at which the note was updated
	Updated string `protobuf:"bytes,3,opt,name=updated,proto3" json:"updated,omitempty"`
	// title of the note
	Title string `protobuf:"bytes,4,opt,name=title,proto3" json:"title,omitempty"`
	// text within the note
	Text string `protobuf:"bytes,5,opt,name=text,proto3" json:"text,omitempty"`
	// contains filtered or unexported fields
}

func (*Note) Descriptor deprecated

func (*Note) Descriptor() ([]byte, []int)

Deprecated: Use Note.ProtoReflect.Descriptor instead.

func (*Note) GetCreated

func (x *Note) GetCreated() string

func (*Note) GetId

func (x *Note) GetId() string

func (*Note) GetText

func (x *Note) GetText() string

func (*Note) GetTitle

func (x *Note) GetTitle() string

func (*Note) GetUpdated

func (x *Note) GetUpdated() string

func (*Note) ProtoMessage

func (*Note) ProtoMessage()

func (*Note) ProtoReflect

func (x *Note) ProtoReflect() protoreflect.Message

func (*Note) Reset

func (x *Note) Reset()

func (*Note) String

func (x *Note) String() string

type NotesService

type NotesService interface {
	List(ctx context.Context, in *ListRequest, opts ...client.CallOption) (*ListResponse, error)
	Create(ctx context.Context, in *CreateRequest, opts ...client.CallOption) (*CreateResponse, error)
	Read(ctx context.Context, in *ReadRequest, opts ...client.CallOption) (*ReadResponse, error)
	Delete(ctx context.Context, in *DeleteRequest, opts ...client.CallOption) (*DeleteResponse, error)
	Update(ctx context.Context, in *UpdateRequest, opts ...client.CallOption) (*UpdateResponse, error)
	Events(ctx context.Context, in *EventsRequest, opts ...client.CallOption) (Notes_EventsService, error)
}

func NewNotesService

func NewNotesService(name string, c client.Client) NotesService

type Notes_EventsService added in v0.22.0

type Notes_EventsService interface {
	Context() context.Context
	SendMsg(interface{}) error
	RecvMsg(interface{}) error
	Close() error
	Recv() (*EventsResponse, error)
}

type Notes_EventsStream added in v0.22.0

type Notes_EventsStream interface {
	Context() context.Context
	SendMsg(interface{}) error
	RecvMsg(interface{}) error
	Close() error
	Send(*EventsResponse) error
}

type ReadRequest

type ReadRequest struct {

	// the note id
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

Read a note

func (*ReadRequest) Descriptor deprecated

func (*ReadRequest) Descriptor() ([]byte, []int)

Deprecated: Use ReadRequest.ProtoReflect.Descriptor instead.

func (*ReadRequest) GetId

func (x *ReadRequest) GetId() string

func (*ReadRequest) ProtoMessage

func (*ReadRequest) ProtoMessage()

func (*ReadRequest) ProtoReflect

func (x *ReadRequest) ProtoReflect() protoreflect.Message

func (*ReadRequest) Reset

func (x *ReadRequest) Reset()

func (*ReadRequest) String

func (x *ReadRequest) String() string

type ReadResponse

type ReadResponse struct {

	// The note
	Note *Note `protobuf:"bytes,1,opt,name=note,proto3" json:"note,omitempty"`
	// contains filtered or unexported fields
}

func (*ReadResponse) Descriptor deprecated

func (*ReadResponse) Descriptor() ([]byte, []int)

Deprecated: Use ReadResponse.ProtoReflect.Descriptor instead.

func (*ReadResponse) GetNote

func (x *ReadResponse) GetNote() *Note

func (*ReadResponse) ProtoMessage

func (*ReadResponse) ProtoMessage()

func (*ReadResponse) ProtoReflect

func (x *ReadResponse) ProtoReflect() protoreflect.Message

func (*ReadResponse) Reset

func (x *ReadResponse) Reset()

func (*ReadResponse) String

func (x *ReadResponse) String() string

type UpdateRequest

type UpdateRequest struct {
	Note *Note `protobuf:"bytes,1,opt,name=note,proto3" json:"note,omitempty"`
	// contains filtered or unexported fields
}

Update a note

func (*UpdateRequest) Descriptor deprecated

func (*UpdateRequest) Descriptor() ([]byte, []int)

Deprecated: Use UpdateRequest.ProtoReflect.Descriptor instead.

func (*UpdateRequest) GetNote

func (x *UpdateRequest) GetNote() *Note

func (*UpdateRequest) ProtoMessage

func (*UpdateRequest) ProtoMessage()

func (*UpdateRequest) ProtoReflect

func (x *UpdateRequest) ProtoReflect() protoreflect.Message

func (*UpdateRequest) Reset

func (x *UpdateRequest) Reset()

func (*UpdateRequest) String

func (x *UpdateRequest) String() string

type UpdateResponse

type UpdateResponse struct {
	Note *Note `protobuf:"bytes,1,opt,name=note,proto3" json:"note,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateResponse) Descriptor deprecated

func (*UpdateResponse) Descriptor() ([]byte, []int)

Deprecated: Use UpdateResponse.ProtoReflect.Descriptor instead.

func (*UpdateResponse) GetNote

func (x *UpdateResponse) GetNote() *Note

func (*UpdateResponse) ProtoMessage

func (*UpdateResponse) ProtoMessage()

func (*UpdateResponse) ProtoReflect

func (x *UpdateResponse) ProtoReflect() protoreflect.Message

func (*UpdateResponse) Reset

func (x *UpdateResponse) Reset()

func (*UpdateResponse) String

func (x *UpdateResponse) String() string

Jump to

Keyboard shortcuts

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