discoveryv1

package
v0.0.0-...-e9246d1 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DiscoveryService_ListProducts_FullMethodName = "/discovery.v1.DiscoveryService/ListProducts"
)

Variables

View Source
var DiscoveryService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "discovery.v1.DiscoveryService",
	HandlerType: (*DiscoveryServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ListProducts",
			Handler:    _DiscoveryService_ListProducts_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "discovery/v1/service.proto",
}

DiscoveryService_ServiceDesc is the grpc.ServiceDesc for DiscoveryService 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_discovery_v1_service_proto protoreflect.FileDescriptor

Functions

func RegisterDiscoveryServiceServer

func RegisterDiscoveryServiceServer(s grpc.ServiceRegistrar, srv DiscoveryServiceServer)

Types

type DiscoveryService

type DiscoveryService struct {
	UnimplementedDiscoveryServiceServer
}

func (*DiscoveryService) ListProducts

type DiscoveryServiceClient

type DiscoveryServiceClient interface {
	// ListProducts ...
	ListProducts(ctx context.Context, in *ListProductsRequest, opts ...grpc.CallOption) (*ListProductsResponse, error)
}

DiscoveryServiceClient is the client API for DiscoveryService 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 DiscoveryServiceServer

type DiscoveryServiceServer interface {
	// ListProducts ...
	ListProducts(context.Context, *ListProductsRequest) (*ListProductsResponse, error)
}

DiscoveryServiceServer is the server API for DiscoveryService service. All implementations should embed UnimplementedDiscoveryServiceServer for forward compatibility

type InterceptorTestSuite

type InterceptorTestSuite struct {
	suite.Suite

	DiscoveryService *DiscoveryService
	ServerOpts       []grpc.ServerOption
	ClientOpts       []grpc.DialOption

	ServerListener net.Listener
	Server         *grpc.Server

	Client DiscoveryServiceClient
	// contains filtered or unexported fields
}

InterceptorTestSuite is a testify/Suite that starts a gRPC PingService server and a client.

func (*InterceptorTestSuite) NewClient

func (s *InterceptorTestSuite) NewClient(dialOpts ...grpc.DialOption) DiscoveryServiceClient

func (*InterceptorTestSuite) RestartServer

func (s *InterceptorTestSuite) RestartServer(delayedStart time.Duration) <-chan bool

func (*InterceptorTestSuite) ServerAddr

func (s *InterceptorTestSuite) ServerAddr() string

func (*InterceptorTestSuite) SetupSuite

func (s *InterceptorTestSuite) SetupSuite()

func (*InterceptorTestSuite) TearDownSuite

func (s *InterceptorTestSuite) TearDownSuite()

type ListProductsRequest

type ListProductsRequest struct {
	Id        string                 `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	KeySearch string                 `protobuf:"bytes,2,opt,name=key_search,json=keySearch,proto3" json:"key_search,omitempty"`
	FieldMask *fieldmaskpb.FieldMask `protobuf:"bytes,3,opt,name=field_mask,json=fieldMask,proto3" json:"field_mask,omitempty"`
	// contains filtered or unexported fields
}

ListProductsRequest ...

func (*ListProductsRequest) Descriptor deprecated

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

Deprecated: Use ListProductsRequest.ProtoReflect.Descriptor instead.

func (*ListProductsRequest) GetFieldMask

func (x *ListProductsRequest) GetFieldMask() *fieldmaskpb.FieldMask

func (*ListProductsRequest) GetId

func (x *ListProductsRequest) GetId() string

func (*ListProductsRequest) GetKeySearch

func (x *ListProductsRequest) GetKeySearch() string

func (*ListProductsRequest) ProtoMessage

func (*ListProductsRequest) ProtoMessage()

func (*ListProductsRequest) ProtoReflect

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

func (*ListProductsRequest) Reset

func (x *ListProductsRequest) Reset()

func (*ListProductsRequest) String

func (x *ListProductsRequest) String() string

type ListProductsResponse

type ListProductsResponse struct {
	Result *ListProductsResult `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"`
	// contains filtered or unexported fields
}

GetProductResponse ...

func (*ListProductsResponse) Descriptor deprecated

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

Deprecated: Use ListProductsResponse.ProtoReflect.Descriptor instead.

func (*ListProductsResponse) GetResult

func (x *ListProductsResponse) GetResult() *ListProductsResult

func (*ListProductsResponse) ProtoMessage

func (*ListProductsResponse) ProtoMessage()

func (*ListProductsResponse) ProtoReflect

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

func (*ListProductsResponse) Reset

func (x *ListProductsResponse) Reset()

func (*ListProductsResponse) String

func (x *ListProductsResponse) String() string

type ListProductsResult

type ListProductsResult struct {
	Products []*Product `protobuf:"bytes,1,rep,name=products,proto3" json:"products,omitempty"` // Pagination
	// contains filtered or unexported fields
}

ListProductsResult ...

func (*ListProductsResult) Descriptor deprecated

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

Deprecated: Use ListProductsResult.ProtoReflect.Descriptor instead.

func (*ListProductsResult) GetProducts

func (x *ListProductsResult) GetProducts() []*Product

func (*ListProductsResult) ProtoMessage

func (*ListProductsResult) ProtoMessage()

func (*ListProductsResult) ProtoReflect

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

func (*ListProductsResult) Reset

func (x *ListProductsResult) Reset()

func (*ListProductsResult) String

func (x *ListProductsResult) String() string

type Product

type Product struct {
	Id    string  `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Name  string  `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Img   string  `protobuf:"bytes,3,opt,name=img,proto3" json:"img,omitempty"`
	Price float64 `protobuf:"fixed64,4,opt,name=price,proto3" json:"price,omitempty"`
	Shop  *Shop   `protobuf:"bytes,5,opt,name=shop,proto3" json:"shop,omitempty"`
	// contains filtered or unexported fields
}

Product ...

func (*Product) Descriptor deprecated

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

Deprecated: Use Product.ProtoReflect.Descriptor instead.

func (*Product) GetId

func (x *Product) GetId() string

func (*Product) GetImg

func (x *Product) GetImg() string

func (*Product) GetName

func (x *Product) GetName() string

func (*Product) GetPrice

func (x *Product) GetPrice() float64

func (*Product) GetShop

func (x *Product) GetShop() *Shop

func (*Product) ProtoMessage

func (*Product) ProtoMessage()

func (*Product) ProtoReflect

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

func (*Product) Reset

func (x *Product) Reset()

func (*Product) String

func (x *Product) String() string

type Shop

type Shop struct {
	Id   string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Img  string `protobuf:"bytes,3,opt,name=img,proto3" json:"img,omitempty"`
	// contains filtered or unexported fields
}

Shop ...

func (*Shop) Descriptor deprecated

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

Deprecated: Use Shop.ProtoReflect.Descriptor instead.

func (*Shop) GetId

func (x *Shop) GetId() string

func (*Shop) GetImg

func (x *Shop) GetImg() string

func (*Shop) GetName

func (x *Shop) GetName() string

func (*Shop) ProtoMessage

func (*Shop) ProtoMessage()

func (*Shop) ProtoReflect

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

func (*Shop) Reset

func (x *Shop) Reset()

func (*Shop) String

func (x *Shop) String() string

type UnimplementedDiscoveryServiceServer

type UnimplementedDiscoveryServiceServer struct {
}

UnimplementedDiscoveryServiceServer should be embedded to have forward compatible implementations.

func (UnimplementedDiscoveryServiceServer) ListProducts

type UnsafeDiscoveryServiceServer

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

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

Jump to

Keyboard shortcuts

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