dao

package
v0.0.0-...-acb2c9e Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2020 License: GPL-3.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 AnimeDAO

type AnimeDAO struct {
	Db *sql.DB
}

AnimeDAO struct

func (*AnimeDAO) FindByUserIDAndInternalID

func (adao *AnimeDAO) FindByUserIDAndInternalID(internalUserID, internalAnimeID int64) (*UserAnimeDTO, error)

FindByUserIDAndInternalID func

func (*AnimeDAO) ReadUserAnimes

func (adao *AnimeDAO) ReadUserAnimes(internalUserID int64, sentence string) ([]UserAnimeDTO, error)

ReadUserAnimes func

type AnimeDTO

type AnimeDTO struct {
	ID               int64
	ExternalID       string
	RusName          string
	EngName          string
	ImageURL         string
	NextEpisodeAt    time.Time
	NotificationSent bool
}

AnimeDTO struct

type PqTime

type PqTime struct {
	Time  time.Time
	Valid bool
}

PqTime struct

func (*PqTime) Scan

func (pt *PqTime) Scan(value interface{}) error

Scan func

type SubcriptionDTO

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

SubcriptionDTO struct

type SubscriptionDAO

type SubscriptionDAO struct {
	Db *sql.DB
}

SubscriptionDAO struct

func (*SubscriptionDAO) Delete

func (sdao *SubscriptionDAO) Delete(userID int64, animeID int64) error

Delete func

func (*SubscriptionDAO) Find

func (sdao *SubscriptionDAO) Find(userID int64, animeID int64) (bool, error)

Find func

func (*SubscriptionDAO) Insert

func (sdao *SubscriptionDAO) Insert(userID int64, animeID int64) error

Insert func

type UserAnimeDTO

type UserAnimeDTO struct {
	AnimeDTO
	UserHasSubscription bool
}

UserAnimeDTO struct

type UserDAO

type UserDAO struct {
	Db *sql.DB
}

UserDAO struct

func (*UserDAO) Find

func (udao *UserDAO) Find(telegramID string) (*UserDTO, error)

Find func

func (*UserDAO) Insert

func (udao *UserDAO) Insert(externalID string, username string) (*UserDTO, error)

Insert func

type UserDTO

type UserDTO struct {
	ID               int64
	ExternalID       string
	TelegramUsername string
}

UserDTO struct

Jump to

Keyboard shortcuts

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