proto

package
v0.0.0-...-aba326a Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2017 License: Apache-2.0 Imports: 25 Imported by: 0

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

Constants

This section is empty.

Variables

FromStore maps q.Store to its protobuf generated equivalent.

View Source
var Queue_Store_name = map[int32]string{
	0: "UNKNOWN",
	1: "MEMORY",
	2: "BOLTDB",
}
View Source
var Queue_Store_value = map[string]int32{
	"UNKNOWN": 0,
	"MEMORY":  1,
	"BOLTDB":  2,
}
View Source
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 ParseID

func ParseID(id string) (uuid.UUID, error)

ParseID parses a string ID into a uuid.UUID.

func RegisterQHandler

func RegisterQHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

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

func RegisterQServer(s *grpc.Server, srv QServer)

func ToMessage

func ToMessage(m *Message) (*q.Message, error)

ToMessage converts protobuf generated code into a *q.Message

func ToMeta

func ToMeta(m *Metadata) (*q.Metadata, error)

ToMeta converts protobuf generated code into q.Metadata.

func ToTags

func ToTags(t []*Tag) []q.Tag

ToTags converts protobuf generated code to a slice of q.Tag.

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

func FromMessage(m *q.Message) (*Message, error)

FromMessage converts a *q.Message to its protobuf generated equivalent.

func (*Message) Descriptor

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

func (*Message) GetMeta

func (m *Message) GetMeta() *Metadata

func (*Message) GetPayload

func (m *Message) GetPayload() []byte

func (*Message) GoString

func (this *Message) GoString() string

func (*Message) ProtoMessage

func (*Message) ProtoMessage()

func (*Message) Reset

func (m *Message) Reset()

func (*Message) String

func (this *Message) String() string

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 FromMeta

func FromMeta(m *q.Metadata) (*Metadata, error)

FromMeta converts q.Metadata to its protobuf generated equivalent.

func (*Metadata) Descriptor

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

func (*Metadata) GetCreated

func (m *Metadata) GetCreated() *google_protobuf1.Timestamp

func (*Metadata) GetId

func (m *Metadata) GetId() string

func (*Metadata) GetTags

func (m *Metadata) GetTags() []*Tag

func (*Metadata) GoString

func (this *Metadata) GoString() string

func (*Metadata) ProtoMessage

func (*Metadata) ProtoMessage()

func (*Metadata) Reset

func (m *Metadata) Reset()

func (*Metadata) String

func (this *Metadata) String() string

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

func NewQClient

func NewQClient(cc *grpc.ClientConn) QClient

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 FromQueue

func FromQueue(queue q.Queue) (*Queue, error)

FromQueue converts a q.Queue to its protobuf generated equivalent.

func (*Queue) Descriptor

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

func (*Queue) GetMeta

func (m *Queue) GetMeta() *Metadata

func (*Queue) GetStore

func (m *Queue) GetStore() Queue_Store

func (*Queue) GoString

func (this *Queue) GoString() string

func (*Queue) ProtoMessage

func (*Queue) ProtoMessage()

func (*Queue) Reset

func (m *Queue) Reset()

func (*Queue) String

func (this *Queue) String() string

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 FromTags

func FromTags(t []q.Tag) []*Tag

FromTags converts q.Tag to its protobuf generated equivalent.

func (*Tag) Descriptor

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

func (*Tag) GetKey

func (m *Tag) GetKey() string

func (*Tag) GetValue

func (m *Tag) GetValue() string

func (*Tag) GoString

func (this *Tag) GoString() string

func (*Tag) ProtoMessage

func (*Tag) ProtoMessage()

func (*Tag) Reset

func (m *Tag) Reset()

func (*Tag) String

func (this *Tag) String() string

Jump to

Keyboard shortcuts

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