Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterBrandServer(s grpc.ServiceRegistrar, srv BrandServer)
- type BrandClient
- type BrandInfoResponse
- func (*BrandInfoResponse) Descriptor() ([]byte, []int)deprecated
- func (x *BrandInfoResponse) GetId() int32
- func (x *BrandInfoResponse) GetLogo() string
- func (x *BrandInfoResponse) GetName() string
- func (*BrandInfoResponse) ProtoMessage()
- func (x *BrandInfoResponse) ProtoReflect() protoreflect.Message
- func (x *BrandInfoResponse) Reset()
- func (x *BrandInfoResponse) String() string
- type BrandListResponse
- func (*BrandListResponse) Descriptor() ([]byte, []int)deprecated
- func (x *BrandListResponse) GetData() []*BrandInfoResponse
- func (x *BrandListResponse) GetTotal() int32
- func (*BrandListResponse) ProtoMessage()
- func (x *BrandListResponse) ProtoReflect() protoreflect.Message
- func (x *BrandListResponse) Reset()
- func (x *BrandListResponse) String() string
- type BrandServer
- type CreateBrandRequest
- func (*CreateBrandRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateBrandRequest) GetId() int32
- func (x *CreateBrandRequest) GetLogo() string
- func (x *CreateBrandRequest) GetName() string
- func (*CreateBrandRequest) ProtoMessage()
- func (x *CreateBrandRequest) ProtoReflect() protoreflect.Message
- func (x *CreateBrandRequest) Reset()
- func (x *CreateBrandRequest) String() string
- type DeleteBrandRequest
- type Empty
- type GetBrandFilterListRequest
- func (*GetBrandFilterListRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetBrandFilterListRequest) GetPagePerNums() int32
- func (x *GetBrandFilterListRequest) GetPages() int32
- func (*GetBrandFilterListRequest) ProtoMessage()
- func (x *GetBrandFilterListRequest) ProtoReflect() protoreflect.Message
- func (x *GetBrandFilterListRequest) Reset()
- func (x *GetBrandFilterListRequest) String() string
- type UnimplementedBrandServer
- func (UnimplementedBrandServer) CreateBrand(context.Context, *CreateBrandRequest) (*BrandInfoResponse, error)
- func (UnimplementedBrandServer) DeleteBrand(context.Context, *DeleteBrandRequest) (*Empty, error)
- func (UnimplementedBrandServer) GetBrandFilterList(context.Context, *GetBrandFilterListRequest) (*BrandListResponse, error)
- func (UnimplementedBrandServer) Ping(context.Context, *Empty) (*Empty, error)
- func (UnimplementedBrandServer) UpdateBrand(context.Context, *CreateBrandRequest) (*Empty, error)
- type UnsafeBrandServer
Constants ¶
const ( Brand_GetBrandFilterList_FullMethodName = "/brand.Brand/GetBrandFilterList" Brand_CreateBrand_FullMethodName = "/brand.Brand/CreateBrand" Brand_UpdateBrand_FullMethodName = "/brand.Brand/UpdateBrand" Brand_DeleteBrand_FullMethodName = "/brand.Brand/DeleteBrand" Brand_Ping_FullMethodName = "/brand.Brand/Ping" )
Variables ¶
var Brand_ServiceDesc = grpc.ServiceDesc{ ServiceName: "brand.Brand", HandlerType: (*BrandServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetBrandFilterList", Handler: _Brand_GetBrandFilterList_Handler, }, { MethodName: "CreateBrand", Handler: _Brand_CreateBrand_Handler, }, { MethodName: "UpdateBrand", Handler: _Brand_UpdateBrand_Handler, }, { MethodName: "DeleteBrand", Handler: _Brand_DeleteBrand_Handler, }, { MethodName: "Ping", Handler: _Brand_Ping_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "proto/goods/brand.proto", }
Brand_ServiceDesc is the grpc.ServiceDesc for Brand service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_proto_goods_brand_proto protoreflect.FileDescriptor
Functions ¶
func RegisterBrandServer ¶
func RegisterBrandServer(s grpc.ServiceRegistrar, srv BrandServer)
Types ¶
type BrandClient ¶
type BrandClient interface { // 品牌接口 GetBrandFilterList(ctx context.Context, in *GetBrandFilterListRequest, opts ...grpc.CallOption) (*BrandListResponse, error) CreateBrand(ctx context.Context, in *CreateBrandRequest, opts ...grpc.CallOption) (*BrandInfoResponse, error) UpdateBrand(ctx context.Context, in *CreateBrandRequest, opts ...grpc.CallOption) (*Empty, error) DeleteBrand(ctx context.Context, in *DeleteBrandRequest, opts ...grpc.CallOption) (*Empty, error) Ping(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) }
BrandClient is the client API for Brand 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 NewBrandClient ¶
func NewBrandClient(cc grpc.ClientConnInterface) BrandClient
type BrandInfoResponse ¶
type BrandInfoResponse struct { // 品牌信息 Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // 品牌id Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // 品牌名称 Logo string `protobuf:"bytes,3,opt,name=logo,proto3" json:"logo,omitempty"` // 品牌logo // contains filtered or unexported fields }
func (*BrandInfoResponse) Descriptor
deprecated
func (*BrandInfoResponse) Descriptor() ([]byte, []int)
Deprecated: Use BrandInfoResponse.ProtoReflect.Descriptor instead.
func (*BrandInfoResponse) GetId ¶
func (x *BrandInfoResponse) GetId() int32
func (*BrandInfoResponse) GetLogo ¶
func (x *BrandInfoResponse) GetLogo() string
func (*BrandInfoResponse) GetName ¶
func (x *BrandInfoResponse) GetName() string
func (*BrandInfoResponse) ProtoMessage ¶
func (*BrandInfoResponse) ProtoMessage()
func (*BrandInfoResponse) ProtoReflect ¶
func (x *BrandInfoResponse) ProtoReflect() protoreflect.Message
func (*BrandInfoResponse) Reset ¶
func (x *BrandInfoResponse) Reset()
func (*BrandInfoResponse) String ¶
func (x *BrandInfoResponse) String() string
type BrandListResponse ¶
type BrandListResponse struct { Total int32 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"` // 总数 Data []*BrandInfoResponse `protobuf:"bytes,2,rep,name=data,proto3" json:"data,omitempty"` // 品牌列表 // contains filtered or unexported fields }
func (*BrandListResponse) Descriptor
deprecated
func (*BrandListResponse) Descriptor() ([]byte, []int)
Deprecated: Use BrandListResponse.ProtoReflect.Descriptor instead.
func (*BrandListResponse) GetData ¶
func (x *BrandListResponse) GetData() []*BrandInfoResponse
func (*BrandListResponse) GetTotal ¶
func (x *BrandListResponse) GetTotal() int32
func (*BrandListResponse) ProtoMessage ¶
func (*BrandListResponse) ProtoMessage()
func (*BrandListResponse) ProtoReflect ¶
func (x *BrandListResponse) ProtoReflect() protoreflect.Message
func (*BrandListResponse) Reset ¶
func (x *BrandListResponse) Reset()
func (*BrandListResponse) String ¶
func (x *BrandListResponse) String() string
type BrandServer ¶
type BrandServer interface { // 品牌接口 GetBrandFilterList(context.Context, *GetBrandFilterListRequest) (*BrandListResponse, error) CreateBrand(context.Context, *CreateBrandRequest) (*BrandInfoResponse, error) UpdateBrand(context.Context, *CreateBrandRequest) (*Empty, error) DeleteBrand(context.Context, *DeleteBrandRequest) (*Empty, error) Ping(context.Context, *Empty) (*Empty, error) // contains filtered or unexported methods }
BrandServer is the server API for Brand service. All implementations must embed UnimplementedBrandServer for forward compatibility
type CreateBrandRequest ¶
type CreateBrandRequest struct { Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // 品牌id Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // 品牌名称 Logo string `protobuf:"bytes,3,opt,name=logo,proto3" json:"logo,omitempty"` // 品牌logo // contains filtered or unexported fields }
func (*CreateBrandRequest) Descriptor
deprecated
func (*CreateBrandRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateBrandRequest.ProtoReflect.Descriptor instead.
func (*CreateBrandRequest) GetId ¶
func (x *CreateBrandRequest) GetId() int32
func (*CreateBrandRequest) GetLogo ¶
func (x *CreateBrandRequest) GetLogo() string
func (*CreateBrandRequest) GetName ¶
func (x *CreateBrandRequest) GetName() string
func (*CreateBrandRequest) ProtoMessage ¶
func (*CreateBrandRequest) ProtoMessage()
func (*CreateBrandRequest) ProtoReflect ¶
func (x *CreateBrandRequest) ProtoReflect() protoreflect.Message
func (*CreateBrandRequest) Reset ¶
func (x *CreateBrandRequest) Reset()
func (*CreateBrandRequest) String ¶
func (x *CreateBrandRequest) String() string
type DeleteBrandRequest ¶
type DeleteBrandRequest struct { Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // 品牌id // contains filtered or unexported fields }
func (*DeleteBrandRequest) Descriptor
deprecated
func (*DeleteBrandRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteBrandRequest.ProtoReflect.Descriptor instead.
func (*DeleteBrandRequest) GetId ¶
func (x *DeleteBrandRequest) GetId() int32
func (*DeleteBrandRequest) ProtoMessage ¶
func (*DeleteBrandRequest) ProtoMessage()
func (*DeleteBrandRequest) ProtoReflect ¶
func (x *DeleteBrandRequest) ProtoReflect() protoreflect.Message
func (*DeleteBrandRequest) Reset ¶
func (x *DeleteBrandRequest) Reset()
func (*DeleteBrandRequest) String ¶
func (x *DeleteBrandRequest) String() string
type Empty ¶
type Empty struct {
// contains filtered or unexported fields
}
func (*Empty) Descriptor
deprecated
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
func (*Empty) ProtoReflect ¶
func (x *Empty) ProtoReflect() protoreflect.Message
type GetBrandFilterListRequest ¶
type GetBrandFilterListRequest struct { Pages int32 `protobuf:"varint,1,opt,name=pages,proto3" json:"pages,omitempty"` // 当前页数 PagePerNums int32 `protobuf:"varint,2,opt,name=pagePerNums,proto3" json:"pagePerNums,omitempty"` // 每页显示数量 // contains filtered or unexported fields }
func (*GetBrandFilterListRequest) Descriptor
deprecated
func (*GetBrandFilterListRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetBrandFilterListRequest.ProtoReflect.Descriptor instead.
func (*GetBrandFilterListRequest) GetPagePerNums ¶
func (x *GetBrandFilterListRequest) GetPagePerNums() int32
func (*GetBrandFilterListRequest) GetPages ¶
func (x *GetBrandFilterListRequest) GetPages() int32
func (*GetBrandFilterListRequest) ProtoMessage ¶
func (*GetBrandFilterListRequest) ProtoMessage()
func (*GetBrandFilterListRequest) ProtoReflect ¶
func (x *GetBrandFilterListRequest) ProtoReflect() protoreflect.Message
func (*GetBrandFilterListRequest) Reset ¶
func (x *GetBrandFilterListRequest) Reset()
func (*GetBrandFilterListRequest) String ¶
func (x *GetBrandFilterListRequest) String() string
type UnimplementedBrandServer ¶
type UnimplementedBrandServer struct { }
UnimplementedBrandServer must be embedded to have forward compatible implementations.
func (UnimplementedBrandServer) CreateBrand ¶
func (UnimplementedBrandServer) CreateBrand(context.Context, *CreateBrandRequest) (*BrandInfoResponse, error)
func (UnimplementedBrandServer) DeleteBrand ¶
func (UnimplementedBrandServer) DeleteBrand(context.Context, *DeleteBrandRequest) (*Empty, error)
func (UnimplementedBrandServer) GetBrandFilterList ¶
func (UnimplementedBrandServer) GetBrandFilterList(context.Context, *GetBrandFilterListRequest) (*BrandListResponse, error)
func (UnimplementedBrandServer) UpdateBrand ¶
func (UnimplementedBrandServer) UpdateBrand(context.Context, *CreateBrandRequest) (*Empty, error)
type UnsafeBrandServer ¶
type UnsafeBrandServer interface {
// contains filtered or unexported methods
}
UnsafeBrandServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to BrandServer will result in compilation errors.