go_micro_srv_event_event

package
Version: v0.0.0-...-abfbf2a Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2016 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package go_micro_srv_event_event is a generated protocol buffer package.

It is generated from these files:

github.com/micro/event-srv/proto/event/event.proto

It has these top-level messages:

ReadRequest
ReadResponse
CreateRequest
CreateResponse
UpdateRequest
UpdateResponse
DeleteRequest
DeleteResponse
SearchRequest
SearchResponse
StreamRequest
StreamResponse

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterEventHandler

func RegisterEventHandler(s server.Server, hdlr EventHandler, opts ...server.HandlerOption)

Types

type CreateRequest

type CreateRequest struct {
	Record *go_micro_os_event.Record `protobuf:"bytes,1,opt,name=record" json:"record,omitempty"`
}

func (*CreateRequest) Descriptor

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

func (*CreateRequest) GetRecord

func (m *CreateRequest) GetRecord() *go_micro_os_event.Record

func (*CreateRequest) ProtoMessage

func (*CreateRequest) ProtoMessage()

func (*CreateRequest) Reset

func (m *CreateRequest) Reset()

func (*CreateRequest) String

func (m *CreateRequest) String() string

type CreateResponse

type CreateResponse struct {
}

func (*CreateResponse) Descriptor

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

func (*CreateResponse) ProtoMessage

func (*CreateResponse) ProtoMessage()

func (*CreateResponse) Reset

func (m *CreateResponse) Reset()

func (*CreateResponse) String

func (m *CreateResponse) String() string

type DeleteRequest

type DeleteRequest struct {
	Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
}

func (*DeleteRequest) Descriptor

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

func (*DeleteRequest) ProtoMessage

func (*DeleteRequest) ProtoMessage()

func (*DeleteRequest) Reset

func (m *DeleteRequest) Reset()

func (*DeleteRequest) String

func (m *DeleteRequest) String() string

type DeleteResponse

type DeleteResponse struct {
}

func (*DeleteResponse) Descriptor

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

func (*DeleteResponse) ProtoMessage

func (*DeleteResponse) ProtoMessage()

func (*DeleteResponse) Reset

func (m *DeleteResponse) Reset()

func (*DeleteResponse) String

func (m *DeleteResponse) String() string

type Event

type Event struct {
	EventHandler
}

func (*Event) Create

func (h *Event) Create(ctx context.Context, in *CreateRequest, out *CreateResponse) error

func (*Event) Delete

func (h *Event) Delete(ctx context.Context, in *DeleteRequest, out *DeleteResponse) error

func (*Event) Read

func (h *Event) Read(ctx context.Context, in *ReadRequest, out *ReadResponse) error

func (*Event) Search

func (h *Event) Search(ctx context.Context, in *SearchRequest, out *SearchResponse) error

func (*Event) Stream

func (h *Event) Stream(ctx context.Context, stream server.Streamer) error

func (*Event) Update

func (h *Event) Update(ctx context.Context, in *UpdateRequest, out *UpdateResponse) error

type EventClient

type EventClient interface {
	Read(ctx context.Context, in *ReadRequest, opts ...client.CallOption) (*ReadResponse, error)
	Create(ctx context.Context, in *CreateRequest, opts ...client.CallOption) (*CreateResponse, error)
	Search(ctx context.Context, in *SearchRequest, opts ...client.CallOption) (*SearchResponse, error)
	Stream(ctx context.Context, in *StreamRequest, opts ...client.CallOption) (Event_StreamClient, error)
	// should not really be used since event sourcing is append only
	Update(ctx context.Context, in *UpdateRequest, opts ...client.CallOption) (*UpdateResponse, error)
	Delete(ctx context.Context, in *DeleteRequest, opts ...client.CallOption) (*DeleteResponse, error)
}

func NewEventClient

func NewEventClient(serviceName string, c client.Client) EventClient

type EventHandler

type EventHandler interface {
	Read(context.Context, *ReadRequest, *ReadResponse) error
	Create(context.Context, *CreateRequest, *CreateResponse) error
	Search(context.Context, *SearchRequest, *SearchResponse) error
	Stream(context.Context, *StreamRequest, Event_StreamStream) error
	// should not really be used since event sourcing is append only
	Update(context.Context, *UpdateRequest, *UpdateResponse) error
	Delete(context.Context, *DeleteRequest, *DeleteResponse) error
}

type Event_StreamClient

type Event_StreamClient interface {
	SendMsg(interface{}) error
	RecvMsg(interface{}) error
	Close() error
	Recv() (*StreamResponse, error)
}

type Event_StreamStream

