service

package
v0.0.0-...-a096607 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App interface {
	BannerOn(ctx context.Context, slotID, bannerID int) error
	BannerOff(ctx context.Context, slotID, bannerID int) error
	Banner(ctx context.Context, slotID, groupID int) (bannerID int, err error)
	Click(ctx context.Context, slotID, bannerID, groupID int) error
}

type Service

type Service struct {
	api.UnimplementedBannerRotationServer
	// contains filtered or unexported fields
}

func NewService

func NewService(app App, host string, port uint16) *Service

func (*Service) AddBanner

func (s *Service) AddBanner(ctx context.Context, r *api.SlotConfigRequest) (*emptypb.Empty, error)

func (*Service) Find

func (*Service) RemoveBanner

func (s *Service) RemoveBanner(ctx context.Context, r *api.SlotConfigRequest) (*emptypb.Empty, error)

func (*Service) Start

func (s *Service) Start() error

func (*Service) Stop

func (s *Service) Stop(ctx context.Context)

func (*Service) Success

func (s *Service) Success(ctx context.Context, r *api.SuccessRequest) (*emptypb.Empty, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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