photo

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: 17 Imported by: 0

Documentation

Overview

Package photo is a reverse proxy.

It translates gRPC into GraphQL.

Index

Constants

This section is empty.

Variables

View Source
var PhotoCategory_name = map[int32]string{
	0: "SELFIE",
	1: "PORTRAIT",
	2: "ACTION",
	3: "LANDSCAPE",
	4: "GRAPHIC",
}
View Source
var PhotoCategory_value = map[string]int32{
	"SELFIE":    0,
	"PORTRAIT":  1,
	"ACTION":    2,
	"LANDSCAPE": 3,
	"GRAPHIC":   4,
}

Functions

func RegisterPhotoServiceFromEndpoint

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

func RegisterPhotoServiceHandler

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

func RegisterPhotoServiceHandlerClient

func RegisterPhotoServiceHandlerClient(mux *runtime.ServeMux, client PhotoServiceClient) error

func RegisterPhotoServiceServer

func RegisterPhotoServiceServer(s *grpc.Server, srv PhotoServiceServer)

Types

type AllPhotosResponse

type AllPhotosResponse struct {
	Photos               []*Photo `protobuf:"bytes,1,rep,name=photos,proto3" json:"photos,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*AllPhotosResponse) Descriptor

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

func (*AllPhotosResponse) GetPhotos

func (m *AllPhotosResponse) GetPhotos() []*Photo

func (*AllPhotosResponse) ProtoMessage

func (*AllPhotosResponse) ProtoMessage()

func (*AllPhotosResponse) Reset

func (m *AllPhotosResponse) Reset()

func (*AllPhotosResponse) String

func (m *AllPhotosResponse) String() string

func (*AllPhotosResponse) XXX_DiscardUnknown

func (m *AllPhotosResponse) XXX_DiscardUnknown()

func (*AllPhotosResponse) XXX_Marshal

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

func (*AllPhotosResponse) XXX_Merge

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

func (*AllPhotosResponse) XXX_Size

func (m *AllPhotosResponse) XXX_Size() int

func (*AllPhotosResponse) XXX_Unmarshal

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

type Photo

type Photo struct {
	Id                   string               `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Name                 string               `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Url                  string               `protobuf:"bytes,3,opt,name=url,proto3" json:"url,omitempty"`
	Description          string               `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
	Category             PhotoCategory        `protobuf:"varint,5,opt,name=category,proto3,enum=photo.PhotoCategory" json:"category,omitempty"`
	Created              *timestamp.Timestamp `protobuf:"bytes,6,opt,name=created,proto3" json:"created,omitempty"`
	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
	XXX_unrecognized     []byte               `json:"-"`
	XXX_sizecache        int32                `json:"-"`
}

func (*Photo) Descriptor

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

func (*Photo) GetCategory

func (m *Photo) GetCategory() PhotoCategory

func (*Photo) GetCreated

func (m *Photo) GetCreated() *timestamp.Timestamp

func (*Photo) GetDescription

func (m *Photo) GetDescription() string

func (*Photo) GetId

func (m *Photo) GetId() string

func (*Photo) GetName

func (m *Photo) GetName() string

func (*Photo) GetUrl

func (m *Photo) GetUrl() string

func (*Photo) ProtoMessage

func (*Photo) ProtoMessage()

func (*Photo) Reset

func (m *Photo) Reset()

func (*Photo) String

func (m *Photo) String() string

func (*Photo) XXX_DiscardUnknown

func (m *Photo) XXX_DiscardUnknown()

func (*Photo) XXX_Marshal

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

func (*Photo) XXX_Merge

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

func (*Photo) XXX_Size

func (m *Photo) XXX_Size() int

func (*Photo) XXX_Unmarshal

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

type PhotoCategory

type PhotoCategory int32
const (
	PhotoCategory_SELFIE    PhotoCategory = 0
	PhotoCategory_PORTRAIT  PhotoCategory = 1
	PhotoCategory_ACTION    PhotoCategory = 2
	PhotoCategory_LANDSCAPE PhotoCategory = 3
	PhotoCategory_GRAPHIC   PhotoCategory = 4
)

func (PhotoCategory) EnumDescriptor

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

func (PhotoCategory) String

func (x PhotoCategory) String() string

type PhotoRequest

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

func (*PhotoRequest) Descriptor

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

func (*PhotoRequest) GetId

func (m *PhotoRequest) GetId() string

func (*PhotoRequest) ProtoMessage

func (*PhotoRequest) ProtoMessage()

func (*PhotoRequest) Reset

func (m *PhotoRequest) Reset()

func (*PhotoRequest) String

func (m *PhotoRequest) String() string

func (*PhotoRequest) XXX_DiscardUnknown

func (m *PhotoRequest) XXX_DiscardUnknown()

func (*PhotoRequest) XXX_Marshal

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

func (*PhotoRequest) XXX_Merge

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

func (*PhotoRequest) XXX_Size

func (m *PhotoRequest) XXX_Size() int

func (*PhotoRequest) XXX_Unmarshal

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

type PhotoResponse

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

func (*PhotoResponse) Descriptor

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

func (*PhotoResponse) GetPhoto

func (m *PhotoResponse) GetPhoto() *Photo

func (*PhotoResponse) ProtoMessage

