message

package
v0.0.0-...-5f26636 Latest Latest
Warning

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

Go to latest
Published: May 20, 2019 License: Apache-2.0 Imports: 7 Imported by: 4

Documentation

Overview

Package message is a generated protocol buffer package.

It is generated from these files:

github.com/microhq/message-srv/proto/message/message.proto

It has these top-level messages:

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterMessageHandler

func RegisterMessageHandler(s server.Server, hdlr MessageHandler, opts ...server.HandlerOption) error

func RegisterMessageServer

func RegisterMessageServer(s *grpc.Server, srv MessageServer)

Types

type CreateRequest

type CreateRequest struct {
	Event                *Event   `protobuf:"bytes,1,opt,name=event,proto3" json:"event,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*CreateRequest) Descriptor

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

func (*CreateRequest) GetEvent

func (m *CreateRequest) GetEvent() *Event

func (*CreateRequest) ProtoMessage

func (*CreateRequest) ProtoMessage()

func (*CreateRequest) Reset

func (m *CreateRequest) Reset()

func (*CreateRequest) String

func (m *CreateRequest) String() string

func (*CreateRequest) XXX_DiscardUnknown

func (m *CreateRequest) XXX_DiscardUnknown()

func (*CreateRequest) XXX_Marshal

func (m *CreateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CreateRequest) XXX_Merge

func (m *CreateRequest) XXX_Merge(src proto.Message)

func (*CreateRequest) XXX_Size

func (m *CreateRequest) XXX_Size() int

func (*CreateRequest) XXX_Unmarshal

func (m *CreateRequest) XXX_Unmarshal(b []byte) error

type CreateResponse

type CreateResponse struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

func (*CreateResponse) XXX_DiscardUnknown

func (m *CreateResponse) XXX_DiscardUnknown()

func (*CreateResponse) XXX_Marshal

func (m *CreateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CreateResponse) XXX_Merge

func (m *CreateResponse) XXX_Merge(src proto.Message)

func (*CreateResponse) XXX_Size

func (m *CreateResponse) XXX_Size() int

func (*CreateResponse) XXX_Unmarshal

func (m *CreateResponse) XXX_Unmarshal(b []byte) error

type DeleteRequest

type DeleteRequest struct {
	Id                   string   `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Namespace            string   `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"`
	Channel              string   `protobuf:"bytes,3,opt,name=channel,proto3" json:"channel,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*DeleteRequest) Descriptor

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

func (*DeleteRequest) GetChannel

func (m *DeleteRequest) GetChannel() string

func (*DeleteRequest) GetId

func (m *DeleteRequest) GetId() string

func (*DeleteRequest) GetNamespace

func (m *DeleteRequest) GetNamespace() string

func (*DeleteRequest) ProtoMessage

func (*DeleteRequest) ProtoMessage()

func (*DeleteRequest) Reset

func (m *DeleteRequest) Reset()

func (*DeleteRequest) String

func (m *DeleteRequest) String() string

func (*DeleteRequest) XXX_DiscardUnknown

func (m *DeleteRequest) XXX_DiscardUnknown()

func (*DeleteRequest) XXX_Marshal

func (m *DeleteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DeleteRequest) XXX_Merge

func (m *DeleteRequest) XXX_Merge(src proto.Message)

func (*DeleteRequest) XXX_Size

func (m *DeleteRequest) XXX_Size() int

func (*DeleteRequest) XXX_Unmarshal

func (m *DeleteRequest) XXX_Unmarshal(b []byte) error

type DeleteResponse

type DeleteResponse struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

func (*DeleteResponse) XXX_DiscardUnknown

func (m *DeleteResponse) XXX_DiscardUnknown()

func (*DeleteResponse) XXX_Marshal

func (m *DeleteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DeleteResponse) XXX_Merge

func (m *DeleteResponse) XXX_Merge(src proto.Message)

func (*DeleteResponse) XXX_Size

func (m *DeleteResponse) XXX_Size() int

func (*DeleteResponse) XXX_Unmarshal

func (m *DeleteResponse) XXX_Unmarshal(b []byte) error

type Event

type Event struct {
	// defaults to uuid
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// defaults to message
	Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
	// defaults to system
	From string `protobuf:"bytes,3,opt,name=from,proto3" json:"from,omitempty"`
	// defaults to default
	Namespace string `protobuf:"bytes,4,opt,name=namespace,proto3" json:"namespace,omitempty"`
	// required
	Channel string `protobuf:"bytes,5,opt,name=channel,proto3" json:"channel,omitempty"`
	// required
	Text string `protobuf:"bytes,6,opt,name=text,proto3" json:"text,omitempty"`
	// defaults to now ; unix nano
	Created int64 `protobuf:"varint,7,opt,name=created,proto3" json:"created,omitempty"`
	// defaults to now ; unix nano
	Updated              int64    `protobuf:"varint,8,opt,name=updated,proto3" json:"updated,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Event) Descriptor

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

func (*Event) GetChannel

func (m *Event) GetChannel() string

func (*Event) GetCreated

func (m *Event) GetCreated() int64

func (*Event) GetFrom

func (m *Event) GetFrom() string

func (*Event) GetId

func (m *Event) GetId() string

func (*Event) GetNamespace

func (m *Event) GetNamespace() string

func (*Event) GetText

func (m *Event) GetText() string

func (*Event) GetType

func (m *Event) GetType() string

func (*Event) GetUpdated

func (m *Event) GetUpdated() int64

func (*Event) ProtoMessage

func (*Event) ProtoMessage()

func (*Event) Reset

func (m *Event) Reset()

func (*Event) String

func (m *Event) String() string

func (*Event) XXX_DiscardUnknown

func (m *Event) XXX_DiscardUnknown()

func (*Event) XXX_Marshal

func (m *Event) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Event) XXX_Merge

