banner

package
v0.0.0-...-6f596e7 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
)

Variables

View Source
	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)

View Source
var File_proto_goods_banner_proto protoreflect.FileDescriptor

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) Descriptor() ([]byte, []int)

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect

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

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

type UnimplementedBannerServer

type UnimplementedBannerServer struct {
}

UnimplementedBannerServer must be embedded to have forward compatible implementations.

func (UnimplementedBannerServer) CreateBanner

func (UnimplementedBannerServer) DeleteBanner

func (UnimplementedBannerServer) GetBannerList

func (UnimplementedBannerServer) Ping

func (UnimplementedBannerServer) UpdateBanner

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.

Jump to

Keyboard shortcuts

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