func (*PhotoResponse) ProtoMessage()

func (*PhotoResponse) Reset

func (m *PhotoResponse) Reset()

func (*PhotoResponse) String

func (m *PhotoResponse) String() string

func (*PhotoResponse) XXX_DiscardUnknown

func (m *PhotoResponse) XXX_DiscardUnknown()

func (*PhotoResponse) XXX_Marshal

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

func (*PhotoResponse) XXX_Merge

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

func (*PhotoResponse) XXX_Size

func (m *PhotoResponse) XXX_Size() int

func (*PhotoResponse) XXX_Unmarshal

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

type PhotoServiceClient

type PhotoServiceClient interface {
	TotalPhotos(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*TotalPhotosResponse, error)
	AllPhotos(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*AllPhotosResponse, error)
	Photo(ctx context.Context, in *PhotoRequest, opts ...grpc.CallOption) (*PhotoResponse, error)
	PostPhoto(ctx context.Context, in *PostPhotoRequest, opts ...grpc.CallOption) (*PhotoResponse, error)
	TagPhoto(ctx context.Context, in *TagPhotoRequest, opts ...grpc.CallOption) (*empty.Empty, error)
}

PhotoServiceClient is the client API for PhotoService service.

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

func NewPhotoServiceClient

func NewPhotoServiceClient(cc *grpc.ClientConn) PhotoServiceClient

type PhotoServiceServer

PhotoServiceServer is the server API for PhotoService service.

type PostPhotoRequest

type PostPhotoRequest struct {
	Name                 string        `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Category             PhotoCategory `protobuf:"varint,2,opt,name=category,proto3,enum=photo.PhotoCategory" json:"category,omitempty"`
	Description          string        `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
	XXX_NoUnkeyedLiteral struct{}      `json:"-"`
	XXX_unrecognized     []byte        `json:"-"`
	XXX_sizecache        int32         `json:"-"`
}

func (*PostPhotoRequest) Descriptor

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

func (*PostPhotoRequest) GetCategory

func (m *PostPhotoRequest) GetCategory() PhotoCategory

func (*PostPhotoRequest) GetDescription

func (m *PostPhotoRequest) GetDescription() string

func (*PostPhotoRequest) GetName

func (m *PostPhotoRequest) GetName() string

func (*PostPhotoRequest) ProtoMessage

func (*PostPhotoRequest) ProtoMessage()

func (*PostPhotoRequest) Reset

func (m *PostPhotoRequest) Reset()

func (*PostPhotoRequest) String

func (m *PostPhotoRequest) String() string

func (*PostPhotoRequest) XXX_DiscardUnknown

func (m *PostPhotoRequest) XXX_DiscardUnknown()

func (*PostPhotoRequest) XXX_Marshal

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

func (*PostPhotoRequest) XXX_Merge

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

func (*PostPhotoRequest) XXX_Size

func (m *PostPhotoRequest) XXX_Size() int

func (*PostPhotoRequest) XXX_Unmarshal

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

type TagPhotoRequest

type TagPhotoRequest struct {
	GithubLogin          string   `protobuf:"bytes,1,opt,name=github_login,json=githubLogin,proto3" json:"github_login,omitempty"`
	PhotoId              string   `protobuf:"bytes,2,opt,name=photo_id,json=photoId,proto3" json:"photo_id,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*TagPhotoRequest) Descriptor

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

func (*TagPhotoRequest) GetGithubLogin

func (m *TagPhotoRequest) GetGithubLogin() string

func (*TagPhotoRequest) GetPhotoId

func (m *TagPhotoRequest) GetPhotoId() string

func (*TagPhotoRequest) ProtoMessage

func (*TagPhotoRequest) ProtoMessage()

func (*TagPhotoRequest) Reset

func (m *TagPhotoRequest) Reset()

func (*TagPhotoRequest) String

func (m *TagPhotoRequest) String() string

func (*TagPhotoRequest) XXX_DiscardUnknown

func (m *TagPhotoRequest) XXX_DiscardUnknown()

func (*TagPhotoRequest) XXX_Marshal

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

func (*TagPhotoRequest) XXX_Merge

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

func (*TagPhotoRequest) XXX_Size

func (m *TagPhotoRequest) XXX_Size() int

func (*TagPhotoRequest) XXX_Unmarshal

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

type TotalPhotosResponse

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

func (*TotalPhotosResponse) Descriptor

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

func (*TotalPhotosResponse) GetTotal

func (m *TotalPhotosResponse) GetTotal() int32

func (*TotalPhotosResponse) ProtoMessage

func (*TotalPhotosResponse) ProtoMessage()

func (*TotalPhotosResponse) Reset

func (m *TotalPhotosResponse) Reset()

func (*TotalPhotosResponse) String

func (m *TotalPhotosResponse) String() string

func (*TotalPhotosResponse) XXX_DiscardUnknown

func (m *TotalPhotosResponse) XXX_DiscardUnknown()

func (*TotalPhotosResponse) XXX_Marshal

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

func (*TotalPhotosResponse) XXX_Merge

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

func (*TotalPhotosResponse) XXX_Size

func (m *TotalPhotosResponse) XXX_Size() int

func (*TotalPhotosResponse) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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