Documentation ¶
Index ¶
- Variables
- func RegisterFluxImageServer(s grpc.ServiceRegistrar, srv FluxImageServer)
- type FluxImageClient
- type FluxImageServer
- type FluxImage_ResizeClient
- type FluxImage_ResizeServer
- type ImageType
- type ObjectFit
- type ResizeOptions
- func (*ResizeOptions) Descriptor() ([]byte, []int)deprecated
- func (x *ResizeOptions) GetBackgroundColor() string
- func (x *ResizeOptions) GetHeight() int32
- func (x *ResizeOptions) GetImageType() ImageType
- func (x *ResizeOptions) GetObjectFit() ObjectFit
- func (x *ResizeOptions) GetQuality() int32
- func (x *ResizeOptions) GetWidth() int32
- func (*ResizeOptions) ProtoMessage()
- func (x *ResizeOptions) ProtoReflect() protoreflect.Message
- func (x *ResizeOptions) Reset()
- func (x *ResizeOptions) String() string
- type ResizeRequest
- func (*ResizeRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ResizeRequest) GetImageData() []byte
- func (x *ResizeRequest) GetOptions() *ResizeOptions
- func (*ResizeRequest) ProtoMessage()
- func (x *ResizeRequest) ProtoReflect() protoreflect.Message
- func (x *ResizeRequest) Reset()
- func (x *ResizeRequest) String() string
- type ResizeResponse
- type UnimplementedFluxImageServer
- type UnsafeFluxImageServer
Constants ¶
This section is empty.
Variables ¶
var ( ImageType_name = map[int32]string{ 0: "WEBP", 1: "PNG", 2: "JPEG", 4: "GIF", 5: "AVIF", } ImageType_value = map[string]int32{ "WEBP": 0, "PNG": 1, "JPEG": 2, "GIF": 4, "AVIF": 5, } )
Enum value maps for ImageType.
var ( ObjectFit_name = map[int32]string{ 0: "CONTAIN", 1: "COVER", 2: "FILL", 3: "INSIDE", 4: "OUTSIDE", } ObjectFit_value = map[string]int32{ "CONTAIN": 0, "COVER": 1, "FILL": 2, "INSIDE": 3, "OUTSIDE": 4, } )
Enum value maps for ObjectFit.
var File_flux_proto protoreflect.FileDescriptor
var FluxImage_ServiceDesc = grpc.ServiceDesc{ ServiceName: "flux.FluxImage", HandlerType: (*FluxImageServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { StreamName: "Resize", Handler: _FluxImage_Resize_Handler, ClientStreams: true, }, }, Metadata: "flux.proto", }
FluxImage_ServiceDesc is the grpc.ServiceDesc for FluxImage service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterFluxImageServer ¶
func RegisterFluxImageServer(s grpc.ServiceRegistrar, srv FluxImageServer)
Types ¶
type FluxImageClient ¶
type FluxImageClient interface {
Resize(ctx context.Context, opts ...grpc.CallOption) (FluxImage_ResizeClient, error)
}
FluxImageClient is the client API for FluxImage service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewFluxImageClient ¶
func NewFluxImageClient(cc grpc.ClientConnInterface) FluxImageClient
type FluxImageServer ¶
type FluxImageServer interface { Resize(FluxImage_ResizeServer) error // contains filtered or unexported methods }
FluxImageServer is the server API for FluxImage service. All implementations must embed UnimplementedFluxImageServer for forward compatibility
type FluxImage_ResizeClient ¶ added in v1.0.4
type FluxImage_ResizeClient interface { Send(*ResizeRequest) error CloseAndRecv() (*ResizeResponse, error) grpc.ClientStream }
type FluxImage_ResizeServer ¶ added in v1.0.4
type FluxImage_ResizeServer interface { SendAndClose(*ResizeResponse) error Recv() (*ResizeRequest, error) grpc.ServerStream }
type ImageType ¶
type ImageType int32
func (ImageType) Descriptor ¶
func (ImageType) Descriptor() protoreflect.EnumDescriptor
func (ImageType) EnumDescriptor
deprecated
func (ImageType) Number ¶
func (x ImageType) Number() protoreflect.EnumNumber
func (ImageType) Type ¶
func (ImageType) Type() protoreflect.EnumType
type ObjectFit ¶
type ObjectFit int32
Reference: https://sharp.pixelplumbing.com/api-resize#resize
func (ObjectFit) Descriptor ¶
func (ObjectFit) Descriptor() protoreflect.EnumDescriptor
func (ObjectFit) EnumDescriptor
deprecated
func (ObjectFit) Number ¶
func (x ObjectFit) Number() protoreflect.EnumNumber
func (ObjectFit) Type ¶
func (ObjectFit) Type() protoreflect.EnumType
type ResizeOptions ¶
type ResizeOptions struct { ImageType ImageType `protobuf:"varint,1,opt,name=image_type,json=imageType,proto3,enum=flux.ImageType" json:"image_type,omitempty"` Width int32 `protobuf:"varint,2,opt,name=width,proto3" json:"width,omitempty"` Height int32 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"` ObjectFit *ObjectFit `protobuf:"varint,4,opt,name=object_fit,json=objectFit,proto3,enum=flux.ObjectFit,oneof" json:"object_fit,omitempty"` Quality *int32 `protobuf:"varint,5,opt,name=quality,proto3,oneof" json:"quality,omitempty"` BackgroundColor *string `protobuf:"bytes,6,opt,name=background_color,json=backgroundColor,proto3,oneof" json:"background_color,omitempty"` // hex color (default #000000) // contains filtered or unexported fields }
func (*ResizeOptions) Descriptor
deprecated
func (*ResizeOptions) Descriptor() ([]byte, []int)
Deprecated: Use ResizeOptions.ProtoReflect.Descriptor instead.
func (*ResizeOptions) GetBackgroundColor ¶
func (x *ResizeOptions) GetBackgroundColor() string
func (*ResizeOptions) GetHeight ¶
func (x *ResizeOptions) GetHeight() int32
func (*ResizeOptions) GetImageType ¶
func (x *ResizeOptions) GetImageType() ImageType
func (*ResizeOptions) GetObjectFit ¶
func (x *ResizeOptions) GetObjectFit() ObjectFit
func (*ResizeOptions) GetQuality ¶
func (x *ResizeOptions) GetQuality() int32
func (*ResizeOptions) GetWidth ¶
func (x *ResizeOptions) GetWidth() int32
func (*ResizeOptions) ProtoMessage ¶
func (*ResizeOptions) ProtoMessage()
func (*ResizeOptions) ProtoReflect ¶
func (x *ResizeOptions) ProtoReflect() protoreflect.Message
func (*ResizeOptions) Reset ¶
func (x *ResizeOptions) Reset()
func (*ResizeOptions) String ¶
func (x *ResizeOptions) String() string
type ResizeRequest ¶
type ResizeRequest struct { ImageData []byte `protobuf:"bytes,1,opt,name=image_data,json=imageData,proto3" json:"image_data,omitempty"` Options *ResizeOptions `protobuf:"bytes,2,opt,name=options,proto3" json:"options,omitempty"` // contains filtered or unexported fields }
func (*ResizeRequest) Descriptor
deprecated
func (*ResizeRequest) Descriptor() ([]byte, []int)
Deprecated: Use ResizeRequest.ProtoReflect.Descriptor instead.
func (*ResizeRequest) GetImageData ¶
func (x *ResizeRequest) GetImageData() []byte
func (*ResizeRequest) GetOptions ¶
func (x *ResizeRequest) GetOptions() *ResizeOptions
func (*ResizeRequest) ProtoMessage ¶
func (*ResizeRequest) ProtoMessage()
func (*ResizeRequest) ProtoReflect ¶
func (x *ResizeRequest) ProtoReflect() protoreflect.Message
func (*ResizeRequest) Reset ¶
func (x *ResizeRequest) Reset()
func (*ResizeRequest) String ¶
func (x *ResizeRequest) String() string
type ResizeResponse ¶
type ResizeResponse struct { ImageData []byte `protobuf:"bytes,1,opt,name=image_data,json=imageData,proto3" json:"image_data,omitempty"` // contains filtered or unexported fields }
func (*ResizeResponse) Descriptor
deprecated
func (*ResizeResponse) Descriptor() ([]byte, []int)
Deprecated: Use ResizeResponse.ProtoReflect.Descriptor instead.
func (*ResizeResponse) GetImageData ¶
func (x *ResizeResponse) GetImageData() []byte
func (*ResizeResponse) ProtoMessage ¶
func (*ResizeResponse) ProtoMessage()
func (*ResizeResponse) ProtoReflect ¶
func (x *ResizeResponse) ProtoReflect() protoreflect.Message
func (*ResizeResponse) Reset ¶
func (x *ResizeResponse) Reset()
func (*ResizeResponse) String ¶
func (x *ResizeResponse) String() string
type UnimplementedFluxImageServer ¶
type UnimplementedFluxImageServer struct { }
UnimplementedFluxImageServer must be embedded to have forward compatible implementations.
func (UnimplementedFluxImageServer) Resize ¶
func (UnimplementedFluxImageServer) Resize(FluxImage_ResizeServer) error
type UnsafeFluxImageServer ¶
type UnsafeFluxImageServer interface {
// contains filtered or unexported methods
}
UnsafeFluxImageServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to FluxImageServer will result in compilation errors.