service

package
v0.0.2-alpha Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2019 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SpacedRepetition

type SpacedRepetition struct {
	SqlDataBase *sql.DB
}

func (SpacedRepetition) Add

func (sr SpacedRepetition) Add(topic *Topic)

Add Adds a topic into persistence layer

func (SpacedRepetition) GetAll

func (sr SpacedRepetition) GetAll() (topics []Topic)

func (SpacedRepetition) GetTopicNow

func (sr SpacedRepetition) GetTopicNow() (topic *Topic)

GetTopicNow Get a topic from persistence layer

func (SpacedRepetition) Init

func (sr SpacedRepetition) Init()

func (SpacedRepetition) RescheduleTopic

func (sr SpacedRepetition) RescheduleTopic(topic *Topic)

RescheduleTopic Updates the next run time in the persistence layer

type Topic

type Topic struct {
	Title   string
	Times   int
	NextRun time.Time
	Id      int64
}

Jump to

Keyboard shortcuts

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