func (m *Event) XXX_Merge(src proto.Message)

func (*Event) XXX_Size

func (m *Event) XXX_Size() int

func (*Event) XXX_Unmarshal

func (m *Event) XXX_Unmarshal(b []byte) error

type MessageClient

type MessageClient interface {
	Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateResponse, error)
	Update(ctx context.Context, in *UpdateRequest, opts ...grpc.CallOption) (*UpdateResponse, error)
	Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteResponse, error)
	Search(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (*SearchResponse, error)
	Stream(ctx context.Context, in *StreamRequest, opts ...grpc.CallOption) (Message_StreamClient, error)
	Read(ctx context.Context, in *ReadRequest, opts ...grpc.CallOption) (*ReadResponse, error)
}

MessageClient is the client API for Message service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewMessageClient

func NewMessageClient(cc *grpc.ClientConn) MessageClient

type MessageServer

MessageServer is the server API for Message service.

type MessageService

type MessageService interface {
	Create(ctx context.Context, in *CreateRequest, opts ...client.CallOption) (*CreateResponse, error)
	Update(ctx context.Context, in *UpdateRequest, opts ...client.CallOption) (*UpdateResponse, error)
	Delete(ctx context.Context, in *DeleteRequest, opts ...client.CallOption) (*DeleteResponse, error)
	Search(ctx context.Context, in *SearchRequest, opts ...client.CallOption) (*SearchResponse, error)
	Stream(ctx context.Context, in *StreamRequest, opts ...client.CallOption) (Message_StreamService, error)
	Read(ctx context.Context, in *ReadRequest, opts ...client.CallOption) (*ReadResponse, error)
}

func NewMessageService

func NewMessageService(name string, c client.Client) MessageService

type Message_StreamClient

type Message_StreamClient interface {
	Recv() (*StreamResponse, error)
	grpc.ClientStream
}

type Message_StreamServer

type Message_StreamServer interface {
	Send(*StreamResponse) error
	grpc.ServerStream
}

type Message_StreamService

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

type Message_StreamStream

