Documentation ¶
Index ¶
- type RotationService
- func (rs *RotationService) AckClick(ctx context.Context, req *pb.AckClickRequest) (*pb.StringResponse, error)
- func (rs *RotationService) Add(ctx context.Context, req *pb.AddRequest) (*pb.StringResponse, error)
- func (rs *RotationService) Delete(ctx context.Context, req *pb.DeleteRequest) (*pb.StringResponse, error)
- func (rs *RotationService) Run(c configs.Config) error
- func (rs *RotationService) SelectOne(ctx context.Context, req *pb.SelectOneRequest) (*pb.BannerIDResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RotationService ¶
type RotationService struct { Storage interfaces.Storage Publisher mq.Publisher ExchangeName string // contains filtered or unexported fields }
RotationService represents gRPC banner rotation service.
func NewRotationService ¶
func NewRotationService(ctx context.Context, s interfaces.Storage, p mq.Publisher, exch string) *RotationService
NewRotationService creates new banner rotation service.
func (*RotationService) AckClick ¶
func (rs *RotationService) AckClick(ctx context.Context, req *pb.AckClickRequest) (*pb.StringResponse, error)
AckClick acknowledges a click on a banner by users group.
func (*RotationService) Add ¶
func (rs *RotationService) Add(ctx context.Context, req *pb.AddRequest) (*pb.StringResponse, error)
Add adds new banner into rotation.
func (*RotationService) Delete ¶
func (rs *RotationService) Delete(ctx context.Context, req *pb.DeleteRequest) (*pb.StringResponse, error)
Delete deletes banner for specific slot out of rotation.
func (*RotationService) Run ¶
func (rs *RotationService) Run(c configs.Config) error
Run starts gRPC server.
func (*RotationService) SelectOne ¶
func (rs *RotationService) SelectOne(ctx context.Context, req *pb.SelectOneRequest) (*pb.BannerIDResponse, error)
SelectOne selects banner to be shown for specific users group in specific slot.
Click to show internal directories.
Click to hide internal directories.