whatson

package
v0.0.0-...-4db56dd Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

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

Store stores the dependencies

func NewWhatsOnRepo

func NewWhatsOnRepo(db *sqlx.DB) *Store

NewWhatsOnRepo stores our dependency

func (*Store) AddWhatsOn

func (s *Store) AddWhatsOn(ctx context.Context, whatsOnParam WhatsOn) (WhatsOn, error)

func (*Store) DeleteWhatsOn

func (s *Store) DeleteWhatsOn(ctx context.Context, whatsOnParam WhatsOn) error

func (*Store) EditWhatsOn

func (s *Store) EditWhatsOn(ctx context.Context, whatsOnParam WhatsOn) (WhatsOn, error)

func (*Store) GetWhatsOn

func (s *Store) GetWhatsOn(ctx context.Context) ([]WhatsOn, error)

func (*Store) GetWhatsOnArticle

func (s *Store) GetWhatsOnArticle(ctx context.Context, whatsOnParam WhatsOn) (WhatsOn, error)

func (*Store) GetWhatsOnFuture

func (s *Store) GetWhatsOnFuture(ctx context.Context) ([]WhatsOn, error)

func (*Store) GetWhatsOnLatest

func (s *Store) GetWhatsOnLatest(ctx context.Context) (WhatsOn, error)

func (*Store) GetWhatsOnPast

func (s *Store) GetWhatsOnPast(ctx context.Context) ([]WhatsOn, error)

type WhatsOn

type WhatsOn struct {
	ID          int         `db:"id" json:"id"`
	Title       string      `db:"title" json:"title"`
	FileName    null.String `db:"file_name" json:"file_name"`
	Content     null.String `db:"content" json:"content"`
	Date        time.Time   `db:"date" json:"date"`
	DateOfEvent time.Time   `db:"date_of_event" json:"date_of_event"`
}

WhatsOn represents relevant whatsOn fields

Jump to

Keyboard shortcuts

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