choice

package
v0.0.0-...-aa5423f Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ChoiceService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "choice.ChoiceService",
	HandlerType: (*ChoiceServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetChoiceListById",
			Handler:    _ChoiceService_GetChoiceListById_Handler,
		},
		{
			MethodName: "UpsertChoiceList",
			Handler:    _ChoiceService_UpsertChoiceList_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "framework/grpc/proto/choice.proto",
}

ChoiceService_ServiceDesc is the grpc.ServiceDesc for ChoiceService 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_framework_grpc_proto_choice_proto protoreflect.FileDescriptor

Functions

func RegisterChoiceServiceServer

func RegisterChoiceServiceServer(s grpc.ServiceRegistrar, srv ChoiceServiceServer)

Types

type Choice

type Choice struct {
	Id              string                 `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Value           string                 `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	Weight          int32                  `protobuf:"varint,3,opt,name=weight,proto3" json:"weight,omitempty"`
	Color           string                 `protobuf:"bytes,4,opt,name=color,proto3" json:"color,omitempty"`
	UpdatedDateTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=updatedDateTime,proto3" json:"updatedDateTime,omitempty"`
	// contains filtered or unexported fields
}

func (*Choice) Descriptor deprecated

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

Deprecated: Use Choice.ProtoReflect.Descriptor instead.

func (*Choice) GetColor

func (x *Choice) GetColor() string

func (*Choice) GetId

func (x *Choice) GetId() string

func (*Choice) GetUpdatedDateTime

func (x *Choice) GetUpdatedDateTime() *timestamppb.Timestamp

func (*Choice) GetValue

func (x *Choice) GetValue() string

func (*Choice) GetWeight

func (x *Choice) GetWeight() int32

func (*Choice) ProtoMessage

func (*Choice) ProtoMessage()

func (*Choice) ProtoReflect

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

func (*Choice) Reset

func (x *Choice) Reset()

func (*Choice) String

func (x *Choice) String() string

type ChoiceClient

type ChoiceClient struct {
}

func NewChoiceClient

func NewChoiceClient() *ChoiceClient

func (*ChoiceClient) GetChoiceListById

func (c *ChoiceClient) GetChoiceListById()

func (*ChoiceClient) UpsertChoiceList

func (c *ChoiceClient) UpsertChoiceList()

type ChoiceList

type ChoiceList struct {
	Id              string                 `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Choices         []*Choice              `protobuf:"bytes,2,rep,name=choices,proto3" json:"choices,omitempty"`
	UpdatedDateTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=updatedDateTime,proto3" json:"updatedDateTime,omitempty"`
	// contains filtered or unexported fields
}

func (*ChoiceList) Descriptor deprecated

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

Deprecated: Use ChoiceList.ProtoReflect.Descriptor instead.

func (*ChoiceList) GetChoices

func (x *ChoiceList) GetChoices() []*Choice

func (*ChoiceList) GetId

func (x *ChoiceList) GetId() string

func (*ChoiceList) GetUpdatedDateTime

func (x *ChoiceList) GetUpdatedDateTime() *timestamppb.Timestamp

func (*ChoiceList) ProtoMessage

func (*ChoiceList) ProtoMessage()

func (*ChoiceList) ProtoReflect

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

func (*ChoiceList) Reset

func (x *ChoiceList) Reset()

func (*ChoiceList) String

func (x *ChoiceList) String() string

type ChoiceServer

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

func NewChoiceServer

func NewChoiceServer(repository random.IChoiceListRepository) *ChoiceServer

func (*ChoiceServer) GetChoiceListById

func (s *ChoiceServer) GetChoiceListById(ctx context.Context, request *GetByIdRequest) (*ChoiceList, error)

func (*ChoiceServer) Run

func (s *ChoiceServer) Run()

func (*ChoiceServer) UpsertChoiceList

func (s *ChoiceServer) UpsertChoiceList(ctx context.Context, choiceList *ChoiceList) (*UpsertResponse, error)

type ChoiceServiceClient

type ChoiceServiceClient interface {
	GetChoiceListById(ctx context.Context, in *GetByIdRequest, opts ...grpc.CallOption) (*ChoiceList, error)
	UpsertChoiceList(ctx context.Context, in *ChoiceList, opts ...grpc.CallOption) (*UpsertResponse, error)
}

ChoiceServiceClient is the client API for ChoiceService 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 ChoiceServiceServer

type ChoiceServiceServer interface {
	GetChoiceListById(context.Context, *GetByIdRequest) (*ChoiceList, error)
	UpsertChoiceList(context.Context, *ChoiceList) (*UpsertResponse, error)
}

ChoiceServiceServer is the server API for ChoiceService service. All implementations should embed UnimplementedChoiceServiceServer for forward compatibility

type GetByIdRequest

type GetByIdRequest struct {
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*GetByIdRequest) Descriptor deprecated

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

Deprecated: Use GetByIdRequest.ProtoReflect.Descriptor instead.

func (*GetByIdRequest) GetId

func (x *GetByIdRequest) GetId() string

func (*GetByIdRequest) ProtoMessage

func (*GetByIdRequest) ProtoMessage()

func (*GetByIdRequest) ProtoReflect

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

func (*GetByIdRequest) Reset

func (x *GetByIdRequest) Reset()

func (*GetByIdRequest) String

func (x *GetByIdRequest) String() string

type UnimplementedChoiceServiceServer

type UnimplementedChoiceServiceServer struct {
}

UnimplementedChoiceServiceServer should be embedded to have forward compatible implementations.

func (UnimplementedChoiceServiceServer) GetChoiceListById

func (UnimplementedChoiceServiceServer) UpsertChoiceList

type UnsafeChoiceServiceServer

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

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

type UpsertResponse

type UpsertResponse struct {
	Success bool   `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
	Error   string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
	// contains filtered or unexported fields
}

func (*UpsertResponse) Descriptor deprecated

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

Deprecated: Use UpsertResponse.ProtoReflect.Descriptor instead.

func (*UpsertResponse) GetError

func (x *UpsertResponse) GetError() string

func (*UpsertResponse) GetSuccess

func (x *UpsertResponse) GetSuccess() bool

func (*UpsertResponse) ProtoMessage

func (*UpsertResponse) ProtoMessage()

func (*UpsertResponse) ProtoReflect

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

func (*UpsertResponse) Reset

func (x *UpsertResponse) Reset()

func (*UpsertResponse) String

func (x *UpsertResponse) String() string

Jump to

Keyboard shortcuts

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