color

package
v2.0.0-rc.7 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ColorService_Center_FullMethodName = "/ColorService/Center"
	ColorService_Edge_FullMethodName   = "/ColorService/Edge"
)

Variables

View Source
var ColorService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "ColorService",
	HandlerType: (*ColorServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Center",
			Handler:    _ColorService_Center_Handler,
		},
		{
			MethodName: "Edge",
			Handler:    _ColorService_Edge_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "pkg/color/color.proto",
}

ColorService_ServiceDesc is the grpc.ServiceDesc for ColorService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_pkg_color_color_proto protoreflect.FileDescriptor

Functions

func RegisterColorServiceServer

func RegisterColorServiceServer(s grpc.ServiceRegistrar, srv ColorServiceServer)

Types

type ColorRequest

type ColorRequest struct {
	Row    int32 `protobuf:"varint,1,opt,name=row,proto3" json:"row,omitempty"`
	Column int32 `protobuf:"varint,2,opt,name=column,proto3" json:"column,omitempty"`
	// contains filtered or unexported fields
}

func (*ColorRequest) Descriptor deprecated

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

Deprecated: Use ColorRequest.ProtoReflect.Descriptor instead.

func (*ColorRequest) GetColumn

func (x *ColorRequest) GetColumn() int32

func (*ColorRequest) GetRow

func (x *ColorRequest) GetRow() int32

func (*ColorRequest) ProtoMessage

func (*ColorRequest) ProtoMessage()

func (*ColorRequest) ProtoReflect

func (x *ColorRequest) ProtoReflect() protoreflect.Message

func (*ColorRequest) Reset

func (x *ColorRequest) Reset()

func (*ColorRequest) String

func (x *ColorRequest) String() string

type ColorResponse

type ColorResponse struct {
	Color  string   `protobuf:"bytes,1,opt,name=color,proto3" json:"color,omitempty"`
	Rate   string   `protobuf:"bytes,2,opt,name=rate,proto3" json:"rate,omitempty"`
	Errors []string `protobuf:"bytes,3,rep,name=errors,proto3" json:"errors,omitempty"`
	// contains filtered or unexported fields
}

func (*ColorResponse) Descriptor deprecated

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

Deprecated: Use ColorResponse.ProtoReflect.Descriptor instead.

func (*ColorResponse) GetColor

func (x *ColorResponse) GetColor() string

func (*ColorResponse) GetErrors

func (x *ColorResponse) GetErrors() []string

func (*ColorResponse) GetRate

func (x *ColorResponse) GetRate() string

func (*ColorResponse) ProtoMessage

func (*ColorResponse) ProtoMessage()

func (*ColorResponse) ProtoReflect

func (x *ColorResponse) ProtoReflect() protoreflect.Message

func (*ColorResponse) Reset

func (x *ColorResponse) Reset()

func (*ColorResponse) String

func (x *ColorResponse) String() string

type ColorServiceClient

type ColorServiceClient interface {
	Center(ctx context.Context, in *ColorRequest, opts ...grpc.CallOption) (*ColorResponse, error)
	Edge(ctx context.Context, in *ColorRequest, opts ...grpc.CallOption) (*ColorResponse, error)
}

ColorServiceClient is the client API for ColorService 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.

type ColorServiceServer

type ColorServiceServer interface {
	Center(context.Context, *ColorRequest) (*ColorResponse, error)
	Edge(context.Context, *ColorRequest) (*ColorResponse, error)
	// contains filtered or unexported methods
}

ColorServiceServer is the server API for ColorService service. All implementations must embed UnimplementedColorServiceServer for forward compatibility.

type UnimplementedColorServiceServer

type UnimplementedColorServiceServer struct{}

UnimplementedColorServiceServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedColorServiceServer) Center

func (UnimplementedColorServiceServer) Edge

type UnsafeColorServiceServer

type UnsafeColorServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeColorServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ColorServiceServer will result in compilation errors.

Jump to

Keyboard shortcuts

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