Documentation ¶
Overview ¶
Package go_product_api is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterGoProductApiServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterGoProductApiServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client GoProductApiServiceClient) error
- func RegisterGoProductApiServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterGoProductApiServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server GoProductApiServiceServer) error
- func RegisterGoProductApiServiceServer(s grpc.ServiceRegistrar, srv GoProductApiServiceServer)
- type CreateProductV1Request
- func (*CreateProductV1Request) Descriptor() ([]byte, []int)deprecated
- func (x *CreateProductV1Request) GetBrand() string
- func (x *CreateProductV1Request) GetCategory() string
- func (x *CreateProductV1Request) GetCost() float32
- func (x *CreateProductV1Request) GetCurrency() Currency
- func (x *CreateProductV1Request) GetDescription() string
- func (x *CreateProductV1Request) GetName() string
- func (*CreateProductV1Request) ProtoMessage()
- func (x *CreateProductV1Request) ProtoReflect() protoreflect.Message
- func (x *CreateProductV1Request) Reset()
- func (x *CreateProductV1Request) String() string
- func (m *CreateProductV1Request) Validate() error
- type CreateProductV1RequestValidationError
- func (e CreateProductV1RequestValidationError) Cause() error
- func (e CreateProductV1RequestValidationError) Error() string
- func (e CreateProductV1RequestValidationError) ErrorName() string
- func (e CreateProductV1RequestValidationError) Field() string
- func (e CreateProductV1RequestValidationError) Key() bool
- func (e CreateProductV1RequestValidationError) Reason() string
- type CreateProductV1Response
- func (*CreateProductV1Response) Descriptor() ([]byte, []int)deprecated
- func (x *CreateProductV1Response) GetProduct() *Product
- func (*CreateProductV1Response) ProtoMessage()
- func (x *CreateProductV1Response) ProtoReflect() protoreflect.Message
- func (x *CreateProductV1Response) Reset()
- func (x *CreateProductV1Response) String() string
- func (m *CreateProductV1Response) Validate() error
- type CreateProductV1ResponseValidationError
- func (e CreateProductV1ResponseValidationError) Cause() error
- func (e CreateProductV1ResponseValidationError) Error() string
- func (e CreateProductV1ResponseValidationError) ErrorName() string
- func (e CreateProductV1ResponseValidationError) Field() string
- func (e CreateProductV1ResponseValidationError) Key() bool
- func (e CreateProductV1ResponseValidationError) Reason() string
- type Currency
- type DescribeProductV1Request
- func (*DescribeProductV1Request) Descriptor() ([]byte, []int)deprecated
- func (x *DescribeProductV1Request) GetProductId() uint64
- func (*DescribeProductV1Request) ProtoMessage()
- func (x *DescribeProductV1Request) ProtoReflect() protoreflect.Message
- func (x *DescribeProductV1Request) Reset()
- func (x *DescribeProductV1Request) String() string
- func (m *DescribeProductV1Request) Validate() error
- type DescribeProductV1RequestValidationError
- func (e DescribeProductV1RequestValidationError) Cause() error
- func (e DescribeProductV1RequestValidationError) Error() string
- func (e DescribeProductV1RequestValidationError) ErrorName() string
- func (e DescribeProductV1RequestValidationError) Field() string
- func (e DescribeProductV1RequestValidationError) Key() bool
- func (e DescribeProductV1RequestValidationError) Reason() string
- type DescribeProductV1Response
- func (*DescribeProductV1Response) Descriptor() ([]byte, []int)deprecated
- func (x *DescribeProductV1Response) GetProduct() *Product
- func (*DescribeProductV1Response) ProtoMessage()
- func (x *DescribeProductV1Response) ProtoReflect() protoreflect.Message
- func (x *DescribeProductV1Response) Reset()
- func (x *DescribeProductV1Response) String() string
- func (m *DescribeProductV1Response) Validate() error
- type DescribeProductV1ResponseValidationError
- func (e DescribeProductV1ResponseValidationError) Cause() error
- func (e DescribeProductV1ResponseValidationError) Error() string
- func (e DescribeProductV1ResponseValidationError) ErrorName() string
- func (e DescribeProductV1ResponseValidationError) Field() string
- func (e DescribeProductV1ResponseValidationError) Key() bool
- func (e DescribeProductV1ResponseValidationError) Reason() string
- type GoProductApiServiceClient
- type GoProductApiServiceServer
- type ListProductsV1Request
- func (*ListProductsV1Request) Descriptor() ([]byte, []int)deprecated
- func (*ListProductsV1Request) ProtoMessage()
- func (x *ListProductsV1Request) ProtoReflect() protoreflect.Message
- func (x *ListProductsV1Request) Reset()
- func (x *ListProductsV1Request) String() string
- func (m *ListProductsV1Request) Validate() error
- type ListProductsV1RequestValidationError
- func (e ListProductsV1RequestValidationError) Cause() error
- func (e ListProductsV1RequestValidationError) Error() string
- func (e ListProductsV1RequestValidationError) ErrorName() string
- func (e ListProductsV1RequestValidationError) Field() string
- func (e ListProductsV1RequestValidationError) Key() bool
- func (e ListProductsV1RequestValidationError) Reason() string
- type ListProductsV1Response
- func (*ListProductsV1Response) Descriptor() ([]byte, []int)deprecated
- func (x *ListProductsV1Response) GetProducts() []*Product
- func (*ListProductsV1Response) ProtoMessage()
- func (x *ListProductsV1Response) ProtoReflect() protoreflect.Message
- func (x *ListProductsV1Response) Reset()
- func (x *ListProductsV1Response) String() string
- func (m *ListProductsV1Response) Validate() error
- type ListProductsV1ResponseValidationError
- func (e ListProductsV1ResponseValidationError) Cause() error
- func (e ListProductsV1ResponseValidationError) Error() string
- func (e ListProductsV1ResponseValidationError) ErrorName() string
- func (e ListProductsV1ResponseValidationError) Field() string
- func (e ListProductsV1ResponseValidationError) Key() bool
- func (e ListProductsV1ResponseValidationError) Reason() string
- type Product
- func (*Product) Descriptor() ([]byte, []int)deprecated
- func (x *Product) GetBrand() string
- func (x *Product) GetCategory() string
- func (x *Product) GetCost() float32
- func (x *Product) GetCreated() *timestamppb.Timestamp
- func (x *Product) GetCurrency() Currency
- func (x *Product) GetDescription() string
- func (x *Product) GetId() uint64
- func (x *Product) GetName() string
- func (*Product) ProtoMessage()
- func (x *Product) ProtoReflect() protoreflect.Message
- func (x *Product) Reset()
- func (x *Product) String() string
- func (m *Product) Validate() error
- type ProductValidationError
- type RemoveProductV1Request
- func (*RemoveProductV1Request) Descriptor() ([]byte, []int)deprecated
- func (x *RemoveProductV1Request) GetProductId() uint64
- func (*RemoveProductV1Request) ProtoMessage()
- func (x *RemoveProductV1Request) ProtoReflect() protoreflect.Message
- func (x *RemoveProductV1Request) Reset()
- func (x *RemoveProductV1Request) String() string
- func (m *RemoveProductV1Request) Validate() error
- type RemoveProductV1RequestValidationError
- func (e RemoveProductV1RequestValidationError) Cause() error
- func (e RemoveProductV1RequestValidationError) Error() string
- func (e RemoveProductV1RequestValidationError) ErrorName() string
- func (e RemoveProductV1RequestValidationError) Field() string
- func (e RemoveProductV1RequestValidationError) Key() bool
- func (e RemoveProductV1RequestValidationError) Reason() string
- type RemoveProductV1Response
- func (*RemoveProductV1Response) Descriptor() ([]byte, []int)deprecated
- func (x *RemoveProductV1Response) GetProduct() *Product
- func (*RemoveProductV1Response) ProtoMessage()
- func (x *RemoveProductV1Response) ProtoReflect() protoreflect.Message
- func (x *RemoveProductV1Response) Reset()
- func (x *RemoveProductV1Response) String() string
- func (m *RemoveProductV1Response) Validate() error
- type RemoveProductV1ResponseValidationError
- func (e RemoveProductV1ResponseValidationError) Cause() error
- func (e RemoveProductV1ResponseValidationError) Error() string
- func (e RemoveProductV1ResponseValidationError) ErrorName() string
- func (e RemoveProductV1ResponseValidationError) Field() string
- func (e RemoveProductV1ResponseValidationError) Key() bool
- func (e RemoveProductV1ResponseValidationError) Reason() string
- type UnimplementedGoProductApiServiceServer
- func (UnimplementedGoProductApiServiceServer) CreateProductV1(context.Context, *CreateProductV1Request) (*CreateProductV1Response, error)
- func (UnimplementedGoProductApiServiceServer) DescribeProductV1(context.Context, *DescribeProductV1Request) (*DescribeProductV1Response, error)
- func (UnimplementedGoProductApiServiceServer) ListProductsV1(context.Context, *ListProductsV1Request) (*ListProductsV1Response, error)
- func (UnimplementedGoProductApiServiceServer) RemoveProductV1(context.Context, *RemoveProductV1Request) (*RemoveProductV1Response, error)
- type UnsafeGoProductApiServiceServer
Constants ¶
This section is empty.
Variables ¶
var ( Currency_name = map[int32]string{ 0: "CURRENCY_UNKNOWN", 1: "CURRENCY_RUB", 2: "CURRENCY_USD", } Currency_value = map[string]int32{ "CURRENCY_UNKNOWN": 0, "CURRENCY_RUB": 1, "CURRENCY_USD": 2, } )
Enum value maps for Currency.
var File_alexeykirinyuk_go_product_api_v1_go_product_api_proto protoreflect.FileDescriptor
var GoProductApiService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "ozonmp.go_product_api.v1.GoProductApiService", HandlerType: (*GoProductApiServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "DescribeProductV1", Handler: _GoProductApiService_DescribeProductV1_Handler, }, { MethodName: "CreateProductV1", Handler: _GoProductApiService_CreateProductV1_Handler, }, { MethodName: "ListProductsV1", Handler: _GoProductApiService_ListProductsV1_Handler, }, { MethodName: "RemoveProductV1", Handler: _GoProductApiService_RemoveProductV1_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "alexeykirinyuk/go_product_api/v1/go_product_api.proto", }
GoProductApiService_ServiceDesc is the grpc.ServiceDesc for GoProductApiService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterGoProductApiServiceHandler ¶
func RegisterGoProductApiServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterGoProductApiServiceHandler registers the http handlers for service GoProductApiService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterGoProductApiServiceHandlerClient ¶
func RegisterGoProductApiServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client GoProductApiServiceClient) error
RegisterGoProductApiServiceHandlerClient registers the http handlers for service GoProductApiService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "GoProductApiServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "GoProductApiServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "GoProductApiServiceClient" to call the correct interceptors.
func RegisterGoProductApiServiceHandlerFromEndpoint ¶
func RegisterGoProductApiServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterGoProductApiServiceHandlerFromEndpoint is same as RegisterGoProductApiServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterGoProductApiServiceHandlerServer ¶
func RegisterGoProductApiServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server GoProductApiServiceServer) error
RegisterGoProductApiServiceHandlerServer registers the http handlers for service GoProductApiService to "mux". UnaryRPC :call GoProductApiServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterGoProductApiServiceHandlerFromEndpoint instead.
func RegisterGoProductApiServiceServer ¶
func RegisterGoProductApiServiceServer(s grpc.ServiceRegistrar, srv GoProductApiServiceServer)
Types ¶
type CreateProductV1Request ¶
type CreateProductV1Request struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Category string `protobuf:"bytes,2,opt,name=category,proto3" json:"category,omitempty"` Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` Brand string `protobuf:"bytes,4,opt,name=brand,proto3" json:"brand,omitempty"` Cost float32 `protobuf:"fixed32,5,opt,name=cost,proto3" json:"cost,omitempty"` Currency Currency `protobuf:"varint,6,opt,name=currency,proto3,enum=ozonmp.go_product_api.v1.Currency" json:"currency,omitempty"` // contains filtered or unexported fields }
func (*CreateProductV1Request) Descriptor
deprecated
func (*CreateProductV1Request) Descriptor() ([]byte, []int)
Deprecated: Use CreateProductV1Request.ProtoReflect.Descriptor instead.
func (*CreateProductV1Request) GetBrand ¶
func (x *CreateProductV1Request) GetBrand() string
func (*CreateProductV1Request) GetCategory ¶
func (x *CreateProductV1Request) GetCategory() string
func (*CreateProductV1Request) GetCost ¶
func (x *CreateProductV1Request) GetCost() float32
func (*CreateProductV1Request) GetCurrency ¶
func (x *CreateProductV1Request) GetCurrency() Currency
func (*CreateProductV1Request) GetDescription ¶
func (x *CreateProductV1Request) GetDescription() string
func (*CreateProductV1Request) GetName ¶
func (x *CreateProductV1Request) GetName() string
func (*CreateProductV1Request) ProtoMessage ¶
func (*CreateProductV1Request) ProtoMessage()
func (*CreateProductV1Request) ProtoReflect ¶
func (x *CreateProductV1Request) ProtoReflect() protoreflect.Message
func (*CreateProductV1Request) Reset ¶
func (x *CreateProductV1Request) Reset()
func (*CreateProductV1Request) String ¶
func (x *CreateProductV1Request) String() string
func (*CreateProductV1Request) Validate ¶
func (m *CreateProductV1Request) Validate() error
Validate checks the field values on CreateProductV1Request with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
type CreateProductV1RequestValidationError ¶
type CreateProductV1RequestValidationError struct {
// contains filtered or unexported fields
}
CreateProductV1RequestValidationError is the validation error returned by CreateProductV1Request.Validate if the designated constraints aren't met.
func (CreateProductV1RequestValidationError) Cause ¶
func (e CreateProductV1RequestValidationError) Cause() error
Cause function returns cause value.
func (CreateProductV1RequestValidationError) Error ¶
func (e CreateProductV1RequestValidationError) Error() string
Error satisfies the builtin error interface
func (CreateProductV1RequestValidationError) ErrorName ¶
func (e CreateProductV1RequestValidationError) ErrorName() string
ErrorName returns error name.
func (CreateProductV1RequestValidationError) Field ¶
func (e CreateProductV1RequestValidationError) Field() string
Field function returns field value.
func (CreateProductV1RequestValidationError) Key ¶
func (e CreateProductV1RequestValidationError) Key() bool
Key function returns key value.
func (CreateProductV1RequestValidationError) Reason ¶
func (e CreateProductV1RequestValidationError) Reason() string
Reason function returns reason value.
type CreateProductV1Response ¶
type CreateProductV1Response struct { Product *Product `protobuf:"bytes,1,opt,name=product,proto3" json:"product,omitempty"` // contains filtered or unexported fields }
func (*CreateProductV1Response) Descriptor
deprecated
func (*CreateProductV1Response) Descriptor() ([]byte, []int)
Deprecated: Use CreateProductV1Response.ProtoReflect.Descriptor instead.
func (*CreateProductV1Response) GetProduct ¶
func (x *CreateProductV1Response) GetProduct() *Product
func (*CreateProductV1Response) ProtoMessage ¶
func (*CreateProductV1Response) ProtoMessage()
func (*CreateProductV1Response) ProtoReflect ¶
func (x *CreateProductV1Response) ProtoReflect() protoreflect.Message
func (*CreateProductV1Response) Reset ¶
func (x *CreateProductV1Response) Reset()
func (*CreateProductV1Response) String ¶
func (x *CreateProductV1Response) String() string
func (*CreateProductV1Response) Validate ¶
func (m *CreateProductV1Response) Validate() error
Validate checks the field values on CreateProductV1Response with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
type CreateProductV1ResponseValidationError ¶
type CreateProductV1ResponseValidationError struct {
// contains filtered or unexported fields
}
CreateProductV1ResponseValidationError is the validation error returned by CreateProductV1Response.Validate if the designated constraints aren't met.
func (CreateProductV1ResponseValidationError) Cause ¶
func (e CreateProductV1ResponseValidationError) Cause() error
Cause function returns cause value.
func (CreateProductV1ResponseValidationError) Error ¶
func (e CreateProductV1ResponseValidationError) Error() string
Error satisfies the builtin error interface
func (CreateProductV1ResponseValidationError) ErrorName ¶
func (e CreateProductV1ResponseValidationError) ErrorName() string
ErrorName returns error name.
func (CreateProductV1ResponseValidationError) Field ¶
func (e CreateProductV1ResponseValidationError) Field() string
Field function returns field value.
func (CreateProductV1ResponseValidationError) Key ¶
func (e CreateProductV1ResponseValidationError) Key() bool
Key function returns key value.
func (CreateProductV1ResponseValidationError) Reason ¶
func (e CreateProductV1ResponseValidationError) Reason() string
Reason function returns reason value.
type Currency ¶
type Currency int32
func (Currency) Descriptor ¶
func (Currency) Descriptor() protoreflect.EnumDescriptor
func (Currency) EnumDescriptor
deprecated
func (Currency) Number ¶
func (x Currency) Number() protoreflect.EnumNumber
func (Currency) Type ¶
func (Currency) Type() protoreflect.EnumType
type DescribeProductV1Request ¶
type DescribeProductV1Request struct { ProductId uint64 `protobuf:"varint,1,opt,name=product_id,json=productId,proto3" json:"product_id,omitempty"` // contains filtered or unexported fields }
func (*DescribeProductV1Request) Descriptor
deprecated
func (*DescribeProductV1Request) Descriptor() ([]byte, []int)
Deprecated: Use DescribeProductV1Request.ProtoReflect.Descriptor instead.
func (*DescribeProductV1Request) GetProductId ¶
func (x *DescribeProductV1Request) GetProductId() uint64
func (*DescribeProductV1Request) ProtoMessage ¶
func (*DescribeProductV1Request) ProtoMessage()
func (*DescribeProductV1Request) ProtoReflect ¶
func (x *DescribeProductV1Request) ProtoReflect() protoreflect.Message
func (*DescribeProductV1Request) Reset ¶
func (x *DescribeProductV1Request) Reset()
func (*DescribeProductV1Request) String ¶
func (x *DescribeProductV1Request) String() string
func (*DescribeProductV1Request) Validate ¶
func (m *DescribeProductV1Request) Validate() error
Validate checks the field values on DescribeProductV1Request with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
type DescribeProductV1RequestValidationError ¶
type DescribeProductV1RequestValidationError struct {
// contains filtered or unexported fields
}
DescribeProductV1RequestValidationError is the validation error returned by DescribeProductV1Request.Validate if the designated constraints aren't met.
func (DescribeProductV1RequestValidationError) Cause ¶
func (e DescribeProductV1RequestValidationError) Cause() error
Cause function returns cause value.
func (DescribeProductV1RequestValidationError) Error ¶
func (e DescribeProductV1RequestValidationError) Error() string
Error satisfies the builtin error interface
func (DescribeProductV1RequestValidationError) ErrorName ¶
func (e DescribeProductV1RequestValidationError) ErrorName() string
ErrorName returns error name.
func (DescribeProductV1RequestValidationError) Field ¶
func (e DescribeProductV1RequestValidationError) Field() string
Field function returns field value.
func (DescribeProductV1RequestValidationError) Key ¶
func (e DescribeProductV1RequestValidationError) Key() bool
Key function returns key value.
func (DescribeProductV1RequestValidationError) Reason ¶
func (e DescribeProductV1RequestValidationError) Reason() string
Reason function returns reason value.
type DescribeProductV1Response ¶
type DescribeProductV1Response struct { Product *Product `protobuf:"bytes,1,opt,name=product,proto3" json:"product,omitempty"` // contains filtered or unexported fields }
func (*DescribeProductV1Response) Descriptor
deprecated
func (*DescribeProductV1Response) Descriptor() ([]byte, []int)
Deprecated: Use DescribeProductV1Response.ProtoReflect.Descriptor instead.
func (*DescribeProductV1Response) GetProduct ¶
func (x *DescribeProductV1Response) GetProduct() *Product
func (*DescribeProductV1Response) ProtoMessage ¶
func (*DescribeProductV1Response) ProtoMessage()
func (*DescribeProductV1Response) ProtoReflect ¶
func (x *DescribeProductV1Response) ProtoReflect() protoreflect.Message
func (*DescribeProductV1Response) Reset ¶
func (x *DescribeProductV1Response) Reset()
func (*DescribeProductV1Response) String ¶
func (x *DescribeProductV1Response) String() string
func (*DescribeProductV1Response) Validate ¶
func (m *DescribeProductV1Response) Validate() error
Validate checks the field values on DescribeProductV1Response with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
type DescribeProductV1ResponseValidationError ¶
type DescribeProductV1ResponseValidationError struct {
// contains filtered or unexported fields
}
DescribeProductV1ResponseValidationError is the validation error returned by DescribeProductV1Response.Validate if the designated constraints aren't met.
func (DescribeProductV1ResponseValidationError) Cause ¶
func (e DescribeProductV1ResponseValidationError) Cause() error
Cause function returns cause value.
func (DescribeProductV1ResponseValidationError) Error ¶
func (e DescribeProductV1ResponseValidationError) Error() string
Error satisfies the builtin error interface
func (DescribeProductV1ResponseValidationError) ErrorName ¶
func (e DescribeProductV1ResponseValidationError) ErrorName() string
ErrorName returns error name.
func (DescribeProductV1ResponseValidationError) Field ¶
func (e DescribeProductV1ResponseValidationError) Field() string
Field function returns field value.
func (DescribeProductV1ResponseValidationError) Key ¶
func (e DescribeProductV1ResponseValidationError) Key() bool
Key function returns key value.
func (DescribeProductV1ResponseValidationError) Reason ¶
func (e DescribeProductV1ResponseValidationError) Reason() string
Reason function returns reason value.
type GoProductApiServiceClient ¶
type GoProductApiServiceClient interface { DescribeProductV1(ctx context.Context, in *DescribeProductV1Request, opts ...grpc.CallOption) (*DescribeProductV1Response, error) CreateProductV1(ctx context.Context, in *CreateProductV1Request, opts ...grpc.CallOption) (*CreateProductV1Response, error) ListProductsV1(ctx context.Context, in *ListProductsV1Request, opts ...grpc.CallOption) (*ListProductsV1Response, error) RemoveProductV1(ctx context.Context, in *RemoveProductV1Request, opts ...grpc.CallOption) (*RemoveProductV1Response, error) }
GoProductApiServiceClient is the client API for GoProductApiService 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 NewGoProductApiServiceClient ¶
func NewGoProductApiServiceClient(cc grpc.ClientConnInterface) GoProductApiServiceClient
type GoProductApiServiceServer ¶
type GoProductApiServiceServer interface { DescribeProductV1(context.Context, *DescribeProductV1Request) (*DescribeProductV1Response, error) CreateProductV1(context.Context, *CreateProductV1Request) (*CreateProductV1Response, error) ListProductsV1(context.Context, *ListProductsV1Request) (*ListProductsV1Response, error) RemoveProductV1(context.Context, *RemoveProductV1Request) (*RemoveProductV1Response, error) // contains filtered or unexported methods }
GoProductApiServiceServer is the server API for GoProductApiService service. All implementations must embed UnimplementedGoProductApiServiceServer for forward compatibility
type ListProductsV1Request ¶
type ListProductsV1Request struct {
// contains filtered or unexported fields
}
func (*ListProductsV1Request) Descriptor
deprecated
func (*ListProductsV1Request) Descriptor() ([]byte, []int)
Deprecated: Use ListProductsV1Request.ProtoReflect.Descriptor instead.
func (*ListProductsV1Request) ProtoMessage ¶
func (*ListProductsV1Request) ProtoMessage()
func (*ListProductsV1Request) ProtoReflect ¶
func (x *ListProductsV1Request) ProtoReflect() protoreflect.Message
func (*ListProductsV1Request) Reset ¶
func (x *ListProductsV1Request) Reset()
func (*ListProductsV1Request) String ¶
func (x *ListProductsV1Request) String() string
func (*ListProductsV1Request) Validate ¶
func (m *ListProductsV1Request) Validate() error
Validate checks the field values on ListProductsV1Request with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
type ListProductsV1RequestValidationError ¶
type ListProductsV1RequestValidationError struct {
// contains filtered or unexported fields
}
ListProductsV1RequestValidationError is the validation error returned by ListProductsV1Request.Validate if the designated constraints aren't met.
func (ListProductsV1RequestValidationError) Cause ¶
func (e ListProductsV1RequestValidationError) Cause() error
Cause function returns cause value.
func (ListProductsV1RequestValidationError) Error ¶
func (e ListProductsV1RequestValidationError) Error() string
Error satisfies the builtin error interface
func (ListProductsV1RequestValidationError) ErrorName ¶
func (e ListProductsV1RequestValidationError) ErrorName() string
ErrorName returns error name.
func (ListProductsV1RequestValidationError) Field ¶
func (e ListProductsV1RequestValidationError) Field() string
Field function returns field value.
func (ListProductsV1RequestValidationError) Key ¶
func (e ListProductsV1RequestValidationError) Key() bool
Key function returns key value.
func (ListProductsV1RequestValidationError) Reason ¶
func (e ListProductsV1RequestValidationError) Reason() string
Reason function returns reason value.
type ListProductsV1Response ¶
type ListProductsV1Response struct { Products []*Product `protobuf:"bytes,1,rep,name=products,proto3" json:"products,omitempty"` // contains filtered or unexported fields }
func (*ListProductsV1Response) Descriptor
deprecated
func (*ListProductsV1Response) Descriptor() ([]byte, []int)
Deprecated: Use ListProductsV1Response.ProtoReflect.Descriptor instead.
func (*ListProductsV1Response) GetProducts ¶
func (x *ListProductsV1Response) GetProducts() []*Product
func (*ListProductsV1Response) ProtoMessage ¶
func (*ListProductsV1Response) ProtoMessage()
func (*ListProductsV1Response) ProtoReflect ¶
func (x *ListProductsV1Response) ProtoReflect() protoreflect.Message
func (*ListProductsV1Response) Reset ¶
func (x *ListProductsV1Response) Reset()
func (*ListProductsV1Response) String ¶
func (x *ListProductsV1Response) String() string
func (*ListProductsV1Response) Validate ¶
func (m *ListProductsV1Response) Validate() error
Validate checks the field values on ListProductsV1Response with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
type ListProductsV1ResponseValidationError ¶
type ListProductsV1ResponseValidationError struct {
// contains filtered or unexported fields
}
ListProductsV1ResponseValidationError is the validation error returned by ListProductsV1Response.Validate if the designated constraints aren't met.
func (ListProductsV1ResponseValidationError) Cause ¶
func (e ListProductsV1ResponseValidationError) Cause() error
Cause function returns cause value.
func (ListProductsV1ResponseValidationError) Error ¶
func (e ListProductsV1ResponseValidationError) Error() string
Error satisfies the builtin error interface
func (ListProductsV1ResponseValidationError) ErrorName ¶
func (e ListProductsV1ResponseValidationError) ErrorName() string
ErrorName returns error name.
func (ListProductsV1ResponseValidationError) Field ¶
func (e ListProductsV1ResponseValidationError) Field() string
Field function returns field value.
func (ListProductsV1ResponseValidationError) Key ¶
func (e ListProductsV1ResponseValidationError) Key() bool
Key function returns key value.
func (ListProductsV1ResponseValidationError) Reason ¶
func (e ListProductsV1ResponseValidationError) Reason() string
Reason function returns reason value.
type Product ¶
type Product struct { Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Category string `protobuf:"bytes,3,opt,name=category,proto3" json:"category,omitempty"` Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` Brand string `protobuf:"bytes,5,opt,name=brand,proto3" json:"brand,omitempty"` Cost float32 `protobuf:"fixed32,6,opt,name=cost,proto3" json:"cost,omitempty"` Currency Currency `protobuf:"varint,7,opt,name=currency,proto3,enum=ozonmp.go_product_api.v1.Currency" json:"currency,omitempty"` Created *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=created,proto3" json:"created,omitempty"` // contains filtered or unexported fields }
func (*Product) Descriptor
deprecated
func (*Product) GetCategory ¶
func (*Product) GetCreated ¶
func (x *Product) GetCreated() *timestamppb.Timestamp
func (*Product) GetCurrency ¶
func (*Product) GetDescription ¶
func (*Product) ProtoMessage ¶
func (*Product) ProtoMessage()
func (*Product) ProtoReflect ¶
func (x *Product) ProtoReflect() protoreflect.Message
type ProductValidationError ¶
type ProductValidationError struct {
// contains filtered or unexported fields
}
ProductValidationError is the validation error returned by Product.Validate if the designated constraints aren't met.
func (ProductValidationError) Cause ¶
func (e ProductValidationError) Cause() error
Cause function returns cause value.
func (ProductValidationError) Error ¶
func (e ProductValidationError) Error() string
Error satisfies the builtin error interface
func (ProductValidationError) ErrorName ¶
func (e ProductValidationError) ErrorName() string
ErrorName returns error name.
func (ProductValidationError) Field ¶
func (e ProductValidationError) Field() string
Field function returns field value.
func (ProductValidationError) Key ¶
func (e ProductValidationError) Key() bool
Key function returns key value.
func (ProductValidationError) Reason ¶
func (e ProductValidationError) Reason() string
Reason function returns reason value.
type RemoveProductV1Request ¶
type RemoveProductV1Request struct { ProductId uint64 `protobuf:"varint,1,opt,name=product_id,json=productId,proto3" json:"product_id,omitempty"` // contains filtered or unexported fields }
func (*RemoveProductV1Request) Descriptor
deprecated
func (*RemoveProductV1Request) Descriptor() ([]byte, []int)
Deprecated: Use RemoveProductV1Request.ProtoReflect.Descriptor instead.
func (*RemoveProductV1Request) GetProductId ¶
func (x *RemoveProductV1Request) GetProductId() uint64
func (*RemoveProductV1Request) ProtoMessage ¶
func (*RemoveProductV1Request) ProtoMessage()
func (*RemoveProductV1Request) ProtoReflect ¶
func (x *RemoveProductV1Request) ProtoReflect() protoreflect.Message
func (*RemoveProductV1Request) Reset ¶
func (x *RemoveProductV1Request) Reset()
func (*RemoveProductV1Request) String ¶
func (x *RemoveProductV1Request) String() string
func (*RemoveProductV1Request) Validate ¶
func (m *RemoveProductV1Request) Validate() error
Validate checks the field values on RemoveProductV1Request with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
type RemoveProductV1RequestValidationError ¶
type RemoveProductV1RequestValidationError struct {
// contains filtered or unexported fields
}
RemoveProductV1RequestValidationError is the validation error returned by RemoveProductV1Request.Validate if the designated constraints aren't met.
func (RemoveProductV1RequestValidationError) Cause ¶
func (e RemoveProductV1RequestValidationError) Cause() error
Cause function returns cause value.
func (RemoveProductV1RequestValidationError) Error ¶
func (e RemoveProductV1RequestValidationError) Error() string
Error satisfies the builtin error interface
func (RemoveProductV1RequestValidationError) ErrorName ¶
func (e RemoveProductV1RequestValidationError) ErrorName() string
ErrorName returns error name.
func (RemoveProductV1RequestValidationError) Field ¶
func (e RemoveProductV1RequestValidationError) Field() string
Field function returns field value.
func (RemoveProductV1RequestValidationError) Key ¶
func (e RemoveProductV1RequestValidationError) Key() bool
Key function returns key value.
func (RemoveProductV1RequestValidationError) Reason ¶
func (e RemoveProductV1RequestValidationError) Reason() string
Reason function returns reason value.
type RemoveProductV1Response ¶
type RemoveProductV1Response struct { Product *Product `protobuf:"bytes,1,opt,name=product,proto3" json:"product,omitempty"` // contains filtered or unexported fields }
func (*RemoveProductV1Response) Descriptor
deprecated
func (*RemoveProductV1Response) Descriptor() ([]byte, []int)
Deprecated: Use RemoveProductV1Response.ProtoReflect.Descriptor instead.
func (*RemoveProductV1Response) GetProduct ¶
func (x *RemoveProductV1Response) GetProduct() *Product
func (*RemoveProductV1Response) ProtoMessage ¶
func (*RemoveProductV1Response) ProtoMessage()
func (*RemoveProductV1Response) ProtoReflect ¶
func (x *RemoveProductV1Response) ProtoReflect() protoreflect.Message
func (*RemoveProductV1Response) Reset ¶
func (x *RemoveProductV1Response) Reset()
func (*RemoveProductV1Response) String ¶
func (x *RemoveProductV1Response) String() string
func (*RemoveProductV1Response) Validate ¶
func (m *RemoveProductV1Response) Validate() error
Validate checks the field values on RemoveProductV1Response with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
type RemoveProductV1ResponseValidationError ¶
type RemoveProductV1ResponseValidationError struct {
// contains filtered or unexported fields
}
RemoveProductV1ResponseValidationError is the validation error returned by RemoveProductV1Response.Validate if the designated constraints aren't met.
func (RemoveProductV1ResponseValidationError) Cause ¶
func (e RemoveProductV1ResponseValidationError) Cause() error
Cause function returns cause value.
func (RemoveProductV1ResponseValidationError) Error ¶
func (e RemoveProductV1ResponseValidationError) Error() string
Error satisfies the builtin error interface
func (RemoveProductV1ResponseValidationError) ErrorName ¶
func (e RemoveProductV1ResponseValidationError) ErrorName() string
ErrorName returns error name.
func (RemoveProductV1ResponseValidationError) Field ¶
func (e RemoveProductV1ResponseValidationError) Field() string
Field function returns field value.
func (RemoveProductV1ResponseValidationError) Key ¶
func (e RemoveProductV1ResponseValidationError) Key() bool
Key function returns key value.
func (RemoveProductV1ResponseValidationError) Reason ¶
func (e RemoveProductV1ResponseValidationError) Reason() string
Reason function returns reason value.
type UnimplementedGoProductApiServiceServer ¶
type UnimplementedGoProductApiServiceServer struct { }
UnimplementedGoProductApiServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedGoProductApiServiceServer) CreateProductV1 ¶
func (UnimplementedGoProductApiServiceServer) CreateProductV1(context.Context, *CreateProductV1Request) (*CreateProductV1Response, error)
func (UnimplementedGoProductApiServiceServer) DescribeProductV1 ¶
func (UnimplementedGoProductApiServiceServer) DescribeProductV1(context.Context, *DescribeProductV1Request) (*DescribeProductV1Response, error)
func (UnimplementedGoProductApiServiceServer) ListProductsV1 ¶
func (UnimplementedGoProductApiServiceServer) ListProductsV1(context.Context, *ListProductsV1Request) (*ListProductsV1Response, error)
func (UnimplementedGoProductApiServiceServer) RemoveProductV1 ¶
func (UnimplementedGoProductApiServiceServer) RemoveProductV1(context.Context, *RemoveProductV1Request) (*RemoveProductV1Response, error)
type UnsafeGoProductApiServiceServer ¶
type UnsafeGoProductApiServiceServer interface {
// contains filtered or unexported methods
}
UnsafeGoProductApiServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to GoProductApiServiceServer will result in compilation errors.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
google.golang.org
|
|
protobuf/types/known/timestamppb
Package timestamppb contains generated types for google/protobuf/timestamp.proto.
|
Package timestamppb contains generated types for google/protobuf/timestamp.proto. |