red

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package red is a reverse proxy.

It translates gRPC into GraphQL.

Index

Constants

This section is empty.

Variables

View Source
var ListRequest_Type_name = map[int32]string{
	0: "UNKNOWN",
	1: "ENABLED",
}
View Source
var ListRequest_Type_value = map[string]int32{
	"UNKNOWN": 0,
	"ENABLED": 1,
}
View Source
var Size_name = map[int32]string{
	0: "SMALL",
	1: "MIDDLE",
	2: "LARGE",
}
View Source
var Size_value = map[string]int32{
	"SMALL":  0,
	"MIDDLE": 1,
	"LARGE":  2,
}

Functions

func RegisterRedServiceFromEndpoint

func RegisterRedServiceFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

func RegisterRedServiceHandler

func RegisterRedServiceHandler(mux *runtime.ServeMux, conn *grpc.ClientConn) error

func RegisterRedServiceHandlerClient

func RegisterRedServiceHandlerClient(mux *runtime.ServeMux, client RedServiceClient) error

Types

type CreateRequest

type CreateRequest struct {
	Id                   int32    `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Name                 string   `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*CreateRequest) Descriptor

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

func (*CreateRequest) GetId

func (m *CreateRequest) GetId() int32

func (*CreateRequest) GetName

func (m *CreateRequest) GetName() string

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 {
	Red                  *Red     `protobuf:"bytes,1,opt,name=red,proto3" json:"red,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*CreateResponse) Descriptor

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

func (*CreateResponse) GetRed

func (m *CreateResponse) GetRed() *Red

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                   int32    `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*DeleteRequest) Descriptor

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

func (*DeleteRequest) GetId

func (m *DeleteRequest) GetId() int32

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 {
	Id                   int32    `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*DeleteResponse) Descriptor

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

func (*DeleteResponse) GetId

func (m *DeleteResponse) GetId() int32

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 GetRequest

type GetRequest struct {
	Id                   int32    `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*GetRequest) Descriptor

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

func (*GetRequest) GetId

func (m *GetRequest) GetId() int32

func (*GetRequest) ProtoMessage

func (*GetRequest) ProtoMessage()

func (*GetRequest) Reset

func (m *GetRequest) Reset()

func (*GetRequest) String

func (m *GetRequest) String() string

func (*GetRequest) XXX_DiscardUnknown

func (m *GetRequest) XXX_DiscardUnknown()

func (*GetRequest) XXX_Marshal

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

func (*GetRequest) XXX_Merge

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

func (*GetRequest) XXX_Size

func (m *GetRequest) XXX_Size() int

func (*GetRequest) XXX_Unmarshal

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

type GetResponse

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

func (*GetResponse) Descriptor

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

func (*GetResponse) GetRed

func (m *GetResponse) GetRed() *Red

func (*GetResponse) ProtoMessage

func (*GetResponse) ProtoMessage()

func (*GetResponse) Reset

func (m *GetResponse) Reset()

func (*GetResponse) String

func (m *GetResponse) String() string

func (*GetResponse) XXX_DiscardUnknown

func (m *GetResponse) XXX_DiscardUnknown()

func (*GetResponse) XXX_Marshal

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

func (*GetResponse) XXX_Merge

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

func (*GetResponse) XXX_Size

func (m *GetResponse) XXX_Size() int

func (*GetResponse) XXX_Unmarshal

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

type ListRequest

type ListRequest struct {
	Offset               int32              `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"`
	Limit                int32              `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"`
	Size                 Size               `protobuf:"varint,3,opt,name=size,proto3,enum=red.Size" json:"size,omitempty"`
	Filters              []ListRequest_Type `protobuf:"varint,4,rep,packed,name=filters,proto3,enum=red.ListRequest_Type" json:"filters,omitempty"`
	XXX_NoUnkeyedLiteral struct{}           `json:"-"`
	XXX_unrecognized     []byte             `json:"-"`
	XXX_sizecache        int32              `json:"-"`
}

func (*ListRequest) Descriptor

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

func (*ListRequest) GetFilters

func (m *ListRequest) GetFilters() []ListRequest_Type

func (*ListRequest) GetLimit

func (m *ListRequest) GetLimit() int32

func (*ListRequest) GetOffset

func (m *ListRequest) GetOffset() int32

func (*ListRequest) GetSize

func (m *ListRequest) GetSize() Size

func (*ListRequest) ProtoMessage

func (*ListRequest) ProtoMessage()

func (*ListRequest) Reset

func (m *ListRequest) Reset()

func (*ListRequest) String

func (m *ListRequest) String() string

func (*ListRequest) XXX_DiscardUnknown

func (m *ListRequest) XXX_DiscardUnknown()

func (*ListRequest) XXX_Marshal

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

func (*ListRequest) XXX_Merge

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