type Event_StreamStream interface {
	SendMsg(interface{}) error
	RecvMsg(interface{}) error
	Close() error
	Send(*StreamResponse) error
}

type ReadRequest

type ReadRequest struct {
	Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
}

func (*ReadRequest) Descriptor

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

func (*ReadRequest) ProtoMessage

func (*ReadRequest) ProtoMessage()

func (*ReadRequest) Reset

func (m *ReadRequest) Reset()

func (*ReadRequest) String

func (m *ReadRequest) String() string

type ReadResponse

type ReadResponse struct {
	Record *go_micro_os_event.Record `protobuf:"bytes,1,opt,name=record" json:"record,omitempty"`
}

func (*ReadResponse) Descriptor

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

func (*ReadResponse) GetRecord

func (m *ReadResponse) GetRecord() *go_micro_os_event.Record

func (*ReadResponse) ProtoMessage

func (*ReadResponse) ProtoMessage()

func (*ReadResponse) Reset

func (m *ReadResponse) Reset()

func (*ReadResponse) String

func (m *ReadResponse) String() string

type SearchRequest

type SearchRequest struct {
	// optional root_id
	Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
	// optional
	Type string `protobuf:"bytes,2,opt,name=type" json:"type,omitempty"`
	// timeseries bounds
	From int64 `protobuf:"varint,3,opt,name=from" json:"from,omitempty"`
	To   int64 `protobuf:"varint,4,opt,name=to" json:"to,omitempty"`
	// range bounds
	Limit  int64 `protobuf:"varint,5,opt,name=limit" json:"limit,omitempty"`
	Offset int64 `protobuf:"varint,6,opt,name=offset" json:"offset,omitempty"`
	// order
	Reverse bool `protobuf:"varint,7,opt,name=reverse" json:"reverse,omitempty"`
}

func (*SearchRequest) Descriptor

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

func (*SearchRequest) ProtoMessage

func (*SearchRequest) ProtoMessage()

func (*SearchRequest) Reset

func (m *SearchRequest) Reset()

func (*SearchRequest) String

func (m *SearchRequest) String() string

type SearchResponse

type SearchResponse struct {
	Records []*go_micro_os_event.Record `protobuf:"bytes,1,rep,name=records" json:"records,omitempty"`
}

func (*SearchResponse) Descriptor

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

func (*SearchResponse) GetRecords

func (m *SearchResponse) GetRecords() []*go_micro_os_event.Record

func (*SearchResponse) ProtoMessage

func (*SearchResponse) ProtoMessage()

func (*SearchResponse) Reset

func (m *SearchResponse) Reset()

func (*SearchResponse) String

func (m *SearchResponse) String() string

type StreamRequest

type StreamRequest struct {
	// types to watch
	Types []string `protobuf:"bytes,1,rep,name=types" json:"types,omitempty"`
}

func (*StreamRequest) Descriptor

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

func (*StreamRequest) ProtoMessage

func (*StreamRequest) ProtoMessage()

func (*StreamRequest) Reset

func (m *StreamRequest) Reset()

func (*StreamRequest) String

func (m *StreamRequest) String() string

type StreamResponse

type StreamResponse struct {
	Record *go_micro_os_event.Record `protobuf:"bytes,1,opt,name=record" json:"record,omitempty"`
}

func (*StreamResponse) Descriptor

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

func (*StreamResponse) GetRecord

func (m *StreamResponse) GetRecord() *go_micro_os_event.Record

func (*StreamResponse) ProtoMessage

func (*StreamResponse) ProtoMessage()

func (*StreamResponse) Reset

func (m *StreamResponse) Reset()

func (*StreamResponse) String

func (m *StreamResponse) String() string

type UpdateRequest

type UpdateRequest struct {
	Record *go_micro_os_event.Record `protobuf:"bytes,1,opt,name=record" json:"record,omitempty"`
}

func (*UpdateRequest) Descriptor

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

func (*UpdateRequest) GetRecord

func (m *UpdateRequest) GetRecord() *go_micro_os_event.Record

func (*UpdateRequest) ProtoMessage

func (*UpdateRequest) ProtoMessage()

func (*UpdateRequest) Reset

func (m *UpdateRequest) Reset()

func (*UpdateRequest) String

func (m *UpdateRequest) String() string

type UpdateResponse

type UpdateResponse struct {
}

func (*UpdateResponse) Descriptor

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

func (*UpdateResponse) ProtoMessage

func (*UpdateResponse) ProtoMessage()

func (*UpdateResponse) Reset

func (m *UpdateResponse) Reset()

func (*UpdateResponse) String

func (m *UpdateResponse) String() string

Source Files

Jump to

Keyboard shortcuts

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