grpcserver

package
v0.0.0-...-d5338d4 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Customer_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "grpcserver.customer",
	HandlerType: (*CustomerServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetApiKey",
			Handler:    _Customer_GetApiKey_Handler,
		},
		{
			MethodName: "SetApiKey",
			Handler:    _Customer_SetApiKey_Handler,
		},
		{
			MethodName: "GetCustomerUUIDByUserName",
			Handler:    _Customer_GetCustomerUUIDByUserName_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "internal/controller/grpc/proto/customer.proto",
}

Customer_ServiceDesc is the grpc.ServiceDesc for Customer 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_internal_controller_grpc_proto_customer_proto protoreflect.FileDescriptor

Functions

func New

func New(port string, customerRepo usecase.ICustomerRepo, userRepo usecase.IUserRepo) error

func RegisterCustomerServer

func RegisterCustomerServer(s grpc.ServiceRegistrar, srv CustomerServer)

Types

type CustomerClient

type CustomerClient interface {
	GetApiKey(ctx context.Context, in *GetApiKeyRequest, opts ...grpc.CallOption) (*GetApiKeyResponse, error)
	SetApiKey(ctx context.Context, in *SetApiKeyRequest, opts ...grpc.CallOption) (*SetApiKeyResponse, error)
	GetCustomerUUIDByUserName(ctx context.Context, in *GetCustomerUUIDByUserNameRequest, opts ...grpc.CallOption) (*GetCustomerUUIDByUserNameResponse, error)
}

CustomerClient is the client API for Customer 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 NewCustomerClient

func NewCustomerClient(cc grpc.ClientConnInterface) CustomerClient

type CustomerServer

type CustomerServer interface {
	GetApiKey(context.Context, *GetApiKeyRequest) (*GetApiKeyResponse, error)
	SetApiKey(context.Context, *SetApiKeyRequest) (*SetApiKeyResponse, error)
	GetCustomerUUIDByUserName(context.Context, *GetCustomerUUIDByUserNameRequest) (*GetCustomerUUIDByUserNameResponse, error)
	// contains filtered or unexported methods
}

CustomerServer is the server API for Customer service. All implementations must embed UnimplementedCustomerServer for forward compatibility

type GRPCServer

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

func (*GRPCServer) GetApiKey

func (grpc *GRPCServer) GetApiKey(ctx context.Context, req *GetApiKeyRequest) (res *GetApiKeyResponse, err error)

func (*GRPCServer) GetCustomerUUIDByUserName

func (grpc *GRPCServer) GetCustomerUUIDByUserName(ctx context.Context, req *GetCustomerUUIDByUserNameRequest) (res *GetCustomerUUIDByUserNameResponse, err error)

func (*GRPCServer) SetApiKey

func (grpc *GRPCServer) SetApiKey(ctx context.Context, req *SetApiKeyRequest) (res *SetApiKeyResponse, err error)

type GetApiKeyRequest

type GetApiKeyRequest struct {
	CustomerId string `protobuf:"bytes,1,opt,name=customer_id,json=customerId,proto3" json:"customer_id,omitempty"`
	// contains filtered or unexported fields
}

func (*GetApiKeyRequest) Descriptor deprecated

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

Deprecated: Use GetApiKeyRequest.ProtoReflect.Descriptor instead.

func (*GetApiKeyRequest) GetCustomerId

func (x *GetApiKeyRequest) GetCustomerId() string

func (*GetApiKeyRequest) ProtoMessage

func (*GetApiKeyRequest) ProtoMessage()

func (*GetApiKeyRequest) ProtoReflect

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

func (*GetApiKeyRequest) Reset

func (x *GetApiKeyRequest) Reset()

func (*GetApiKeyRequest) String

func (x *GetApiKeyRequest) String() string

type GetApiKeyResponse

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

func (*GetApiKeyResponse) Descriptor deprecated

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

Deprecated: Use GetApiKeyResponse.ProtoReflect.Descriptor instead.

func (*GetApiKeyResponse) GetApikey

func (x *GetApiKeyResponse) GetApikey() string

func (*GetApiKeyResponse) ProtoMessage

func (*GetApiKeyResponse) ProtoMessage()

func (*GetApiKeyResponse) ProtoReflect

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

func (*GetApiKeyResponse) Reset