type Message_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,proto3" json:"id,omitempty"`
	Namespace            string   `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"`
	Channel              string   `protobuf:"bytes,3,opt,name=channel,proto3" json:"channel,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ReadRequest) Descriptor

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

func (*ReadRequest) GetChannel

func (m *ReadRequest) GetChannel() string

func (*ReadRequest) GetId

func (m *ReadRequest) GetId() string

func (*ReadRequest) GetNamespace

func (m *ReadRequest) GetNamespace() string

func (*ReadRequest) ProtoMessage

func (*ReadRequest) ProtoMessage()

func (*ReadRequest) Reset

func (m *ReadRequest) Reset()

func (*ReadRequest) String

func (m *ReadRequest) String() string

func (*ReadRequest) XXX_DiscardUnknown

func (m *ReadRequest) XXX_DiscardUnknown()

func (*ReadRequest) XXX_Marshal

func (m *ReadRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ReadRequest) XXX_Merge

func (m *ReadRequest) XXX_Merge(src proto.Message)

func (*ReadRequest) XXX_Size

func (m *ReadRequest) XXX_Size() int

func (*ReadRequest) XXX_Unmarshal

func (m *ReadRequest) XXX_Unmarshal(b []byte) error

type ReadResponse

type ReadResponse struct {
	Event                *Event   `protobuf:"bytes,1,opt,name=event,proto3" json:"event,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ReadResponse) Descriptor

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

func (*ReadResponse) GetEvent

func (m *ReadResponse) GetEvent() *Event

func (*ReadResponse) ProtoMessage

func (*ReadResponse) ProtoMessage()

func (*ReadResponse) Reset

func (m *ReadResponse) Reset()

func (*ReadResponse) String

func (m *ReadResponse) String() string

func (*ReadResponse) XXX_DiscardUnknown

func (m *ReadResponse) XXX_DiscardUnknown()

func (*ReadResponse) XXX_Marshal

func (m *ReadResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ReadResponse) XXX_Merge

func (m *ReadResponse) XXX_Merge(src proto.Message)

func (*ReadResponse) XXX_Size

func (m *ReadResponse) XXX_Size() int

func (*ReadResponse) XXX_Unmarshal

func (m *ReadResponse) XXX_Unmarshal(b []byte) error

type SearchRequest

