advicepb

package
v0.0.0-...-eee7c91 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Operation_name = map[int32]string{
		0: "CREATE",
		1: "UPDATE",
	}
	Operation_value = map[string]int32{
		"CREATE": 0,
		"UPDATE": 1,
	}
)

Enum value maps for Operation.

View Source
var AdviceService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "advicepb.AdviceService",
	HandlerType: (*AdviceServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetAdvice",
			Handler:    _AdviceService_GetAdvice_Handler,
		},
		{
			MethodName: "CreateUpdateAdvice",
			Handler:    _AdviceService_CreateUpdateAdvice_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "advice.proto",
}

AdviceService_ServiceDesc is the grpc.ServiceDesc for AdviceService 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_advice_proto protoreflect.FileDescriptor

Functions

func RegisterAdviceServiceServer

func RegisterAdviceServiceServer(s grpc.ServiceRegistrar, srv AdviceServiceServer)

Types

type AdviceServiceClient

type AdviceServiceClient interface {
	GetAdvice(ctx context.Context, in *GetUserAdviceRequest, opts ...grpc.CallOption) (*GetUserAdviceResponse, error)
	CreateUpdateAdvice(ctx context.Context, in *CreateUpdateAdviceRequest, opts ...grpc.CallOption) (*CreateUpdateAdviceResponse, error)
}

AdviceServiceClient is the client API for AdviceService 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 AdviceServiceServer

type AdviceServiceServer interface {
	GetAdvice(context.Context, *GetUserAdviceRequest) (*GetUserAdviceResponse, error)
	CreateUpdateAdvice(context.Context, *CreateUpdateAdviceRequest) (*CreateUpdateAdviceResponse, error)
	// contains filtered or unexported methods
}

AdviceServiceServer is the server API for AdviceService service. All implementations must embed UnimplementedAdviceServiceServer for forward compatibility

type CreateUpdateAdviceRequest

type CreateUpdateAdviceRequest struct {
	Operation Operation `protobuf:"varint,1,opt,name=operation,proto3,enum=advicepb.Operation" json:"operation,omitempty"`
	UserId    string    `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	Advice    string    `protobuf:"bytes,3,opt,name=advice,proto3" json:"advice,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateUpdateAdviceRequest) Descriptor deprecated

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

Deprecated: Use CreateUpdateAdviceRequest.ProtoReflect.Descriptor instead.

func (*CreateUpdateAdviceRequest) GetAdvice

func (x *CreateUpdateAdviceRequest) GetAdvice() string

func (*CreateUpdateAdviceRequest) GetOperation

func (x *CreateUpdateAdviceRequest) GetOperation() Operation

func (*CreateUpdateAdviceRequest) GetUserId

func (x *CreateUpdateAdviceRequest) GetUserId() string

func (*CreateUpdateAdviceRequest) ProtoMessage

func (*CreateUpdateAdviceRequest) ProtoMessage()

func (*CreateUpdateAdviceRequest) ProtoReflect

func (*CreateUpdateAdviceRequest) Reset

func (x *CreateUpdateAdviceRequest) Reset()

func (*CreateUpdateAdviceRequest) String

func (x *CreateUpdateAdviceRequest) String() string

type CreateUpdateAdviceResponse

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

func (*CreateUpdateAdviceResponse) Descriptor deprecated

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

Deprecated: Use CreateUpdateAdviceResponse.ProtoReflect.Descriptor instead.

func (*CreateUpdateAdviceResponse) ProtoMessage

func (*CreateUpdateAdviceResponse) ProtoMessage()

func (*CreateUpdateAdviceResponse) ProtoReflect

func (*CreateUpdateAdviceResponse) Reset

func (x *CreateUpdateAdviceResponse) Reset()

func (*CreateUpdateAdviceResponse) String

func (x *CreateUpdateAdviceResponse) String() string

type GetUserAdviceRequest

type GetUserAdviceRequest struct {
	UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	// contains filtered or unexported fields
}

func (*GetUserAdviceRequest) Descriptor deprecated

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

Deprecated: Use GetUserAdviceRequest.ProtoReflect.Descriptor instead.

func (*GetUserAdviceRequest) GetUserId

func (x *GetUserAdviceRequest) GetUserId() string

func (*GetUserAdviceRequest) ProtoMessage

func (*GetUserAdviceRequest) ProtoMessage()

func (*GetUserAdviceRequest) ProtoReflect

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

func (*GetUserAdviceRequest) Reset

func (x *GetUserAdviceRequest) Reset()

func (*GetUserAdviceRequest) String

func (x *GetUserAdviceRequest) String() string

type GetUserAdviceResponse

type GetUserAdviceResponse struct {
	Advice    string                 `protobuf:"bytes,1,opt,name=advice,proto3" json:"advice,omitempty"`
	CreatedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	// contains filtered or unexported fields
}

func (*GetUserAdviceResponse) Descriptor deprecated

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

Deprecated: Use GetUserAdviceResponse.ProtoReflect.Descriptor instead.

func (*GetUserAdviceResponse) GetAdvice

func (x *GetUserAdviceResponse) GetAdvice() string

func (*GetUserAdviceResponse) GetCreatedAt

func (x *GetUserAdviceResponse) GetCreatedAt() *timestamppb.Timestamp

func (*GetUserAdviceResponse) ProtoMessage

func (*GetUserAdviceResponse) ProtoMessage()

func (*GetUserAdviceResponse) ProtoReflect

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

func (*GetUserAdviceResponse) Reset

func (x *GetUserAdviceResponse) Reset()

func (*GetUserAdviceResponse) String

func (x *GetUserAdviceResponse) String() string

type Operation

type Operation int32
const (
	Operation_CREATE Operation = 0
	Operation_UPDATE Operation = 1
)

func (Operation) Descriptor

func (Operation) Descriptor() protoreflect.EnumDescriptor

func (Operation) Enum

func (x Operation) Enum() *Operation

func (Operation) EnumDescriptor deprecated

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

Deprecated: Use Operation.Descriptor instead.

func (Operation) Number

func (x Operation) Number() protoreflect.EnumNumber

func (Operation) String

func (x Operation) String() string

func (Operation) Type

type UnimplementedAdviceServiceServer

type UnimplementedAdviceServiceServer struct {
}

UnimplementedAdviceServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedAdviceServiceServer) CreateUpdateAdvice

func (UnimplementedAdviceServiceServer) GetAdvice

type UnsafeAdviceServiceServer

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

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

Jump to

Keyboard shortcuts

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