slide

package
v0.0.0-...-1cd85f6 Latest Latest
Warning

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

Go to latest
Published: May 30, 2022 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repository

type Repository interface {
	GetSlideURLByPage(ctx context.Context, channelID, page int) (string, int, domain.Error)
	GetLastPageNumber(ctx context.Context, channelID int) (int, domain.Error)
	UpdateCurrentPage(ctx context.Context, channelID, page int) domain.Error
}

type SlideService

type SlideService struct {
	// contains filtered or unexported fields
}

func NewSlideService

func NewSlideService(_ context.Context, repo Repository) *SlideService

func (*SlideService) GetPrevNext

func (s *SlideService) GetPrevNext(ctx context.Context, channelID, p int) (prev int, next int, err domain.Error)

GetPrevNext returns the previous and next page number

func (*SlideService) GetSlideURL

func (s *SlideService) GetSlideURL(ctx context.Context, channelID, p int) (url string, page int, err domain.Error)

GetSlideURL returns the slide URL specified by page. If p is out of scope, it would return page 1.

func (*SlideService) UpdateCurrentPage

func (s *SlideService) UpdateCurrentPage(ctx context.Context, channelID, p int) domain.Error

UpdateCurrentPage marked the specified page to be enabled, and all other pages are disabled.

Jump to

Keyboard shortcuts

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