mysql

package
v0.0.0-...-8a4eff6 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2017 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 Cron

type Cron struct {
	ID uint

	UserID  int
	Query   string
	Sources string

	CreatedAt time.Time
	UpdatedAt time.Time
}

type Driver

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

func NewDriver

func NewDriver(host, port, username, password, database string) (*Driver, error)

type Repository

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

func NewRepository

func NewRepository(driver *Driver) *Repository

func (*Repository) Delete

func (r *Repository) Delete(ctx context.Context, id uint) error

func (*Repository) GetForUser

func (r *Repository) GetForUser(ctx context.Context, userID int) ([]cron.Cron, error)

func (*Repository) Insert

func (r *Repository) Insert(ctx context.Context, c *cron.Cron) error

func (*Repository) List

func (r *Repository) List(ctx context.Context) ([]cron.Cron, error)

type ResultsRepository

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

func NewResultsRepository

func NewResultsRepository(driver *Driver) *ResultsRepository

func (*ResultsRepository) GetLastResult

func (r *ResultsRepository) GetLastResult(ctx context.Context, cronID uint, source string) (cron.Paper, error)

func (*ResultsRepository) Insert

func (r *ResultsRepository) Insert(ctx context.Context, cronID uint, paper cron.Paper) error

type SearchResult

type SearchResult struct {
	ID uint

	CronID uint
	Source string

	Result *dbPaper

	CreatedAt time.Time
}

Jump to

Keyboard shortcuts

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