func (x *GetApiKeyResponse) Reset()

func (*GetApiKeyResponse) String

func (x *GetApiKeyResponse) String() string

type GetCustomerUUIDByUserNameRequest

type GetCustomerUUIDByUserNameRequest struct {
	UserName string `protobuf:"bytes,1,opt,name=user_name,json=userName,proto3" json:"user_name,omitempty"`
	// contains filtered or unexported fields
}

func (*GetCustomerUUIDByUserNameRequest) Descriptor deprecated

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

Deprecated: Use GetCustomerUUIDByUserNameRequest.ProtoReflect.Descriptor instead.

func (*GetCustomerUUIDByUserNameRequest) GetUserName

func (x *GetCustomerUUIDByUserNameRequest) GetUserName() string

func (*GetCustomerUUIDByUserNameRequest) ProtoMessage

func (*GetCustomerUUIDByUserNameRequest) ProtoMessage()

func (*GetCustomerUUIDByUserNameRequest) ProtoReflect

func (*GetCustomerUUIDByUserNameRequest) Reset

func (*GetCustomerUUIDByUserNameRequest) String

type GetCustomerUUIDByUserNameResponse

type GetCustomerUUIDByUserNameResponse struct {
	CustomerUuid string `protobuf:"bytes,1,opt,name=customer_uuid,json=customerUuid,proto3" json:"customer_uuid,omitempty"`
	// contains filtered or unexported fields
}

func (*GetCustomerUUIDByUserNameResponse) Descriptor deprecated

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

Deprecated: Use GetCustomerUUIDByUserNameResponse.ProtoReflect.Descriptor instead.

func (*GetCustomerUUIDByUserNameResponse) GetCustomerUuid

func (x *GetCustomerUUIDByUserNameResponse) GetCustomerUuid() string

func (*GetCustomerUUIDByUserNameResponse) ProtoMessage

func (*GetCustomerUUIDByUserNameResponse) ProtoMessage()

func (*GetCustomerUUIDByUserNameResponse) ProtoReflect

func (*GetCustomerUUIDByUserNameResponse) Reset

func (*GetCustomerUUIDByUserNameResponse) String

type SetApiKeyRequest

type SetApiKeyRequest struct {
	CustomerId string `protobuf:"bytes,1,opt,name=customer_id,json=customerId,proto3" json:"customer_id,omitempty"`
	Apikey     string `protobuf:"bytes,2,opt,name=apikey,proto3" json:"apikey,omitempty"`
	// contains filtered or unexported fields
}

func (*SetApiKeyRequest) Descriptor deprecated

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

Deprecated: Use SetApiKeyRequest.ProtoReflect.Descriptor instead.

func (*SetApiKeyRequest) GetApikey

func (x *SetApiKeyRequest) GetApikey() string

func (*SetApiKeyRequest) GetCustomerId

func (x *SetApiKeyRequest) GetCustomerId() string

func (*SetApiKeyRequest) ProtoMessage

func (*SetApiKeyRequest) ProtoMessage()

func (*SetApiKeyRequest) ProtoReflect

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

func (*SetApiKeyRequest) Reset

func (x *SetApiKeyRequest) Reset()

func (*SetApiKeyRequest) String

func (x *SetApiKeyRequest) String() string

type SetApiKeyResponse

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

func (*SetApiKeyResponse) Descriptor deprecated

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

Deprecated: Use SetApiKeyResponse.ProtoReflect.Descriptor instead.

func (*SetApiKeyResponse) GetApikey

func (x *SetApiKeyResponse) GetApikey() string

func (*SetApiKeyResponse) ProtoMessage

func (*SetApiKeyResponse) ProtoMessage()

func (*SetApiKeyResponse) ProtoReflect

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

func (*SetApiKeyResponse) Reset

func (x *SetApiKeyResponse) Reset()

func (*SetApiKeyResponse) String

func (x *SetApiKeyResponse) String() string

type UnimplementedCustomerServer

type UnimplementedCustomerServer struct {
}

UnimplementedCustomerServer must be embedded to have forward compatible implementations.

func (UnimplementedCustomerServer) GetApiKey

func (UnimplementedCustomerServer) SetApiKey

type UnsafeCustomerServer

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

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

Jump to

Keyboard shortcuts

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