slide

package
v0.0.0-...-63046b2 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DateOp

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

type PageData

type PageData struct {
	PageId string `json:"page_id"`
	Type   string `json:"type"`
}

type SlideConfig

type SlideConfig struct {
	NumberOfSlides int            `json:"number_of_slides"`
	Slides         []SlideContent `json:"slides"`
}

Describe the slide information possessed by the user.

type SlideContent

type SlideContent struct {
	Title      string `json:"title"`
	Id         string `json:"id"`
	CreateDate string `json:"create_date"`
	ChangeDate string `json:"change_date"`
}

Information for each slide.

type SlideData

type SlideData struct {
	NumberOfPages int        `json:"number_of_pages"`
	Pages         []PageData `json:"pages"`
	SlideContent
}

Detailed information for each slide.

type SlideManager

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

func NewSlideManager

func NewSlideManager(ctx context.Context, daprClient *client.Client, userId string) *SlideManager

func (*SlideManager) Create

func (s *SlideManager) Create(title string) (string, error)

Create slide

Arguments: - title: Slide title.

Return: - id string: Slide id

func (*SlideManager) CreatePage

func (s *SlideManager) CreatePage(slideId string, pageType string) (*PageData, error)

Create Page

Arguments: - slideId: Id of slide. - pageType: page type.

func (*SlideManager) Delete

func (s *SlideManager) Delete(slideId string, storageOp storage.StorageOp) error

Delete slide.

Arguments: - slideId: Id of slide. - storageOp: storage op instance

func (*SlideManager) DeleteAll

func (s *SlideManager) DeleteAll(storageOp storage.StorageOp) error

Delete All slide.

Arguments: - storageOp: storage op instance

func (*SlideManager) DeletePage

func (s *SlideManager) DeletePage(slideId string, pageId string, storageOp storage.StorageOp) error

Delete page.

Arguments: - slideId: Id of slide. - pageId: Id of page. - storageOp: storage op instance

func (*SlideManager) GetInfo

func (s *SlideManager) GetInfo() (*SlideConfig, error)

Get Slides infomation of user.

func (*SlideManager) GetPage

func (s *SlideManager) GetPage(slideId string, pageId string, storageOp storage.StorageOp) ([]byte, error)

Get page data.

Arguments: - slideId: Id of slide. - pageId: Id of page. - storageOp: storage op instance

func (*SlideManager) GetSlideDetails

func (s *SlideManager) GetSlideDetails(slideId string) (*SlideData, error)

Get slide detail data.

Arguments: - slideId: Id of slide.

func (*SlideManager) Rename

func (s *SlideManager) Rename(slideId string, newName string) error

Rename slide

Arguments: - slideId: slide id. - newName: new name(title)

func (*SlideManager) SetPage

func (s *SlideManager) SetPage(data []byte, slideId string, pageId string, storageOp storage.StorageOp) error

Write page data.

Arguments: - data: page data. - slideId: Id of slide. - pageId: Id of page. - storageOp: storage op instance

func (*SlideManager) SwapPage

func (s *SlideManager) SwapPage(slideId string, origin int, target int) error

Swap pages

Arguments: - slideId: Id of slide, - origin: origin index. - target: target index.

Jump to

Keyboard shortcuts

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