func (*ListRequest) XXX_Size

func (m *ListRequest) XXX_Size() int

func (*ListRequest) XXX_Unmarshal

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

type ListRequest_Type

type ListRequest_Type int32
const (
	ListRequest_UNKNOWN ListRequest_Type = 0
	ListRequest_ENABLED ListRequest_Type = 1
)

func (ListRequest_Type) EnumDescriptor

func (ListRequest_Type) EnumDescriptor() ([]byte, []int)

func (ListRequest_Type) String

func (x ListRequest_Type) String() string

type ListResponse

type ListResponse struct {
	Reds                 []*Red   `protobuf:"bytes,1,rep,name=reds,proto3" json:"reds,omitempty"`
	Total                int32    `protobuf:"varint,2,opt,name=total,proto3" json:"total,omitempty"`
	Limit                int32    `protobuf:"varint,3,opt,name=limit,proto3" json:"limit,omitempty"`
	Size                 int32    `protobuf:"varint,4,opt,name=size,proto3" json:"size,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ListResponse) Descriptor

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

func (*ListResponse) GetLimit

func (m *ListResponse) GetLimit() int32

func (*ListResponse) GetReds

func (m *ListResponse) GetReds() []*Red

func (*ListResponse) GetSize

func (m *ListResponse) GetSize() int32

func (*ListResponse) GetTotal

func (m *ListResponse) GetTotal() int32

func (*ListResponse) ProtoMessage

func (*ListResponse) ProtoMessage()

func (*ListResponse) Reset

func (m *ListResponse) Reset()

func (*ListResponse) String

func (m *ListResponse) String() string

func (*ListResponse) XXX_DiscardUnknown

func (m *ListResponse) XXX_DiscardUnknown()

func (*ListResponse) XXX_Marshal

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

func (*ListResponse) XXX_Merge

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

func (*ListResponse) XXX_Size

func (m *ListResponse) XXX_Size() int

func (*ListResponse) XXX_Unmarshal

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

type Red

type Red struct {
	Id                   int32    `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Name                 string   `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	CreatedAt            int64    `protobuf:"varint,3,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	UpdatedAt            int64    `protobuf:"varint,4,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
	Enabled              bool     `protobuf:"varint,5,opt,name=enabled,proto3" json:"enabled,omitempty"`
	Point                float64  `protobuf:"fixed64,6,opt,name=point,proto3" json:"point,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Red) Descriptor

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

func (*Red) GetCreatedAt

func (m *Red) GetCreatedAt() int64

func (*Red) GetEnabled

func (m *Red) GetEnabled() bool

func (*Red) GetId

func (m *Red) GetId() int32

func (*Red) GetName

func (m *Red) GetName() string

func (*Red) GetPoint

func (m *Red) GetPoint() float64

func (*Red) GetUpdatedAt

func (m *Red) GetUpdatedAt() int64

func (*Red) ProtoMessage

func (*Red) ProtoMessage()

func (*Red) Reset

func (m *Red) Reset()

func (*Red) String

func (m *Red) String() string

func (*Red) XXX_DiscardUnknown

func (m *Red) XXX_DiscardUnknown()

func (*Red) XXX_Marshal

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

func (*Red) XXX_Merge

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

func (*Red) XXX_Size

func (m *Red) XXX_Size() int

func (*Red) XXX_Unmarshal

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

type RedServiceResolver

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

func (*RedServiceResolver) FieldCreate

func (r *RedServiceResolver) FieldCreate() *graphql.Field

func (*RedServiceResolver) FieldDelete

func (r *RedServiceResolver) FieldDelete() *graphql.Field

func (*RedServiceResolver) FieldGet

func (r *RedServiceResolver) FieldGet() *graphql.Field

func (*RedServiceResolver) FieldList

func (r *RedServiceResolver) FieldList() *graphql.Field

func (*RedServiceResolver) FieldUpdate

func (r *RedServiceResolver) FieldUpdate() *graphql.Field

type Size

type Size int32
const (
	Size_SMALL  Size = 0
	Size_MIDDLE Size = 1
	Size_LARGE  Size = 2
)

func (Size) EnumDescriptor

func (Size) EnumDescriptor() ([]byte, []int)

func (Size) String

func (x Size) String() string

type UpdateRequest

type UpdateRequest struct {
	Id                   int32    `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Name                 string   `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*UpdateRequest) Descriptor

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

func (*UpdateRequest) GetId

func (m *UpdateRequest) GetId() int32

func (*UpdateRequest) GetName

func (m *UpdateRequest) GetName() string

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 {
	Red                  *Red     `protobuf:"bytes,1,opt,name=red,proto3" json:"red,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*UpdateResponse) Descriptor

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

func (*UpdateResponse) GetRed

func (m *UpdateResponse) GetRed() *Red

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