type SearchRequest struct {
	Query                string   `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"`
	Namespace            string   `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"`
	Channel              string   `protobuf:"bytes,3,opt,name=channel,proto3" json:"channel,omitempty"`
	Limit                int64    `protobuf:"varint,4,opt,name=limit,proto3" json:"limit,omitempty"`
	Offset               int64    `protobuf:"varint,5,opt,name=offset,proto3" json:"offset,omitempty"`
	Reverse              bool     `protobuf:"varint,6,opt,name=reverse,proto3" json:"reverse,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*SearchRequest) Descriptor

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

func (*SearchRequest) GetChannel

func (m *SearchRequest) GetChannel() string

func (*SearchRequest) GetLimit

func (m *SearchRequest) GetLimit() int64

func (*SearchRequest) GetNamespace

func (m *SearchRequest) GetNamespace() string

func (*SearchRequest) GetOffset

func (m *SearchRequest) GetOffset() int64

func (*SearchRequest) GetQuery

func (m *SearchRequest) GetQuery() string

func (*SearchRequest) GetReverse

func (m *SearchRequest) GetReverse() bool

func (*SearchRequest) ProtoMessage

func (*SearchRequest) ProtoMessage()

func (*SearchRequest) Reset

func (m *SearchRequest) Reset()

func (*SearchRequest) String

func (m *SearchRequest) String() string

func (*SearchRequest) XXX_DiscardUnknown

func (m *SearchRequest) XXX_DiscardUnknown()

func (*SearchRequest) XXX_Marshal

func (m *SearchRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SearchRequest) XXX_Merge

func (m *SearchRequest) XXX_Merge(src proto.Message)

func (*SearchRequest) XXX_Size

func (m *SearchRequest) XXX_Size() int

func (*SearchRequest) XXX_Unmarshal

func (m *SearchRequest) XXX_Unmarshal(b []byte) error

type SearchResponse

type SearchResponse struct {
	Events               []*Event `protobuf:"bytes,1,rep,name=events,proto3" json:"events,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*SearchResponse) Descriptor

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

func (*SearchResponse) GetEvents

func (m *SearchResponse) GetEvents() []*Event

func (*SearchResponse) ProtoMessage

func (*SearchResponse) ProtoMessage()

func (*SearchResponse) Reset

func (m *SearchResponse) Reset()

func (*SearchResponse) String

func (m *SearchResponse) String() string

func (*SearchResponse) XXX_DiscardUnknown

func (m *SearchResponse) XXX_DiscardUnknown()

func (*SearchResponse) XXX_Marshal

func (m *SearchResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SearchResponse) XXX_Merge

func (m *SearchResponse) XXX_Merge(src proto.Message)

func (*SearchResponse) XXX_Size

func (m *SearchResponse) XXX_Size() int

func (*SearchResponse) XXX_Unmarshal

func (m *SearchResponse) XXX_Unmarshal(b []byte) error

type StreamRequest

type StreamRequest struct {
	Namespace            string   `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
	Channel              string   `protobuf:"bytes,2,opt,name=channel,proto3" json:"channel,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*StreamRequest) Descriptor

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

func (*StreamRequest) GetChannel

func (m *StreamRequest) GetChannel() string

func (*StreamRequest) GetNamespace

func (m *StreamRequest) GetNamespace() string

func (*StreamRequest) ProtoMessage

func (*StreamRequest) ProtoMessage()

func (*StreamRequest) Reset

func (m *StreamRequest) Reset()

func (*StreamRequest) String

func (m *StreamRequest) String() string

func (*StreamRequest) XXX_DiscardUnknown

func (m *StreamRequest) XXX_DiscardUnknown()

func (*StreamRequest) XXX_Marshal

func (m *StreamRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*StreamRequest) XXX_Merge

func (m *StreamRequest) XXX_Merge(src proto.Message)

func (*StreamRequest) XXX_Size

func (m *StreamRequest) XXX_Size() int

func (*StreamRequest) XXX_Unmarshal

func (m *StreamRequest) XXX_Unmarshal(b []byte) error

type StreamResponse

type StreamResponse struct {
	Event                *Event   `protobuf:"bytes,1,opt,name=event,proto3" json:"event,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*StreamResponse) Descriptor

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

func (*StreamResponse) GetEvent

func (m *StreamResponse) GetEvent() *Event

func (*StreamResponse) ProtoMessage

func (*StreamResponse) ProtoMessage()

func (*StreamResponse) Reset

func (m *StreamResponse) Reset()

func (*StreamResponse) String

func (m *StreamResponse) String() string

func (*StreamResponse) XXX_DiscardUnknown

func (m *StreamResponse) XXX_DiscardUnknown()

func (*StreamResponse) XXX_Marshal

func (m *StreamResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*StreamResponse) XXX_Merge

func (m *StreamResponse) XXX_Merge(src proto.Message)

func (*StreamResponse) XXX_Size

func (m *StreamResponse) XXX_Size() int

func (*StreamResponse) XXX_Unmarshal

func (m *StreamResponse) XXX_Unmarshal(b []byte) error

type UpdateRequest

type UpdateRequest struct {
	Event                *Event   `protobuf:"bytes,1,opt,name=event,proto3" json:"event,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*UpdateRequest) Descriptor

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

func (*UpdateRequest) GetEvent

func (m *UpdateRequest) GetEvent() *Event

func (*UpdateRequest) ProtoMessage

func (*UpdateRequest) ProtoMessage()

func (*UpdateRequest) Reset

func (m *UpdateRequest) Reset()

func (*UpdateRequest) String

func (m *UpdateRequest) String() string

func (*UpdateRequest) XXX_DiscardUnknown

func (m *UpdateRequest) XXX_DiscardUnknown()

func (*UpdateRequest) XXX_Marshal

func (m *UpdateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*UpdateRequest) XXX_Merge

func (m *UpdateRequest) XXX_Merge(src proto.Message)

func (*UpdateRequest) XXX_Size

func (m *UpdateRequest) XXX_Size() int

func (*UpdateRequest) XXX_Unmarshal

func (m *UpdateRequest) XXX_Unmarshal(b []byte) error

type UpdateResponse

type UpdateResponse struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

func (*UpdateResponse) XXX_DiscardUnknown

func (m *UpdateResponse) XXX_DiscardUnknown()

func (*UpdateResponse) XXX_Marshal

func (m *UpdateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*UpdateResponse) XXX_Merge

func (m *UpdateResponse) XXX_Merge(src proto.Message)

func (*UpdateResponse) XXX_Size

func (m *UpdateResponse) XXX_Size() int

func (*UpdateResponse) XXX_Unmarshal

func (m *UpdateResponse) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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