Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterBannerServer(s grpc.ServiceRegistrar, srv BannerServer)
- type BannerClient
- type BannerInfoResponse
- func (*BannerInfoResponse) Descriptor() ([]byte, []int)deprecated
- func (x *BannerInfoResponse) GetId() int32
- func (x *BannerInfoResponse) GetImage() string
- func (x *BannerInfoResponse) GetIndex() int32
- func (x *BannerInfoResponse) GetUrl() string
- func (*BannerInfoResponse) ProtoMessage()
- func (x *BannerInfoResponse) ProtoReflect() protoreflect.Message
- func (x *BannerInfoResponse) Reset()
- func (x *BannerInfoResponse) String() string
- type BannerListResponse
- func (*BannerListResponse) Descriptor() ([]byte, []int)deprecated
- func (x *BannerListResponse) GetData() []*BannerInfoResponse
- func (x *BannerListResponse) GetTotal() int32
- func (*BannerListResponse) ProtoMessage()
- func (x *BannerListResponse) ProtoReflect() protoreflect.Message
- func (x *BannerListResponse) Reset()
- func (x *BannerListResponse) String() string
- type BannerServer
- type CreateBannerRequest
- func (*CreateBannerRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateBannerRequest) GetId() int32
- func (x *CreateBannerRequest) GetImage() string
- func (x *CreateBannerRequest) GetIndex() int32
- func (x *CreateBannerRequest) GetUrl() string
- func (*CreateBannerRequest) ProtoMessage()
- func (x *CreateBannerRequest) ProtoReflect() protoreflect.Message
- func (x *CreateBannerRequest) Reset()
- func (x *CreateBannerRequest) String() string
- type DeleteBannerRequest
- func (*DeleteBannerRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DeleteBannerRequest) GetId() int64
- func (*DeleteBannerRequest) ProtoMessage()
- func (x *DeleteBannerRequest) ProtoReflect() protoreflect.Message
- func (x *DeleteBannerRequest) Reset()
- func (x *DeleteBannerRequest) String() string
- type Empty
- type UnimplementedBannerServer
- func (UnimplementedBannerServer) CreateBanner(context.Context, *CreateBannerRequest) (*BannerInfoResponse, error)
- func (UnimplementedBannerServer) DeleteBanner(context.Context, *DeleteBannerRequest) (*Empty, error)
- func (UnimplementedBannerServer) GetBannerList(context.Context, *Empty) (*BannerListResponse, error)
- func (UnimplementedBannerServer) Ping(context.Context, *Empty) (*Empty, error)
- func (UnimplementedBannerServer) UpdateBanner(context.Context, *CreateBannerRequest) (*Empty, error)
- type UnsafeBannerServer
Constants ¶
const ( Banner_GetBannerList_FullMethodName = "/banner.Banner/GetBannerList" Banner_CreateBanner_FullMethodName = "/banner.Banner/CreateBanner" Banner_UpdateBanner_FullMethodName = "/banner.Banner/UpdateBanner" Banner_DeleteBanner_FullMethodName = "/banner.Banner/DeleteBanner" Banner_Ping_FullMethodName = "/banner.Banner/Ping" )
Variables ¶
var Banner_ServiceDesc = grpc.ServiceDesc{ ServiceName: "banner.Banner", HandlerType: (*BannerServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetBannerList", Handler: _Banner_GetBannerList_Handler, }, { MethodName: "CreateBanner", Handler: _Banner_CreateBanner_Handler, }, { MethodName: "UpdateBanner", Handler: _Banner_UpdateBanner_Handler, }, { MethodName: "DeleteBanner", Handler: _Banner_DeleteBanner_Handler, }, { MethodName: "Ping", Handler: _Banner_Ping_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "proto/goods/banner.proto", }
Banner_ServiceDesc is the grpc.ServiceDesc for Banner service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterBannerServer ¶
func RegisterBannerServer(s grpc.ServiceRegistrar, srv BannerServer)
Types ¶
type BannerClient ¶
type BannerClient interface { // 轮播图接口 GetBannerList(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*BannerListResponse, error) CreateBanner(ctx context.Context, in *CreateBannerRequest, opts ...grpc.CallOption) (*BannerInfoResponse, error) UpdateBanner(ctx context.Context, in *CreateBannerRequest, opts ...grpc.CallOption) (*Empty, error) DeleteBanner(ctx context.Context, in *DeleteBannerRequest, opts ...grpc.CallOption) (*Empty, error) Ping(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) }
BannerClient is the client API for Banner 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 NewBannerClient ¶
func NewBannerClient(cc grpc.ClientConnInterface) BannerClient
type BannerInfoResponse ¶
type BannerInfoResponse struct { Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // 轮播图id Index int32 `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty"` // 轮播图排序 Image string `protobuf:"bytes,3,opt,name=image,proto3" json:"image,omitempty"` // 轮播图图片地址 Url string `protobuf:"bytes,4,opt,name=url,proto3" json:"url,omitempty"` // 轮播图跳转地址 // contains filtered or unexported fields }
func (*BannerInfoResponse) Descriptor
deprecated
func (*BannerInfoResponse) Descriptor() ([]byte, []int)
Deprecated: Use BannerInfoResponse.ProtoReflect.Descriptor instead.
func (*BannerInfoResponse) GetId ¶
func (x *BannerInfoResponse) GetId() int32
func (*BannerInfoResponse) GetImage ¶
func (x *BannerInfoResponse) GetImage() string
func (*BannerInfoResponse) GetIndex ¶
func (x *BannerInfoResponse) GetIndex() int32
func (*BannerInfoResponse) GetUrl ¶
func (x *BannerInfoResponse) GetUrl() string
func (*BannerInfoResponse) ProtoMessage ¶
func (*BannerInfoResponse) ProtoMessage()
func (*BannerInfoResponse) ProtoReflect ¶
func (x *BannerInfoResponse) ProtoReflect() protoreflect.Message
func (*BannerInfoResponse) Reset ¶
func (x *BannerInfoResponse) Reset()
func (*BannerInfoResponse) String ¶
func (x *BannerInfoResponse) String() string
type BannerListResponse ¶
type BannerListResponse struct { Total int32 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"` // 总数 Data []*BannerInfoResponse `protobuf:"bytes,2,rep,name=data,proto3" json:"data,omitempty"` // 轮播图列表 // contains filtered or unexported fields }
func (*BannerListResponse) Descriptor
deprecated
func (*BannerListResponse) Descriptor() ([]byte, []int)
Deprecated: Use BannerListResponse.ProtoReflect.Descriptor instead.
func (*BannerListResponse) GetData ¶
func (x *BannerListResponse) GetData() []*BannerInfoResponse
func (*BannerListResponse) GetTotal ¶
func (x *BannerListResponse) GetTotal() int32
func (*BannerListResponse) ProtoMessage ¶
func (*BannerListResponse) ProtoMessage()
func (*BannerListResponse) ProtoReflect ¶
func (x *BannerListResponse) ProtoReflect() protoreflect.Message
func (*BannerListResponse) Reset ¶
func (x *BannerListResponse) Reset()
func (*BannerListResponse) String ¶
func (x *BannerListResponse) String() string
type BannerServer ¶
type BannerServer interface { // 轮播图接口 GetBannerList(context.Context, *Empty) (*BannerListResponse, error) CreateBanner(context.Context, *CreateBannerRequest) (*BannerInfoResponse, error) UpdateBanner(context.Context, *CreateBannerRequest) (*Empty, error) DeleteBanner(context.Context, *DeleteBannerRequest) (*Empty, error) Ping(context.Context, *Empty) (*Empty, error) // contains filtered or unexported methods }
BannerServer is the server API for Banner service. All implementations must embed UnimplementedBannerServer for forward compatibility
type CreateBannerRequest ¶
type CreateBannerRequest struct { Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // 轮播图id Index int32 `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty"` // 轮播图排序 Image string `protobuf:"bytes,3,opt,name=image,proto3" json:"image,omitempty"` // 轮播图名称 Url string `protobuf:"bytes,4,opt,name=url,proto3" json:"url,omitempty"` // 轮播图图片地址 // contains filtered or unexported fields }
func (*CreateBannerRequest) Descriptor
deprecated
func (*CreateBannerRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateBannerRequest.ProtoReflect.Descriptor instead.
func (*CreateBannerRequest) GetId ¶
func (x *CreateBannerRequest) GetId() int32
func (*CreateBannerRequest) GetImage ¶
func (x *CreateBannerRequest) GetImage() string
func (*CreateBannerRequest) GetIndex ¶
func (x *CreateBannerRequest) GetIndex() int32
func (*CreateBannerRequest) GetUrl ¶
func (x *CreateBannerRequest) GetUrl() string
func (*CreateBannerRequest) ProtoMessage ¶
func (*CreateBannerRequest) ProtoMessage()
func (*CreateBannerRequest) ProtoReflect ¶
func (x *CreateBannerRequest) ProtoReflect() protoreflect.Message
func (*CreateBannerRequest) Reset ¶
func (x *CreateBannerRequest) Reset()
func (*CreateBannerRequest) String ¶
func (x *CreateBannerRequest) String() string
type DeleteBannerRequest ¶
type DeleteBannerRequest struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // 轮播图id // contains filtered or unexported fields }
func (*DeleteBannerRequest) Descriptor
deprecated
func (*DeleteBannerRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteBannerRequest.ProtoReflect.Descriptor instead.
func (*DeleteBannerRequest) GetId ¶
func (x *DeleteBannerRequest) GetId() int64
func (*DeleteBannerRequest) ProtoMessage ¶
func (*DeleteBannerRequest) ProtoMessage()
func (*DeleteBannerRequest) ProtoReflect ¶
func (x *DeleteBannerRequest) ProtoReflect() protoreflect.Message
func (*DeleteBannerRequest) Reset ¶
func (x *DeleteBannerRequest) Reset()
func (*DeleteBannerRequest) String ¶
func (x *DeleteBannerRequest) 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 UnimplementedBannerServer ¶
type UnimplementedBannerServer struct { }
UnimplementedBannerServer must be embedded to have forward compatible implementations.
func (UnimplementedBannerServer) CreateBanner ¶
func (UnimplementedBannerServer) CreateBanner(context.Context, *CreateBannerRequest) (*BannerInfoResponse, error)
func (UnimplementedBannerServer) DeleteBanner ¶
func (UnimplementedBannerServer) DeleteBanner(context.Context, *DeleteBannerRequest) (*Empty, error)
func (UnimplementedBannerServer) GetBannerList ¶
func (UnimplementedBannerServer) GetBannerList(context.Context, *Empty) (*BannerListResponse, error)
func (UnimplementedBannerServer) UpdateBanner ¶
func (UnimplementedBannerServer) UpdateBanner(context.Context, *CreateBannerRequest) (*Empty, error)
type UnsafeBannerServer ¶
type UnsafeBannerServer interface {
// contains filtered or unexported methods
}
UnsafeBannerServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to BannerServer will result in compilation errors.