Documentation ¶
Overview ¶
Package image_service is a generated protocol buffer package.
It is generated from these files:
image_service.proto
It has these top-level messages:
Image ImageOperation ImageStoreRequest ImageSyncResponse DeleteRequest DeleteResponse
Index ¶
- Variables
- func RegisterImageServiceServer(s *grpc.Server, srv ImageServiceServer)
- type DeleteRequest
- type DeleteResponse
- type Format
- type Image
- type ImageOperation
- func (*ImageOperation) Descriptor() ([]byte, []int)
- func (m *ImageOperation) GetCompression() int32
- func (m *ImageOperation) GetCrop() bool
- func (m *ImageOperation) GetEnlarge() bool
- func (m *ImageOperation) GetFlip() bool
- func (m *ImageOperation) GetFormat() Format
- func (m *ImageOperation) GetHeight() int32
- func (m *ImageOperation) GetInterlace() bool
- func (m *ImageOperation) GetQuality() int32
- func (m *ImageOperation) GetVersionName() string
- func (m *ImageOperation) GetWidth() int32
- func (*ImageOperation) ProtoMessage()
- func (m *ImageOperation) Reset()
- func (m *ImageOperation) String() string
- type ImageServiceClient
- type ImageServiceServer
- type ImageService_StoreClient
- type ImageService_StoreServer
- type ImageStoreRequest
- func (*ImageStoreRequest) Descriptor() ([]byte, []int)
- func (m *ImageStoreRequest) GetData() []byte
- func (m *ImageStoreRequest) GetFilename() string
- func (m *ImageStoreRequest) GetOps() []*ImageOperation
- func (*ImageStoreRequest) ProtoMessage()
- func (m *ImageStoreRequest) Reset()
- func (m *ImageStoreRequest) String() string
- type ImageSyncResponse
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultOps = []*ImageOperation{ {Quality: 90, Crop: true, Width: 200, Height: 200, VersionName: "small"}, {Quality: 90, Crop: true, Width: 600, Height: 600, VersionName: "medium"}, {Quality: 90, Crop: true, Width: 1200, Height: 1200, VersionName: "large"}, }
View Source
var Format_name = map[int32]string{
0: "JPEG",
1: "WEBP",
2: "PNG",
}
View Source
var Format_value = map[string]int32{
"JPEG": 0,
"WEBP": 1,
"PNG": 2,
}
Functions ¶
func RegisterImageServiceServer ¶
func RegisterImageServiceServer(s *grpc.Server, srv ImageServiceServer)
Types ¶
type DeleteRequest ¶
type DeleteRequest struct {
Filename string `protobuf:"bytes,1,opt,name=filename" json:"filename,omitempty"`
}
func (*DeleteRequest) Descriptor ¶
func (*DeleteRequest) Descriptor() ([]byte, []int)
func (*DeleteRequest) GetFilename ¶
func (m *DeleteRequest) GetFilename() string
func (*DeleteRequest) ProtoMessage ¶
func (*DeleteRequest) ProtoMessage()
func (*DeleteRequest) Reset ¶
func (m *DeleteRequest) Reset()
func (*DeleteRequest) String ¶
func (m *DeleteRequest) String() string
type DeleteResponse ¶
type DeleteResponse struct {
Filename string `protobuf:"bytes,1,opt,name=filename" json:"filename,omitempty"`
}
func (*DeleteResponse) Descriptor ¶
func (*DeleteResponse) Descriptor() ([]byte, []int)
func (*DeleteResponse) GetFilename ¶
func (m *DeleteResponse) GetFilename() string
func (*DeleteResponse) ProtoMessage ¶
func (*DeleteResponse) ProtoMessage()
func (*DeleteResponse) Reset ¶
func (m *DeleteResponse) Reset()
func (*DeleteResponse) String ¶
func (m *DeleteResponse) String() string
type Image ¶
type Image struct { VersionName string `protobuf:"bytes,1,opt,name=version_name,json=versionName" json:"version_name,omitempty"` Filename string `protobuf:"bytes,2,opt,name=filename" json:"filename,omitempty"` Url string `protobuf:"bytes,3,opt,name=url" json:"url,omitempty"` }
func (*Image) Descriptor ¶
func (*Image) GetFilename ¶
func (*Image) GetVersionName ¶
func (*Image) ProtoMessage ¶
func (*Image) ProtoMessage()
type ImageOperation ¶
type ImageOperation struct { VersionName string `protobuf:"bytes,1,opt,name=version_name,json=versionName" json:"version_name,omitempty"` Height int32 `protobuf:"varint,2,opt,name=height" json:"height,omitempty"` Width int32 `protobuf:"varint,3,opt,name=width" json:"width,omitempty"` Quality int32 `protobuf:"varint,4,opt,name=quality" json:"quality,omitempty"` Compression int32 `protobuf:"varint,5,opt,name=compression" json:"compression,omitempty"` Crop bool `protobuf:"varint,6,opt,name=crop" json:"crop,omitempty"` Enlarge bool `protobuf:"varint,7,opt,name=enlarge" json:"enlarge,omitempty"` Flip bool `protobuf:"varint,8,opt,name=flip" json:"flip,omitempty"` Interlace bool `protobuf:"varint,9,opt,name=interlace" json:"interlace,omitempty"` Format Format `protobuf:"varint,10,opt,name=format,enum=image_service.Format" json:"format,omitempty"` }
func (*ImageOperation) Descriptor ¶
func (*ImageOperation) Descriptor() ([]byte, []int)
func (*ImageOperation) GetCompression ¶
func (m *ImageOperation) GetCompression() int32
func (*ImageOperation) GetCrop ¶
func (m *ImageOperation) GetCrop() bool
func (*ImageOperation) GetEnlarge ¶
func (m *ImageOperation) GetEnlarge() bool
func (*ImageOperation) GetFlip ¶
func (m *ImageOperation) GetFlip() bool
func (*ImageOperation) GetFormat ¶
func (m *ImageOperation) GetFormat() Format
func (*ImageOperation) GetHeight ¶
func (m *ImageOperation) GetHeight() int32
func (*ImageOperation) GetInterlace ¶
func (m *ImageOperation) GetInterlace() bool
func (*ImageOperation) GetQuality ¶
func (m *ImageOperation) GetQuality() int32
func (*ImageOperation) GetVersionName ¶
func (m *ImageOperation) GetVersionName() string
func (*ImageOperation) GetWidth ¶
func (m *ImageOperation) GetWidth() int32
func (*ImageOperation) ProtoMessage ¶
func (*ImageOperation) ProtoMessage()
func (*ImageOperation) Reset ¶
func (m *ImageOperation) Reset()
func (*ImageOperation) String ¶
func (m *ImageOperation) String() string
type ImageServiceClient ¶
type ImageServiceClient interface { Store(ctx context.Context, in *ImageStoreRequest, opts ...grpc.CallOption) (ImageService_StoreClient, error) StoreSync(ctx context.Context, in *ImageStoreRequest, opts ...grpc.CallOption) (*ImageSyncResponse, error) Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteResponse, error) }
func NewImageServiceClient ¶
func NewImageServiceClient(cc *grpc.ClientConn) ImageServiceClient
type ImageServiceServer ¶
type ImageServiceServer interface { Store(*ImageStoreRequest, ImageService_StoreServer) error StoreSync(context.Context, *ImageStoreRequest) (*ImageSyncResponse, error) Delete(context.Context, *DeleteRequest) (*DeleteResponse, error) }
type ImageService_StoreClient ¶
type ImageService_StoreClient interface { Recv() (*Image, error) grpc.ClientStream }
type ImageService_StoreServer ¶
type ImageService_StoreServer interface { Send(*Image) error grpc.ServerStream }
type ImageStoreRequest ¶
type ImageStoreRequest struct { Filename string `protobuf:"bytes,1,opt,name=filename" json:"filename,omitempty"` Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` Ops []*ImageOperation `protobuf:"bytes,3,rep,name=ops" json:"ops,omitempty"` }
func (*ImageStoreRequest) Descriptor ¶
func (*ImageStoreRequest) Descriptor() ([]byte, []int)
func (*ImageStoreRequest) GetData ¶
func (m *ImageStoreRequest) GetData() []byte
func (*ImageStoreRequest) GetFilename ¶
func (m *ImageStoreRequest) GetFilename() string
func (*ImageStoreRequest) GetOps ¶
func (m *ImageStoreRequest) GetOps() []*ImageOperation
func (*ImageStoreRequest) ProtoMessage ¶
func (*ImageStoreRequest) ProtoMessage()
func (*ImageStoreRequest) Reset ¶
func (m *ImageStoreRequest) Reset()
func (*ImageStoreRequest) String ¶
func (m *ImageStoreRequest) String() string
type ImageSyncResponse ¶
type ImageSyncResponse struct {
Images []*Image `protobuf:"bytes,1,rep,name=images" json:"images,omitempty"`
}
func (*ImageSyncResponse) Descriptor ¶
func (*ImageSyncResponse) Descriptor() ([]byte, []int)
func (*ImageSyncResponse) GetImages ¶
func (m *ImageSyncResponse) GetImages() []*Image
func (*ImageSyncResponse) ProtoMessage ¶
func (*ImageSyncResponse) ProtoMessage()
func (*ImageSyncResponse) Reset ¶
func (m *ImageSyncResponse) Reset()
func (*ImageSyncResponse) String ¶
func (m *ImageSyncResponse) String() string
Click to show internal directories.
Click to hide internal directories.