Documentation ¶
Overview ¶
Package proto is a generated protocol buffer package. It is generated from these files: q.proto It has these top-level messages: NewQueueRequest NewQueueResponse GetQueueRequest GetQueueResponse ListQueuesRequest ListQueuesResponse DeleteQueueRequest DeleteQueueResponse AddQueueTagRequest AddQueueTagResponse DeleteQueueTagRequest DeleteQueueTagResponse AddRequest AddResponse PopRequest PopResponse PeekRequest PeekResponse Tag Metadata NewMessage Message Queue
Package proto is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func ParseID(id string) (uuid.UUID, error)
- func RegisterQHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterQHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterQServer(s *grpc.Server, srv QServer)
- func ToMessage(m *Message) (*q.Message, error)
- func ToMeta(m *Metadata) (*q.Metadata, error)
- func ToTags(t []*Tag) []q.Tag
- type AddQueueTagRequest
- func (*AddQueueTagRequest) Descriptor() ([]byte, []int)
- func (m *AddQueueTagRequest) GetQueueId() string
- func (m *AddQueueTagRequest) GetTag() *Tag
- func (this *AddQueueTagRequest) GoString() string
- func (*AddQueueTagRequest) ProtoMessage()
- func (m *AddQueueTagRequest) Reset()
- func (this *AddQueueTagRequest) String() string
- type AddQueueTagResponse
- type AddRequest
- type AddResponse
- type DeleteQueueRequest
- type DeleteQueueResponse
- type DeleteQueueTagRequest
- func (*DeleteQueueTagRequest) Descriptor() ([]byte, []int)
- func (m *DeleteQueueTagRequest) GetQueueId() string
- func (m *DeleteQueueTagRequest) GetTag() *Tag
- func (this *DeleteQueueTagRequest) GoString() string
- func (*DeleteQueueTagRequest) ProtoMessage()
- func (m *DeleteQueueTagRequest) Reset()
- func (this *DeleteQueueTagRequest) String() string
- type DeleteQueueTagResponse
- type GetQueueRequest
- type GetQueueResponse
- type ListQueuesRequest
- type ListQueuesResponse
- type Message
- type Metadata
- func (*Metadata) Descriptor() ([]byte, []int)
- func (m *Metadata) GetCreated() *google_protobuf1.Timestamp
- func (m *Metadata) GetId() string
- func (m *Metadata) GetTags() []*Tag
- func (this *Metadata) GoString() string
- func (*Metadata) ProtoMessage()
- func (m *Metadata) Reset()
- func (this *Metadata) String() string
- type NewMessage
- type NewQueueRequest
- func (*NewQueueRequest) Descriptor() ([]byte, []int)
- func (m *NewQueueRequest) GetLimit() int64
- func (m *NewQueueRequest) GetStore() Queue_Store
- func (m *NewQueueRequest) GetTags() []*Tag
- func (this *NewQueueRequest) GoString() string
- func (*NewQueueRequest) ProtoMessage()
- func (m *NewQueueRequest) Reset()
- func (this *NewQueueRequest) String() string
- type NewQueueResponse
- type PeekRequest
- type PeekResponse
- type PopRequest
- type PopResponse
- type QClient
- type QServer
- type Queue
- type Queue_Store
- type Tag
Constants ¶
This section is empty.
Variables ¶
var FromStore = map[q.Store]Queue_Store{ q.UnknownStore: UNKNOWN, q.Memory: MEMORY, q.BoltDB: BOLTDB, }
FromStore maps q.Store to its protobuf generated equivalent.
var Queue_Store_name = map[int32]string{
0: "UNKNOWN",
1: "MEMORY",
2: "BOLTDB",
}
var Queue_Store_value = map[string]int32{
"UNKNOWN": 0,
"MEMORY": 1,
"BOLTDB": 2,
}
var ToStore = map[Queue_Store]q.Store{ UNKNOWN: q.UnknownStore, MEMORY: q.Memory, BOLTDB: q.BoltDB, }
ToStore maps protobuf generated store types to q.Store.
Functions ¶
func RegisterQHandler ¶
RegisterQHandler registers the http handlers for service Q to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterQHandlerFromEndpoint ¶
func RegisterQHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterQHandlerFromEndpoint is same as RegisterQHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterQServer ¶
Types ¶
type AddQueueTagRequest ¶
type AddQueueTagRequest struct { QueueId string `protobuf:"bytes,1,opt,name=queue_id,json=queueId,proto3" json:"queue_id,omitempty"` Tag *Tag `protobuf:"bytes,2,opt,name=tag" json:"tag,omitempty"` }
func (*AddQueueTagRequest) Descriptor ¶
func (*AddQueueTagRequest) Descriptor() ([]byte, []int)
func (*AddQueueTagRequest) GetQueueId ¶
func (m *AddQueueTagRequest) GetQueueId() string
func (*AddQueueTagRequest) GetTag ¶
func (m *AddQueueTagRequest) GetTag() *Tag
func (*AddQueueTagRequest) GoString ¶
func (this *AddQueueTagRequest) GoString() string
func (*AddQueueTagRequest) ProtoMessage ¶
func (*AddQueueTagRequest) ProtoMessage()
func (*AddQueueTagRequest) Reset ¶
func (m *AddQueueTagRequest) Reset()
func (*AddQueueTagRequest) String ¶
func (this *AddQueueTagRequest) String() string
type AddQueueTagResponse ¶
type AddQueueTagResponse struct { }
func (*AddQueueTagResponse) Descriptor ¶
func (*AddQueueTagResponse) Descriptor() ([]byte, []int)
func (*AddQueueTagResponse) GoString ¶
func (this *AddQueueTagResponse) GoString() string
func (*AddQueueTagResponse) ProtoMessage ¶
func (*AddQueueTagResponse) ProtoMessage()
func (*AddQueueTagResponse) Reset ¶
func (m *AddQueueTagResponse) Reset()
func (*AddQueueTagResponse) String ¶
func (this *AddQueueTagResponse) String() string
type AddRequest ¶
type AddRequest struct { QueueId string `protobuf:"bytes,1,opt,name=queue_id,json=queueId,proto3" json:"queue_id,omitempty"` Message *NewMessage `protobuf:"bytes,2,opt,name=message" json:"message,omitempty"` }
func (*AddRequest) Descriptor ¶
func (*AddRequest) Descriptor() ([]byte, []int)
func (*AddRequest) GetMessage ¶
func (m *AddRequest) GetMessage() *NewMessage
func (*AddRequest) GetQueueId ¶
func (m *AddRequest) GetQueueId() string
func (*AddRequest) GoString ¶
func (this *AddRequest) GoString() string
func (*AddRequest) ProtoMessage ¶
func (*AddRequest) ProtoMessage()
func (*AddRequest) Reset ¶
func (m *AddRequest) Reset()
func (*AddRequest) String ¶
func (this *AddRequest) String() string
type AddResponse ¶
type AddResponse struct {
Message *Message `protobuf:"bytes,1,opt,name=message" json:"message,omitempty"`
}
func (*AddResponse) Descriptor ¶
func (*AddResponse) Descriptor() ([]byte, []int)
func (*AddResponse) GetMessage ¶
func (m *AddResponse) GetMessage() *Message
func (*AddResponse) GoString ¶
func (this *AddResponse) GoString() string
func (*AddResponse) ProtoMessage ¶
func (*AddResponse) ProtoMessage()
func (*AddResponse) Reset ¶
func (m *AddResponse) Reset()
func (*AddResponse) String ¶
func (this *AddResponse) String() string
type DeleteQueueRequest ¶
type DeleteQueueRequest struct {
QueueId string `protobuf:"bytes,1,opt,name=queue_id,json=queueId,proto3" json:"queue_id,omitempty"`
}
func (*DeleteQueueRequest) Descriptor ¶
func (*DeleteQueueRequest) Descriptor() ([]byte, []int)
func (*DeleteQueueRequest) GetQueueId ¶
func (m *DeleteQueueRequest) GetQueueId() string
func (*DeleteQueueRequest) GoString ¶
func (this *DeleteQueueRequest) GoString() string
func (*DeleteQueueRequest) ProtoMessage ¶
func (*DeleteQueueRequest) ProtoMessage()
func (*DeleteQueueRequest) Reset ¶
func (m *DeleteQueueRequest) Reset()
func (*DeleteQueueRequest) String ¶
func (this *DeleteQueueRequest) String() string
type DeleteQueueResponse ¶
type DeleteQueueResponse struct { }
func (*DeleteQueueResponse) Descriptor ¶
func (*DeleteQueueResponse) Descriptor() ([]byte, []int)
func (*DeleteQueueResponse) GoString ¶
func (this *DeleteQueueResponse) GoString() string
func (*DeleteQueueResponse) ProtoMessage ¶
func (*DeleteQueueResponse) ProtoMessage()
func (*DeleteQueueResponse) Reset ¶
func (m *DeleteQueueResponse) Reset()
func (*DeleteQueueResponse) String ¶
func (this *DeleteQueueResponse) String() string
type DeleteQueueTagRequest ¶
type DeleteQueueTagRequest struct { QueueId string `protobuf:"bytes,1,opt,name=queue_id,json=queueId,proto3" json:"queue_id,omitempty"` Tag *Tag `protobuf:"bytes,2,opt,name=tag" json:"tag,omitempty"` }
func (*DeleteQueueTagRequest) Descriptor ¶
func (*DeleteQueueTagRequest) Descriptor() ([]byte, []int)
func (*DeleteQueueTagRequest) GetQueueId ¶
func (m *DeleteQueueTagRequest) GetQueueId() string
func (*DeleteQueueTagRequest) GetTag ¶
func (m *DeleteQueueTagRequest) GetTag() *Tag
func (*DeleteQueueTagRequest) GoString ¶
func (this *DeleteQueueTagRequest) GoString() string
func (*DeleteQueueTagRequest) ProtoMessage ¶
func (*DeleteQueueTagRequest) ProtoMessage()
func (*DeleteQueueTagRequest) Reset ¶
func (m *DeleteQueueTagRequest) Reset()
func (*DeleteQueueTagRequest) String ¶
func (this *DeleteQueueTagRequest) String() string
type DeleteQueueTagResponse ¶
type DeleteQueueTagResponse struct { }
func (*DeleteQueueTagResponse) Descriptor ¶
func (*DeleteQueueTagResponse) Descriptor() ([]byte, []int)
func (*DeleteQueueTagResponse) GoString ¶
func (this *DeleteQueueTagResponse) GoString() string
func (*DeleteQueueTagResponse) ProtoMessage ¶
func (*DeleteQueueTagResponse) ProtoMessage()
func (*DeleteQueueTagResponse) Reset ¶
func (m *DeleteQueueTagResponse) Reset()
func (*DeleteQueueTagResponse) String ¶
func (this *DeleteQueueTagResponse) String() string
type GetQueueRequest ¶
type GetQueueRequest struct {
QueueId string `protobuf:"bytes,1,opt,name=queue_id,json=queueId,proto3" json:"queue_id,omitempty"`
}
func (*GetQueueRequest) Descriptor ¶
func (*GetQueueRequest) Descriptor() ([]byte, []int)
func (*GetQueueRequest) GetQueueId ¶
func (m *GetQueueRequest) GetQueueId() string
func (*GetQueueRequest) GoString ¶
func (this *GetQueueRequest) GoString() string
func (*GetQueueRequest) ProtoMessage ¶
func (*GetQueueRequest) ProtoMessage()
func (*GetQueueRequest) Reset ¶
func (m *GetQueueRequest) Reset()
func (*GetQueueRequest) String ¶
func (this *GetQueueRequest) String() string
type GetQueueResponse ¶
type GetQueueResponse struct {
Queue *Queue `protobuf:"bytes,1,opt,name=queue" json:"queue,omitempty"`
}
func (*GetQueueResponse) Descriptor ¶
func (*GetQueueResponse) Descriptor() ([]byte, []int)
func (*GetQueueResponse) GetQueue ¶
func (m *GetQueueResponse) GetQueue() *Queue
func (*GetQueueResponse) GoString ¶
func (this *GetQueueResponse) GoString() string
func (*GetQueueResponse) ProtoMessage ¶
func (*GetQueueResponse) ProtoMessage()
func (*GetQueueResponse) Reset ¶
func (m *GetQueueResponse) Reset()
func (*GetQueueResponse) String ¶
func (this *GetQueueResponse) String() string
type ListQueuesRequest ¶
type ListQueuesRequest struct { }
func (*ListQueuesRequest) Descriptor ¶
func (*ListQueuesRequest) Descriptor() ([]byte, []int)
func (*ListQueuesRequest) GoString ¶
func (this *ListQueuesRequest) GoString() string
func (*ListQueuesRequest) ProtoMessage ¶
func (*ListQueuesRequest) ProtoMessage()
func (*ListQueuesRequest) Reset ¶
func (m *ListQueuesRequest) Reset()
func (*ListQueuesRequest) String ¶
func (this *ListQueuesRequest) String() string
type ListQueuesResponse ¶
type ListQueuesResponse struct {
Queues []*Queue `protobuf:"bytes,1,rep,name=queues" json:"queues,omitempty"`
}
func (*ListQueuesResponse) Descriptor ¶
func (*ListQueuesResponse) Descriptor() ([]byte, []int)
func (*ListQueuesResponse) GetQueues ¶
func (m *ListQueuesResponse) GetQueues() []*Queue
func (*ListQueuesResponse) GoString ¶
func (this *ListQueuesResponse) GoString() string
func (*ListQueuesResponse) ProtoMessage ¶
func (*ListQueuesResponse) ProtoMessage()
func (*ListQueuesResponse) Reset ¶
func (m *ListQueuesResponse) Reset()
func (*ListQueuesResponse) String ¶
func (this *ListQueuesResponse) String() string
type Message ¶
type Message struct { Meta *Metadata `protobuf:"bytes,1,opt,name=meta" json:"meta,omitempty"` Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` }
func FromMessage ¶
FromMessage converts a *q.Message to its protobuf generated equivalent.
func (*Message) Descriptor ¶
func (*Message) GetPayload ¶
func (*Message) ProtoMessage ¶
func (*Message) ProtoMessage()
type Metadata ¶
type Metadata struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Created *google_protobuf1.Timestamp `protobuf:"bytes,2,opt,name=created" json:"created,omitempty"` Tags []*Tag `protobuf:"bytes,3,rep,name=tags" json:"tags,omitempty"` }
func (*Metadata) Descriptor ¶
func (*Metadata) GetCreated ¶
func (m *Metadata) GetCreated() *google_protobuf1.Timestamp
func (*Metadata) ProtoMessage ¶
func (*Metadata) ProtoMessage()
type NewMessage ¶
type NewMessage struct { Tags []*Tag `protobuf:"bytes,1,rep,name=tags" json:"tags,omitempty"` Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` }
A NewMessage is the user-writable subset of a Message. We could use Message for new messages and just ignore any ID or create times the caller sent, but doing so would cause the grpc-gateway swagger spec generator to generate a misleading input.
func (*NewMessage) Descriptor ¶
func (*NewMessage) Descriptor() ([]byte, []int)
func (*NewMessage) GetPayload ¶
func (m *NewMessage) GetPayload() []byte
func (*NewMessage) GetTags ¶
func (m *NewMessage) GetTags() []*Tag
func (*NewMessage) GoString ¶
func (this *NewMessage) GoString() string
func (*NewMessage) ProtoMessage ¶
func (*NewMessage) ProtoMessage()
func (*NewMessage) Reset ¶
func (m *NewMessage) Reset()
func (*NewMessage) String ¶
func (this *NewMessage) String() string
type NewQueueRequest ¶
type NewQueueRequest struct { Store Queue_Store `protobuf:"varint,1,opt,name=store,proto3,enum=proto.Queue_Store" json:"store,omitempty"` Limit int64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` Tags []*Tag `protobuf:"bytes,3,rep,name=tags" json:"tags,omitempty"` }
func (*NewQueueRequest) Descriptor ¶
func (*NewQueueRequest) Descriptor() ([]byte, []int)
func (*NewQueueRequest) GetLimit ¶
func (m *NewQueueRequest) GetLimit() int64
func (*NewQueueRequest) GetStore ¶
func (m *NewQueueRequest) GetStore() Queue_Store
func (*NewQueueRequest) GetTags ¶
func (m *NewQueueRequest) GetTags() []*Tag
func (*NewQueueRequest) GoString ¶
func (this *NewQueueRequest) GoString() string
func (*NewQueueRequest) ProtoMessage ¶
func (*NewQueueRequest) ProtoMessage()
func (*NewQueueRequest) Reset ¶
func (m *NewQueueRequest) Reset()
func (*NewQueueRequest) String ¶
func (this *NewQueueRequest) String() string
type NewQueueResponse ¶
type NewQueueResponse struct {
Queue *Queue `protobuf:"bytes,1,opt,name=queue" json:"queue,omitempty"`
}
func (*NewQueueResponse) Descriptor ¶
func (*NewQueueResponse) Descriptor() ([]byte, []int)
func (*NewQueueResponse) GetQueue ¶
func (m *NewQueueResponse) GetQueue() *Queue
func (*NewQueueResponse) GoString ¶
func (this *NewQueueResponse) GoString() string
func (*NewQueueResponse) ProtoMessage ¶
func (*NewQueueResponse) ProtoMessage()
func (*NewQueueResponse) Reset ¶
func (m *NewQueueResponse) Reset()
func (*NewQueueResponse) String ¶
func (this *NewQueueResponse) String() string
type PeekRequest ¶
type PeekRequest struct {
QueueId string `protobuf:"bytes,1,opt,name=queue_id,json=queueId,proto3" json:"queue_id,omitempty"`
}
func (*PeekRequest) Descriptor ¶
func (*PeekRequest) Descriptor() ([]byte, []int)
func (*PeekRequest) GetQueueId ¶
func (m *PeekRequest) GetQueueId() string
func (*PeekRequest) GoString ¶
func (this *PeekRequest) GoString() string
func (*PeekRequest) ProtoMessage ¶
func (*PeekRequest) ProtoMessage()
func (*PeekRequest) Reset ¶
func (m *PeekRequest) Reset()
func (*PeekRequest) String ¶
func (this *PeekRequest) String() string
type PeekResponse ¶
type PeekResponse struct {
Message *Message `protobuf:"bytes,1,opt,name=message" json:"message,omitempty"`
}
func (*PeekResponse) Descriptor ¶
func (*PeekResponse) Descriptor() ([]byte, []int)
func (*PeekResponse) GetMessage ¶
func (m *PeekResponse) GetMessage() *Message
func (*PeekResponse) GoString ¶
func (this *PeekResponse) GoString() string
func (*PeekResponse) ProtoMessage ¶
func (*PeekResponse) ProtoMessage()
func (*PeekResponse) Reset ¶
func (m *PeekResponse) Reset()
func (*PeekResponse) String ¶
func (this *PeekResponse) String() string
type PopRequest ¶
type PopRequest struct {
QueueId string `protobuf:"bytes,1,opt,name=queue_id,json=queueId,proto3" json:"queue_id,omitempty"`
}
func (*PopRequest) Descriptor ¶
func (*PopRequest) Descriptor() ([]byte, []int)
func (*PopRequest) GetQueueId ¶
func (m *PopRequest) GetQueueId() string
func (*PopRequest) GoString ¶
func (this *PopRequest) GoString() string
func (*PopRequest) ProtoMessage ¶
func (*PopRequest) ProtoMessage()
func (*PopRequest) Reset ¶
func (m *PopRequest) Reset()
func (*PopRequest) String ¶
func (this *PopRequest) String() string
type PopResponse ¶
type PopResponse struct {
Message *Message `protobuf:"bytes,1,opt,name=message" json:"message,omitempty"`
}
func (*PopResponse) Descriptor ¶
func (*PopResponse) Descriptor() ([]byte, []int)
func (*PopResponse) GetMessage ¶
func (m *PopResponse) GetMessage() *Message
func (*PopResponse) GoString ¶
func (this *PopResponse) GoString() string
func (*PopResponse) ProtoMessage ¶
func (*PopResponse) ProtoMessage()
func (*PopResponse) Reset ¶
func (m *PopResponse) Reset()
func (*PopResponse) String ¶
func (this *PopResponse) String() string
type QClient ¶
type QClient interface { ListQueues(ctx context.Context, in *ListQueuesRequest, opts ...grpc.CallOption) (*ListQueuesResponse, error) NewQueue(ctx context.Context, in *NewQueueRequest, opts ...grpc.CallOption) (*NewQueueResponse, error) GetQueue(ctx context.Context, in *GetQueueRequest, opts ...grpc.CallOption) (*GetQueueResponse, error) DeleteQueue(ctx context.Context, in *DeleteQueueRequest, opts ...grpc.CallOption) (*DeleteQueueResponse, error) AddQueueTag(ctx context.Context, in *AddQueueTagRequest, opts ...grpc.CallOption) (*AddQueueTagResponse, error) DeleteQueueTag(ctx context.Context, in *DeleteQueueTagRequest, opts ...grpc.CallOption) (*DeleteQueueTagResponse, error) Add(ctx context.Context, in *AddRequest, opts ...grpc.CallOption) (*AddResponse, error) Pop(ctx context.Context, in *PopRequest, opts ...grpc.CallOption) (*PopResponse, error) Peek(ctx context.Context, in *PeekRequest, opts ...grpc.CallOption) (*PeekResponse, error) }
func NewQClient ¶
func NewQClient(cc *grpc.ClientConn) QClient
type QServer ¶
type QServer interface { ListQueues(context.Context, *ListQueuesRequest) (*ListQueuesResponse, error) NewQueue(context.Context, *NewQueueRequest) (*NewQueueResponse, error) GetQueue(context.Context, *GetQueueRequest) (*GetQueueResponse, error) DeleteQueue(context.Context, *DeleteQueueRequest) (*DeleteQueueResponse, error) AddQueueTag(context.Context, *AddQueueTagRequest) (*AddQueueTagResponse, error) DeleteQueueTag(context.Context, *DeleteQueueTagRequest) (*DeleteQueueTagResponse, error) Add(context.Context, *AddRequest) (*AddResponse, error) Pop(context.Context, *PopRequest) (*PopResponse, error) Peek(context.Context, *PeekRequest) (*PeekResponse, error) }
type Queue ¶
type Queue struct { Meta *Metadata `protobuf:"bytes,1,opt,name=meta" json:"meta,omitempty"` Store Queue_Store `protobuf:"varint,2,opt,name=store,proto3,enum=proto.Queue_Store" json:"store,omitempty"` }
func (*Queue) Descriptor ¶
func (*Queue) GetStore ¶
func (m *Queue) GetStore() Queue_Store
func (*Queue) ProtoMessage ¶
func (*Queue) ProtoMessage()
type Queue_Store ¶
type Queue_Store int32
const ( UNKNOWN Queue_Store = 0 MEMORY Queue_Store = 1 BOLTDB Queue_Store = 2 )
func (Queue_Store) EnumDescriptor ¶
func (Queue_Store) EnumDescriptor() ([]byte, []int)
func (Queue_Store) String ¶
func (x Queue_Store) String() string
type Tag ¶
type Tag struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` }
func (*Tag) Descriptor ¶
func (*Tag) ProtoMessage ¶
func (*Tag) ProtoMessage()