database

package
v0.0.0-...-c45c940 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2020 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

type Database struct {
	*sql.DB
}

func New

func New(target string) (*Database, error)

func (*Database) AutoMigrate

func (db *Database) AutoMigrate() error

func (*Database) CommentByIGID

func (db *Database) CommentByIGID(igID int64) (*models.Comment, error)

func (*Database) CommentUpdate

func (db *Database) CommentUpdate(comment *models.Comment) error

func (*Database) Comments

func (db *Database) Comments() (*[]string, error)

func (*Database) CreateTableComments

func (db *Database) CreateTableComments() error

func (*Database) CreateTableLikes

func (db *Database) CreateTableLikes() error

func (*Database) CreateTableMedia

func (db *Database) CreateTableMedia() error

func (*Database) CreateTableProfiles

func (db *Database) CreateTableProfiles() error

func (*Database) InsertComment

func (db *Database) InsertComment(comment *models.Comment) (int64, error)

func (*Database) InsertLike

func (db *Database) InsertLike(like *models.Like) (int64, error)

func (*Database) InsertMedia

func (db *Database) InsertMedia(media *models.Media) (int64, error)

func (*Database) InsertProfile

func (db *Database) InsertProfile(profile *models.Profile) (int64, error)

func (*Database) LikeByIGID

func (db *Database) LikeByIGID(igID string) (*models.Like, error)

func (*Database) MediaByIGID

func (db *Database) MediaByIGID(igID string) (*models.Media, error)

func (*Database) MediaUpdate

func (db *Database) MediaUpdate(media *models.Media) error

func (*Database) ProfileByIGID

func (db *Database) ProfileByIGID(igID int64) (*models.Profile, error)

func (*Database) ProfileUpdate

func (db *Database) ProfileUpdate(profile *models.Profile) error

func (*Database) ProfilesMapByLastChanged

func (db *Database) ProfilesMapByLastChanged() (map[int64]time.Time, error)

func (*Database) ProfilesSorted

func (db *Database) ProfilesSorted() ([]models.Profile, error)

Jump to

Keyboard shortcuts

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